Search found 15 matches

by LaurentFranckx
5 years ago
Forum: Syntax
Topic: several error messages when reading csv file
Replies: 2
Views: 3482

several error messages when reading csv file

Dear all I am trying to read the attached csv file with the following code: sets year /1970*2040/ cartype /gas,dies,gashybr,dieshybr,gashybr_cs,dieshybr_cs,gashybr_phev,dieshybr_phev,electric,fuelcellh2,h2ice,cng,lpg,motor/ sizeall /small, medium, big, all/ size(sizeall) /small, medium, big/ ; Table...
by LaurentFranckx
5 years ago
Forum: API
Topic: Reading text or Excel files in execution phase
Replies: 6
Views: 7267

Re: Reading text or Excel files in execution phase

Dear Fred Thanks again. The following worked for me: set color /red,green , blue ,purple/, number /three, four, five/; parameter A(color, color, color, number); execute "C:\GAMS\win64\25.0\csv2gdx C:\Usr\GAMSvsRviaExcel\data.csv id=A Index=(1,2,6) Values=(3..5) UseHeader=Y StoreZero=Y" exe...
by LaurentFranckx
5 years ago
Forum: API
Topic: Reading text or Excel files in execution phase
Replies: 6
Views: 7267

Re: Reading text or Excel files in execution phase

Hi Thanks for the reply. I am literally executing the example: $call csv2gdx data id=A Index=(1,2,6) Values=(3..5) UseHeader=Y StoreZero=Y set color(*), number(*); $gdxin data.gdx $load color=dim1 $loadm color=dim2 $loadm color=dim3 $load number=dim4 parameter A(color, color, color, number); $load A...
by LaurentFranckx
5 years ago
Forum: Tools
Topic: Command line use error message "Could not copy GAMS parameter file "
Replies: 6
Views: 11974

Re: Command line use error message "Could not copy GAMS parameter file "

@Gams_271
Have you copied the "installation file" or "installation folder" to your PATH variable?
by LaurentFranckx
5 years ago
Forum: API
Topic: Reading text or Excel files in execution phase
Replies: 6
Views: 7267

Re: Reading text or Excel files in execution phase

Dear Fred Thank you for the reply. I am currently trying to implement the example with csv2gdx but I always get the error message "GDXIN failed". I have literally copied the examples from https://www.gams.com/latest/docs/T_CSV2GDX.html The csv file has been created correctly and has the co...
by LaurentFranckx
5 years ago
Forum: API
Topic: Reading text or Excel files in execution phase
Replies: 6
Views: 7267

Reading text or Excel files in execution phase

Dear all A few days ago I had posted a question under the title "Data exchange between R and GAMS" - I realize now that this heading may have been too restrictive, so I would like to broaden the question: In my model, GAMS needs to be able to read data in the execution of a loop (because t...
by LaurentFranckx
5 years ago
Forum: API
Topic: Data exchange between R and GAMS
Replies: 0
Views: 3315

Data exchange between R and GAMS

Dear all I have a situation where my GAMS model calls an R script in the execution of a loop. In each iteration of the loop, the exchange of data goes in both ways: GAMS produces data that are read by the R script, and vice versa. I had tried a solution where the exchange of data operates through a ...
by LaurentFranckx
6 years ago
Forum: Syntax
Topic: nested GAMS calls with save and restart
Replies: 2
Views: 3477

Re: nested GAMS calls with save and restart

@Renger Thanks for the tip. Technically, that would be solution, but it is also error prone: if you add new parameters or variables, you could easily lose track of them. Now that I think of it, this is precisely a key advantage of the 'save' and 'restart' commands. I have worked around the problem b...
by LaurentFranckx
6 years ago
Forum: Syntax
Topic: nested GAMS calls with save and restart
Replies: 2
Views: 3477

nested GAMS calls with save and restart

Dear all I am trying to implement nested GAMS calls. To be more concrete, I have a top-level GAMS file, say, root.GMS, which calls a PowerShell script, say myscript.ps1, with the following code: execute "powershell -File C:\gams\MyModel\myscript.ps1" This PowerShell script loops through a ...