help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Setting initial integer solution in GLPSOL


From: Oscar Gustafsson
Subject: Re: [Help-glpk] Setting initial integer solution in GLPSOL
Date: Wed, 17 Dec 2008 14:59:34 +0100 (MET)

Hi Xypron,

yes you can do that and several other things. However, I am still firmly convinced that for me the additional command line option for glpsol to provide an initial bound for the MILP solver would be very useful.

Regards

Oscar


On Mon, 15 Dec 2008, xypron wrote:


Hello Oscar,

I agree that this obviously is possible. However, at least for me it would
be nice to have this command line option to keep the model "clean" (I do

to pass a parameter to a model from the command line you can use a script,
which will first create a data file and then pass it to glpsol (see example
below).

As glpsol can take multiple data files if necessary this does not require
many changes.

Best regards

Xypron


test.bat
========
if "%1"=="" goto nodata
echo data; param havedata := 1; param a := %1; end; > test.dat
goto done
:nodata
echo data; param havedata := 0; param a := 0; end; > test.dat
:done
"c:\program files\glpk\glpk-4.34\w32\glpsol.exe" -m test.mod -d test.dat

test.mod
========
param havedata;
param a;
printf if (havedata) then a else "no data";
end;

--
View this message in context: 
http://www.nabble.com/Setting-initial-integer-solution-in-GLPSOL-tp21005682p21021188.html
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.



_______________________________________________
Help-glpk mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-glpk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]