[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Setting initial integer solution in GLPSOL
From: |
xypron |
Subject: |
Re: [Help-glpk] Setting initial integer solution in GLPSOL |
Date: |
Mon, 15 Dec 2008 12:24:48 -0800 (PST) |
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.