help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Passing command line paramters to GLPK


From: glpk xypron
Subject: [Help-glpk] Passing command line paramters to GLPK
Date: Sat, 01 Mar 2008 21:16:46 +0100

Hello Andrew,

data bases will often contain multiple problem instances. Currently to select a 
problem instance it is necessary to edit the model or the data file passed to 
GLPSOL. It would be useful if the problem instance could be passed on the 
command line.

My implementation idea is to add an option -v to be used as follows:

./glpsol -m model.mod -v var1=val1 -v var2=val2 ...

Internally this should create a set
set _ARGV := var1 var2;
and a parameter
param _ARGP := 
  [var1] val1
  [var2] val2;

A usage example is:

table ti IN
  'MySQL'
  'Database=glpk;UID=glpk;PWD=gnu'
  'SELECT COL, LIN, VAL FROM sudoku WHERE ID = ' & _ARGP['ID'] :
  FIELDS <- [COL, LIN], givens ~ VAL;

Best regards

Xypron
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer




reply via email to

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