Long Statements in GDXXRW

57 views
Skip to first unread message

Babak Saleck Pay

unread,
May 25, 2012, 4:38:45 AM5/25/12
to gamsworld
Dear All

I am importing data from excel to GAMS but my paramters are too many.
So I don't know any way except using in following way:

Execute 'GDXXRW  xlfilenam.xlsx par=flow rng=Sheet2!A1:E5 Cdim=1 Rdim=1           par= ...                par = ...           par = ...';    

As you can see for more parameters, its difficult to write and track this statement.
is there any other ways, for example to break this line to multiple lines or what ever?

I really appreciate any suggestion.

Thank you.


--
Babak Saleck Pay
M.Sc
Socio-Economic System Engineering
Group of Industrial Engineering
University of Tehran
Tehran,Iran

Renger van Nieuwkoop

unread,
May 25, 2012, 5:01:42 AM5/25/12
to gams...@googlegroups.com

Dear Babak

 

Define a sheet in your excel file and read the information from there with:

 

$call 'gdxxrw xlfilename.xlsx o=filename.gdx index=gams!a1:f8

 

In the sheet gams you have a list of all your parameters and sets (see the gdx documentation)

                                                                                              RDIM    CDIM

set        i                               zonen!a2:a39                    1            

set         a                             netz!b2:c153                     2            

par         zoneinfo             zonen!a1:p39                    1             1

par         od                          od!a1:am39                       1             1

par         w                            walking_dist!a1:am39   1             1

par         netwinfo             netz!b1:j153                      2             1

par         scaling                  scaling!a1:b3                     1            

 

Renger

--
You received this message because you are subscribed to the Google Groups "gamsworld" group.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Babak Saleck Pay

unread,
May 25, 2012, 5:55:08 AM5/25/12
to gams...@googlegroups.com
Dear Renger

I'm really thankful
it was very helpful
Reply all
Reply to author
Forward
0 new messages