502 and 510 error

Archive of Gamsworld Google Group
Post Reply
Archiver
User
User
Posts: 7876
Joined: 4 years ago

502 and 510 error

Post by Archiver » 7 years ago




On Thursday, November 14, 2013 10:34:17 PM UTC+3:30, Ela wrote:

hi dear my friends
i write a gams model but it has two errors that i do not recognize them , 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/groups/opt_out.

Archiver
User
User
Posts: 7876
Joined: 4 years ago

Re: 502 and 510 error

Post by Archiver » 7 years ago


Hi
Please attach your GAMS code



On Fri, Nov 15, 2013 at 10:32 PM, Ela wrote:



On Thursday, November 14, 2013 10:34:17 PM UTC+3:30, Ela wrote:

hi dear my friends
i write a gams model but it has two errors that i do not recognize them , 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/groups/opt_out.


--
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/groups/opt_out.

Archiver
User
User
Posts: 7876
Joined: 4 years ago

Re: 502 and 510 error

Post by Archiver » 7 years ago


Hi
Some of your mistakes:
1- if you use an excel file in .xls file you have to save it ins workbook 97-2003 format!
2- in use of "$GDXIN Workbook.xls" shouldn't write path for excel file(E:\Data.xls). because the .gdx file will save in gams directory.
3- Statements which contain $ must use in first column.
4-in excel file u must row and column's name as it defines in gams.
5-range of data which is introduced to gams must contain both data and indeces.
and ....


On Sat, Nov 16, 2013 at 12:11 AM, A.R. Bahari wrote:

Hi
Please attach your GAMS code



On Fri, Nov 15, 2013 at 10:32 PM, Ela wrote:



On Thursday, November 14, 2013 10:34:17 PM UTC+3:30, Ela wrote:

hi dear my friends
i write a gams model but it has two errors that i do not recognize them , please help me .

--
Attachments
Revised.gms
(2.41 KiB) Downloaded 102 times
data.xls
(25 KiB) Downloaded 76 times

Archiver
User
User
Posts: 7876
Joined: 4 years ago

Re: 502 and 510 error

Post by Archiver » 7 years ago


Hi
Some of your mistakes:
1- if you use an excel file in .xls format you have to save it ins workbook 97-2003 format!
2- in use of "$GDXIN Workbook.xls" shouldn't write path for excel file(E:\Data.xls). because the .gdx file will save in gams directory.
3- Statements which contain $ must are used in first column.
4-in excel file u must use row and column's name as it defines in gams.
5-range of data which is introduced to gams must contain both data and indices.
and ....


On Sat, Nov 16, 2013 at 12:49 AM, A.R. Bahari wrote:

Hi
Some of your mistakes:
1- if you use an excel file in .xls file you have to save it ins workbook 97-2003 format!
2- in use of "$GDXIN Workbook.xls" shouldn't write path for excel file(E:\Data.xls). because the .gdx file will save in gams directory.
3- Statements which contain $ must use in first column.
4-in excel file u must row and column's name as it defines in gams.
5-range of data which is introduced to gams must contain both data and indeces.
and ....


On Sat, Nov 16, 2013 at 12:11 AM, A.R. Bahari wrote:

Hi
Please attach your GAMS code



On Fri, Nov 15, 2013 at 10:32 PM, Ela wrote:



On Thursday, November 14, 2013 10:34:17 PM UTC+3:30, Ela wrote:

hi dear my friends
i write a gams model but it has two errors that i do not recognize them , 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/groups/opt_out.




--
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/groups/opt_out.

Archiver
User
User
Posts: 7876
Joined: 4 years ago

Re: 502 and 510 error

Post by Archiver » 7 years ago



Dear Alireza
I thanks so much of you , i learned new things about GAMS .
good luck.

On Saturday, November 16, 2013 12:51:14 AM UTC+3:30, Alireza Bahari wrote:

Hi
Some of your mistakes:
1- if you use an excel file in .xls format you have to save it ins workbook 97-2003 format!
2- in use of "$GDXIN Workbook.xls" shouldn't write path for excel file(E:\Data.xls). because the .gdx file will save in gams directory.
3- Statements which contain $ must are used in first column.
4-in excel file u must use row and column's name as it defines in gams.
5-range of data which is introduced to gams must contain both data and indices.
and ....


On Sat, Nov 16, 2013 at 12:49 AM, A.R. Bahari wrote:

Hi
Some of your mistakes:
1- if you use an excel file in .xls file you have to save it ins workbook 97-2003 format!
2- in use of "$GDXIN Workbook.xls" shouldn't write path for excel file(E:\Data.xls). because the .gdx file will save in gams directory.
3- Statements which contain $ must use in first column.
4-in excel file u must row and column's name as it defines in gams.
5-range of data which is introduced to gams must contain both data and indeces.
and ....


On Sat, Nov 16, 2013 at 12:11 AM, A.R. Bahari wrote:

Hi
Please attach your GAMS code



On Fri, Nov 15, 2013 at 10:32 PM, Ela wrote:



On Thursday, November 14, 2013 10:34:17 PM UTC+3:30, Ela wrote:

hi dear my friends
i write a gams model but it has two errors that i do not recognize them , please help me .

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




--
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/groups/opt_out.

farima
User
User
Posts: 1
Joined: 1 month ago

Re: 502 and 510 error

Post by farima » 1 month ago

Hello everyone,

I faced with a problem. I want to call some data from Excel, and i did it for some of my parameters in this model using same excel file. however, now i faced with a problem for calling this parameter (error 502 and 510), could you please help me? :roll: :(
the part of y code is pasted there

tnx a lot



parameter TCS(f,l,i,t) ;
$call gdxxrw.exe data.xlsx par=TCS rng=sheet6!A1:BK32 rdim=2 cdim=1
$gdxin data.gdx
$load TCS
$gdxin
display TCS ;

User avatar
bussieck
Moderator
Moderator
Posts: 570
Joined: 4 years ago

Re: 502 and 510 error

Post by bussieck » 1 month ago

It's hard to help without being able to reproduce a problem, but in this case one problem is obvious: The gdxxrw ask for a 3 dimensional parameter (rdim+cdim=2+1=3) while your GAMS parameter has 4 dimensions: f,l,i,t. That can't work.

-Michael

Post Reply