urgent: Unable to open gdx file for $GDXIN

questions about GAMS' tools
Post Reply
MES
User
User
Posts: 14
Joined: 4 years ago

urgent: Unable to open gdx file for $GDXIN

Post by MES »

When I do run my code in GAMS Studio I get this error. (When I do run it on GAMS IDE it doesn't appear)

Code: Select all

*** GDXIN failed C:\Users\   ....  \j10 Instanz %InstanzNr%.gdx
*** Msg: No such file or directory
I have two parts of the model, the first one is:

Code: Select all

set InstanzNr / 001*050/;
loop(InstanzNr,
   put_utility 'exec' / 'gams MyModel --InstanzNr="'InstanzNr.tl:0'" lo= %gams.lo% output=C:\Users\  .... \TEST' InstanzNr.tl:0 '.lst  ';
);
In the second one I do want to open the gdx file

Code: Select all

$gdxin "C:\Users\ .... \j10 Instanz %InstanzNr%.gdx"
So it seems like GAMS does not pass the information of InstanzNr.

What could be the reason for that?


Thanks in advance!
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: urgent: Unable to open gdx file for $GDXIN

Post by Renger »

Hi
You should uncomment the first InstanzNr.tl:0, e.g.,

Code: Select all

   put_utility 'exec' / "gams MyModel --InstanzNr=" InstanzNr.tl:0 " lo= %gams.lo% output=test" InstanzNr.tl:0".lst";
Cheers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Post Reply