Search found 16 matches
- 5 years ago
- Forum: Syntax
- Topic: relational operators within GAMS
- Replies: 6
- Views: 6786
Re: relational operators within GAMS
You could use a mapping set P /P01 * P08/ Jn /Jn01 * Jn10/ Jm /Jm01 * Jm10/ mapN_M(Jn,Jm) /#Jn:#Jm/; display mapN_M; parameters p1(P,Jm) p2(P,Jn); p2(P,Jn) = uniform(0,10); loop((jn,jm)$mapN_M(jn,jm), p1(P,jm) = p2(P,jn); ); display p1, p2; For information on the mapping, see [url]https://www.gams.c...
- 6 years ago
- Forum: Syntax
- Topic: Change Working Directory of GAMS
- Replies: 1
- Views: 5571
Re: Change Working Directory of GAMS
Hi Barsssk You could use a setlocal or setglobal parameter at the beginning of your file. For example, if you want to have all your files in the directory results, which is below your model directory, I add: $setglobal results .\results\ * Send to results directory execute_unload "%results%myre...
- 6 years ago
- Forum: Syntax
- Topic: unable to read and write Excel spreadsheet data in GAMS
- Replies: 3
- Views: 3948
Re: unable to read and write Excel spreadsheet data in GAMS
Hi
Add "Trace = 3" at the end, and you will see if your import of data works well. If there are errors for all imported variables, your gdx file will not be created.
Cheers
Renger
Add "Trace = 3" at the end, and you will see if your import of data works well. If there are errors for all imported variables, your gdx file will not be created.
Cheers
Renger
- 6 years ago
- Forum: Syntax
- Topic: string operations in GAMS
- Replies: 6
- Views: 7815
Re: string operations in GAMS
Hi Laurent One way would be a batch file in a command window and the use of control variables. You would have something like this in your "run.bat" (something you could easily generate with a python or R script) call gams mymodel --scenario=BAU --regions=NORTH --years=2030 call gams mymode...
- 6 years ago
- Forum: Syntax
- Topic: Execute, load excel file and read parameters´value
- Replies: 1
- Views: 2923
Re: Execute, load excel file and read parameters´value
Hi
Add Trace = 3 at the end of your gdxxrw command and you will see if there are errors when importing the data.
I only see that you define Stk(yr,i,se) but in the table the order seems to be i,yr,se (or se,yr,i).
Cheers
Renger
Add Trace = 3 at the end of your gdxxrw command and you will see if there are errors when importing the data.
I only see that you define Stk(yr,i,se) but in the table the order seems to be i,yr,se (or se,yr,i).
Cheers
Renger
- 6 years ago
- Forum: Bugs
- Topic: GAMS not rerunning
- Replies: 1
- Views: 8951
Re: GAMS not rerunning
Hi Faaiqah
Please read the Forum Rules and reformulate according to these rules (https://forum.gamsworld.org/app.php/rules). Your question is not answerable.
Cheers
Renger
Please read the Forum Rules and reformulate according to these rules (https://forum.gamsworld.org/app.php/rules). Your question is not answerable.
Cheers
Renger