What is the reason for Error 223-Overlapping row name

Hi Guys,

I wrote a simple code in GAMS, but it also a “Overlapping row name”
error. I tried several times but this error is always there. I am so
confused about this error, because I do not see any Overlapping row
name in my code.
And I really need your help to help me figure out what is wrong in my
code.
Thank you so much!! I am super appreciated!!


The code is as below

Sets
i chains / WDW, DLR/
j departments / Collectibles, Commodities/;

Table A(i,j) Hub Freight
Collectibles Commodities
WDW 521.3249405 18.69082733
DLR 143.1646601 21.56501533;


Variables
o(i,j) percentage go through Hub
p(i,j) percentage store in Hub
q(i,j) percentage go through CC
r(i,j) percentage store in CC
x months store in Hub
y months store in CC
z Total Cost;

Equations
Cost Define objective functions
FillRate1(i,j) fill rate for HUB
FillRate2(i,j) fill rate for CC
StorageMonths1 Total storage months in Supply Chain 1
StorageMonths2 Total storage months in Supply Chain 2;

Cost…z =e= sum((i,j), o(i,j)*A(i,j));
FillRate1(i,j)…o(i,j)*p(i,j)=g=0.25;
FillRate2(i,j)…q(i,j)*r(i,j)=g=0.25;
StorageMonths1…x+y=l=2.8;
StorageMonths2…x+y=g=2.0;
o.lo(i,j) = 0 ;
o.up(i,j) = 1 ;
p.lo(i,j) = 0 ;
p.up(i,j) = 1 ;
q.lo(i,j) = 0 ;
q.up(i,j) = 1 ;
r.lo(i,j) = 0 ;
r.up(i,j) = 1 ;
x.lo=0;
y.lo=0;

Model transport /all/ ;
solve transport using nlp minimizing z ;

\

Hi,

If you use a table, it needs to be aligned otherwise GAMS does not know which value belongs to which column! Try:

Table A(i,j) Hub Freight
Collectibles Commodities
WDW 521.3249405 18.69082733
DLR 143.1646601 21.56501533;

HTH,
Jan


woshidongyang@gmail.com wrote:

Hi Guys,

I wrote a simple code in GAMS, but it also a “Overlapping row name”
error. I tried several times but this error is always there. I am so
confused about this error, because I do not see any Overlapping row
name in my code.
And I really need your help to help me figure out what is wrong in my
code.
Thank you so much!! I am super appreciated!!

The code is as below

Sets
i chains / WDW, DLR/
j departments / Collectibles, Commodities/;

Table A(i,j) Hub Freight
Collectibles Commodities
WDW 521.3249405 18.69082733
DLR 143.1646601 21.56501533;

Variables
o(i,j) percentage go through Hub
p(i,j) percentage store in Hub
q(i,j) percentage go through CC
r(i,j) percentage store in CC
x months store in Hub
y months store in CC
z Total Cost;

Equations
Cost Define objective functions
FillRate1(i,j) fill rate for HUB
FillRate2(i,j) fill rate for CC
StorageMonths1 Total storage months in Supply Chain 1
StorageMonths2 Total storage months in Supply Chain 2;

Cost…z =e= sum((i,j), o(i,j)*A(i,j));
FillRate1(i,j)…o(i,j)*p(i,j)=g=0.25;
FillRate2(i,j)…q(i,j)*r(i,j)=g=0.25;
StorageMonths1…x+y=l=2.8;
StorageMonths2…x+y=g=2.0;
o.lo(i,j) = 0 ;
o.up(i,j) = 1 ;
p.lo(i,j) = 0 ;
p.up(i,j) = 1 ;
q.lo(i,j) = 0 ;
q.up(i,j) = 1 ;
r.lo(i,j) = 0 ;
r.up(i,j) = 1 ;
x.lo=0;
y.lo=0;

Model transport /all/ ;
solve transport using nlp minimizing z ;


Jan-H. Jagla mailto:jhjagla@gams.com
GAMS Development Corporation GAMS Software GmbH
1217 Potomac St. NW Eupener Str. 135-137
Washington DC, 20007, USA 50933 Cologne, Germany
Fon/Fax: +1 202 342-0180/1 Fon/Fax: +49 221 949-9174/1
http://www.gams.com http://www.gams.de


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

The columns in the table A(i,j) are not aligned with their respective
titles: Try to separate columns and ther in such a manner there are no
ambiguities between the members of the row and column members, i
mean

Table A(i,j) Hub Freight

Collectibles Commodities
WDW 521.3249405 18.69082733
DLR 143.1646601 21.56501533;


Juaan


On May 5, 10:15 pm, “woshidongy...@gmail.com
wrote:

Hi Guys,

I wrote a simple code in GAMS, but it also a “Overlapping row name”
error. I tried several times but this error is always there. I am so
confused about this error, because I do not see any Overlapping row
name in my code.
And I really need your help to help me figure out what is wrong in my
code.
Thank you so much!! I am super appreciated!!

The code is as below

Sets
i chains / WDW, DLR/
j departments / Collectibles, Commodities/;

Table A(i,j) Hub Freight
Collectibles Commodities
WDW 521.3249405 18.69082733
DLR 143.1646601 21.56501533;

Variables
o(i,j) percentage go through Hub
p(i,j) percentage store in Hub
q(i,j) percentage go through CC
r(i,j) percentage store in CC
x months store in Hub
y months store in CC
z Total Cost;

Equations
Cost Define objective functions
FillRate1(i,j) fill rate for HUB
FillRate2(i,j) fill rate for CC
StorageMonths1 Total storage months in Supply Chain 1
StorageMonths2 Total storage months in Supply Chain 2;

Cost…z =e= sum((i,j), o(i,j)*A(i,j));
FillRate1(i,j)…o(i,j)*p(i,j)=g=0.25;
FillRate2(i,j)…q(i,j)*r(i,j)=g=0.25;
StorageMonths1…x+y=l=2.8;
StorageMonths2…x+y=g=2.0;
o.lo(i,j) = 0 ;
o.up(i,j) = 1 ;
p.lo(i,j) = 0 ;
p.up(i,j) = 1 ;
q.lo(i,j) = 0 ;
q.up(i,j) = 1 ;
r.lo(i,j) = 0 ;
r.up(i,j) = 1 ;
x.lo=0;
y.lo=0;

Model transport /all/ ;
solve transport using nlp minimizing z ;


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/gamsworld?hl=en.

\