unable to open gdx file for $GDXIN

hi everyone.
i have a weird problem!!
i wrote a model in gams and imported 5 parameters from an excel file… now gams can import 4 of them , but for one of them …
$call GDXXRW.exe I=data.xls O=data.gdx par=et rng=sheet1!ak5:aq11 cdim=1 rdim=1
parameter et(i,j);
$GDXIN data.gdx
$LOAD et
$GDXIN
display et;

it shows me 3 errors :

*** Error 510 in C:\Documents and Settings\atefe\My Documents\gamsdir\first tray project.gms
Unable to open gdx file for $GDXIN
— first tray project.gms(39) 3 Mb 2 Errors
*** Error 502 in C:\Documents and Settings\atefe\My Documents\gamsdir\first tray project.gms
GDXIN file not open - ignore rest of line
— first tray project.gms(41) 3 Mb 3 Errors
*** Error 141 in C:\Documents and Settings\atefe\My Documents\gamsdir\first tray project.gms
Symbol declared but no values have been assigned. Check for missing


it’s weird cause i wrote 5 codes exactly as the others)just different in parameter names and excel cells !!!
can anyone please help me?


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Hi Atefe

If you want to have answers to your questions, you should post a reproducible piece of code and the files that go along with it, otherwise your problems will remain weird…

(read the guide lines to this forum carefully).

Renger


\


Modelworks

Gewerbestrasse 15

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch

blog.modelworks.ch







From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of atefe angouh
Sent: Dienstag, 5. August 2014 22:48
To: gamsworld@googlegroups.com
Subject: unable to open gdx file for $GDXIN



hi everyone.

i have a weird problem!!

i wrote a model in gams and imported 5 parameters from an excel file… now gams can import 4 of them , but for one of them …

$call GDXXRW.exe I=data.xls O=data.gdx par=et rng=sheet1!ak5:aq11 cdim=1 rdim=1

parameter et(i,j);

$GDXIN data.gdx

$LOAD et

$GDXIN

display et;



it shows me 3 errors :



*** Error 510 in C:\Documents and Settings\atefe\My Documents\gamsdir\first tray project.gms

Unable to open gdx file for $GDXIN

— first tray project.gms(39) 3 Mb 2 Errors

*** Error 502 in C:\Documents and Settings\atefe\My Documents\gamsdir\first tray project.gms

GDXIN file not open - ignore rest of line

— first tray project.gms(41) 3 Mb 3 Errors

*** Error 141 in C:\Documents and Settings\atefe\My Documents\gamsdir\first tray project.gms

Symbol declared but no values have been assigned. Check for missing





it’s weird cause i wrote 5 codes exactly as the others)just different in parameter names and excel cells !!!

can anyone please help me?


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

dear renger… i’m sorry about that.
i attached my gams file . but i changed it a bit . now i know a bit more about the problem .
i think when gams is trying to read data from excel file ,it reads wrong cells (different to what i wrote in rng statement). and it says (for example):
**** There were 9 duplicate entries for symbol t
1: 7576,100000
2: 7360,100000
3: 8932,100000
4: 8247,100000
5: 100000,7576
6: 100000,7360
7: 100000,8932
8: 100000,8247
9: 100000,100000
Output gdx file deleted

it seems when gams read these data, it delete the gdx file… and after that ,for the next parameter that i want to import, it can’t find gdx file (obviously 'cause it’s deleted), and it shows error 510 that says Unable to open gdx file for $GDXIN.
i would highly appreciate it if somebody can help.
best regards



On Wednesday, August 6, 2014 1:18:12 AM UTC+4:30, atefe angouh wrote:

hi everyone.
i have a weird problem!!
i wrote a model in gams and imported 5 parameters from an excel file… now gams can import 4 of them , but for one of them …
$call GDXXRW.exe I=data.xls O=data.gdx par=et rng=sheet1!ak5:aq11 cdim=1 rdim=1
parameter et(i,j);
$GDXIN data.gdx
$LOAD et
$GDXIN
display et;

it shows me 3 errors :

*** Error 510 in C:\Documents and Settings\atefe\My Documents\gamsdir\first tray project.gms
Unable to open gdx file for $GDXIN
— first tray project.gms(39) 3 Mb 2 Errors
*** Error 502 in C:\Documents and Settings\atefe\My Documents\gamsdir\first tray project.gms
GDXIN file not open - ignore rest of line
— first tray project.gms(41) 3 Mb 3 Errors
*** Error 141 in C:\Documents and Settings\atefe\My Documents\gamsdir\first tray project.gms
Symbol declared but no values have been assigned. Check for missing


it’s weird cause i wrote 5 codes exactly as the others)just different in parameter names and excel cells !!!
can anyone please help me?


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

these are gams and the excel files.

\

New WinRAR archive (2).rar (6.95 KB)

Hi Atefe

Once again: if you send stuff, it should reproduce the error you report. In your code you address data.xls and you send book1.xls. Even if I correct that, I don’t get your error…

Run the stuff before you send it.

Here is one error you make: if you define p over i, but read in only a line (g5:m5), how should gams know which i to assign the value to.

It should therefore be g4:m5.

Hope this helps to correct the other stuff.

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of atefe angouh
Sent: Mittwoch, 6. August 2014 11:04
To: gamsworld@googlegroups.com
Subject: Re: unable to open gdx file for $GDXIN



dear renger… i’m sorry about that.

i attached my gams file . but i changed it a bit . now i know a bit more about the problem .

i think when gams is trying to read data from excel file ,it reads wrong cells (different to what i wrote in rng statement). and it says (for example):

**** There were 9 duplicate entries for symbol t

1: 7576,100000

2: 7360,100000

3: 8932,100000

4: 8247,100000

5: 100000,7576

6: 100000,7360

7: 100000,8932

8: 100000,8247

9: 100000,100000

Output gdx file deleted

it seems when gams read these data, it delete the gdx file… and after that ,for the next parameter that i want to import, it can’t find gdx file (obviously 'cause it’s deleted), and it shows error 510 that says Unable to open gdx file for $GDXIN.

i would highly appreciate it if somebody can help.

best regards



On Wednesday, August 6, 2014 1:18:12 AM UTC+4:30, atefe angouh wrote:

hi everyone.

i have a weird problem!!

i wrote a model in gams and imported 5 parameters from an excel file… now gams can import 4 of them , but for one of them …

$call GDXXRW.exe I=data.xls O=data.gdx par=et rng=sheet1!ak5:aq11 cdim=1 rdim=1

parameter et(i,j);

$GDXIN data.gdx

$LOAD et

$GDXIN

display et;



it shows me 3 errors :



*** Error 510 in C:\Documents and Settings\atefe\My Documents\gamsdir\first tray project.gms

Unable to open gdx file for $GDXIN

— first tray project.gms(39) 3 Mb 2 Errors

*** Error 502 in C:\Documents and Settings\atefe\My Documents\gamsdir\first tray project.gms

GDXIN file not open - ignore rest of line

— first tray project.gms(41) 3 Mb 3 Errors

*** Error 141 in C:\Documents and Settings\atefe\My Documents\gamsdir\first tray project.gms

Symbol declared but no values have been assigned. Check for missing





it’s weird cause i wrote 5 codes exactly as the others)just different in parameter names and excel cells !!!

can anyone please help me?


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.