Re: Change Path Input/Output file

2020-11-25 Thread Domingo Alvarez Duarte

Hello Manuel !

Something like this should work.

table tab_plant IN "CSV" "different_diretory/plants.csv" : I <- [plant], 
a ~ capacity;


Cheers !

On 24/11/20 20:11, 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?


Many thanks in advance for your help. It's really appreciated.

Kind regards,
Manuel.



Re: Change Path Input/Output file

2020-11-24 Thread Andrew Makhorin
On Tue, 2020-11-24 at 19:11 +, 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. 
> 



Change Path Input/Output file

2020-11-24 Thread Manuel Castro
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? 


Many thanks in advance for your help. It's really appreciated.



Kind regards,

Manuel.