help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Only one data file allowed in GLPK


From: Nigel Galloway
Subject: Re: [Help-glpk] Only one data file allowed in GLPK
Date: Tue, 30 Sep 2008 12:29:29 +0100

Or you could use a Virtual File System, see previous postings. Trust me once 
you've used one with a legacy system like glpk you won't know how you did 
without it. You can use any scripting language, or C, to pull together data 
from disk, database, website, or make it up to create any mathprog or data file 
you want and present it as a normal file to glpk. You can build the files 
entirely in memory if you don't want them on the disk. You can prompt for 
passwords.

The use of gcc to build these files is inventive, but I'd use gawk.

> ----- Original Message -----
> From: "Andrew Makhorin" <address@hidden>
> To: xypron <address@hidden>
> Subject: Re: [Help-glpk] Only one data file allowed in GLPK
> Date: Tue, 30 Sep 2008 01:12:06 +0400
> 
> 
> > AMPL allows multiple data files:
> > http://www.ampl.com/SOLVERS/GUIDE.lpsolve.html
> > "The model and one (or more) data files are fed into the AMPL program."
> 
> > Your example for "gcc.exe -E" did not work for me:
> > C:\>"c:\MinGW\bin\gcc.exe" -E c:\temp\text.txt -o test1.txt
> > gcc.exe: c:\temp\text.txt: linker input file unused because linking
> > not done
> 
> For me it works fine :)
> 
> $ gcc -E -x c data
> # 1 "data"
> # 1 "<built-in>"
> # 1 "<command line>"
> # 1 "data"
> # 1 "today" 1
> Today
> # 2 "data" 2
> # 1 "is" 1
> is
> # 3 "data" 2
> # 1 "monday" 1
> Monday
> # 4 "data" 2
> 
> File 'data' contains the following:
> 
> #include "today"
> #include "is"
> #include "monday"
> 
> Btw, the preprocessor output goes to stdout, so the option '-o' is
> not needed.
> 
> 
> 
> 
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-glpk

>


-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com

Powered by Outblaze




reply via email to

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