help-glpk
[Top][All Lists]
Advanced

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

Re: Change Path Input/Output file


From: Andrew Makhorin
Subject: Re: Change Path Input/Output file
Date: Tue, 24 Nov 2020 22:35:24 +0300

On Tue, 2020-11-24 at 19:11 +0000, Manuel Castro wrote:
> Hi there,
> 
> I am currently using gusek as an IDE to model and run GLPK.
> I use the following statement to read from CSV file.
> 
> table tab_plant IN "CSV" "plants.csv" : I <- [plant], a ~ capacity;
> 
> This assumes that the file is placed in the same directory where the
> glpk solver is.
> How can I place my CSV file in a different directory and tell glpk to
> read it from there? How do I add the path on my model syntax? 

Conventions are the same as in C programs. You can write

        "../foo/plants.csv"

or

        MYDIR & "/plants.csv"

where MYDIR is a symbolic parameter declared like this:

        param MYDIR, symbolic, := "../foo"


> 
> Many thanks in advance for your help. It's really appreciated.
> 
> Kind regards,
> Manuel. 
> 



reply via email to

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