[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

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

Best regards


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

param havedata;
param a;
printf if (havedata) then a else "no data";

View this message in context:
Sent from the Gnu - GLPK - Help mailing list archive at

reply via email to

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