GDXXRW to load 1-dim set

Hi,

I have an Excel data file that I want to load a set from. The length of the set can change depending on the data, so I want it to load the entire column, and then use se=0 to force it to stop whenever it encounters an empty cell.

I’ve already successfully loaded one set. The first set was in a row, and I loaded it with the following code:

set t time period;
$call GDXXRW.EXE SmallData1.xlx se=0 o=tGDX.gdx set=t Rng=LoadMitX!1:1 cdim=1
$GDXIN tGDX.gdx
$LOAD t
$GDXIN

The next set I want to load in the same way is in a column (instead of a row). But I’ve tried the following and no luck:

set i nodes;
$call GDXXRW.EXE SmallData1.xlx se=0 o=iGDX.gdx set=i Rng=NodeData!A:A rdim=1 cdim=0
$GDXIN iGDX.gdx
$LOAD i
$GDXIN

I’ve tried all different combos of 0 and 1 for rdim and cdim, but no luck.

Any insight?

Thanks!
Emily


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.

\

Here’s a twist… I haven’t changed anything, but the first block now won’t properly load the members of set t…

I don’t see a lot of examples in McCarl for how to load sets from Excel. The one uses a dset, but says that is only necessary to avoid errors with duplicates (of which I have none).

Is there anyone else who uses GDXXRW to load sets? If so, can you share an example?

For some of these, I don’t want to limit it to a specific block. So is it ok to use a range like A:A or 1:1. I had the case with 1:1 working earlier today (although, like I said, it spontaneously started giving errors).

Thanks,
Emily



On Saturday, July 20, 2013 11:58:56 PM UTC-4, emily cl wrote:

Hi,

I have an Excel data file that I want to load a set from. The length of the set can change depending on the data, so I want it to load the entire column, and then use se=0 to force it to stop whenever it encounters an empty cell.

I’ve already successfully loaded one set. The first set was in a row, and I loaded it with the following code:

set t time period;
$call GDXXRW.EXE SmallData1.xlx se=0 o=tGDX.gdx set=t Rng=LoadMitX!1:1 cdim=1
$GDXIN tGDX.gdx
$LOAD t
$GDXIN

The next set I want to load in the same way is in a column (instead of a row). But I’ve tried the following and no luck:

set i nodes;
$call GDXXRW.EXE SmallData1.xlx se=0 o=iGDX.gdx set=i Rng=NodeData!A:A rdim=1 cdim=0
$GDXIN iGDX.gdx
$LOAD i
$GDXIN

I’ve tried all different combos of 0 and 1 for rdim and cdim, but no luck.

Any insight?

Thanks!
Emily


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.

\

Hey plz check this Rng=NodeData!A:A rdim=1 cdim=0 , For the first set

set t time period;
$call GDXXRW.EXE SmallData1.xlx se=0 o=tGDX.gdx set=t Rng=LoadMitX!1:1 cdim=1

you are using cdim=1.

I guess you also write the secound set in same way so i think you should check rdim=1 cdim=0 , and change rdim=0 and cdim=1 also check the range ,

Try to solve this, very good material

http://www.gams.com/dd/docs/tools/gdxutils.pdf




On Mon, Jul 22, 2013 at 4:22 AM, emily cl wrote:

Here’s a twist… I haven’t changed anything, but the first block now won’t properly load the members of set t…

I don’t see a lot of examples in McCarl for how to load sets from Excel. The one uses a dset, but says that is only necessary to avoid errors with duplicates (of which I have none).

Is there anyone else who uses GDXXRW to load sets? If so, can you share an example?

For some of these, I don’t want to limit it to a specific block. So is it ok to use a range like A:A or 1:1. I had the case with 1:1 working earlier today (although, like I said, it spontaneously started giving errors).

Thanks,
Emily



On Saturday, July 20, 2013 11:58:56 PM UTC-4, emily cl wrote:

Hi,

I have an Excel data file that I want to load a set from. The length of the set can change depending on the data, so I want it to load the entire column, and then use se=0 to force it to stop whenever it encounters an empty cell.

I’ve already successfully loaded one set. The first set was in a row, and I loaded it with the following code:

set t time period;
$call GDXXRW.EXE SmallData1.xlx se=0 o=tGDX.gdx set=t Rng=LoadMitX!1:1 cdim=1
$GDXIN tGDX.gdx
$LOAD t
$GDXIN

The next set I want to load in the same way is in a column (instead of a row). But I’ve tried the following and no luck:

set i nodes;
$call GDXXRW.EXE SmallData1.xlx se=0 o=iGDX.gdx set=i Rng=NodeData!A:A rdim=1 cdim=0
$GDXIN iGDX.gdx
$LOAD i
$GDXIN

I’ve tried all different combos of 0 and 1 for rdim and cdim, but no luck.

Any insight?

Thanks!
Emily


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.





\

Regards,
Owais Nooruddin

+358465700556


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.

\