I don't find the fault

I have a job with I’m pretty stuck in the air. Following problem.

We have 300 Trucks. How many trucks of beer should be transported from each plant to each distribution center in order to minimize transportation costs?
Real variables:
X: Amount of trucks sent from production facility i (i = 1,2,3) to consumption center j (j = 1,2,3,4)
W: minimizing costs = W= 4000x1 + 5130x2 + 6500x3 + 8000x4 + 3520x5 + 4600x6 + 6900x7 + 7900x8 + 9900x9 + 6820y1 + 3880y2 + 6800y3

This is my programming in GAMS.
But I get variables with 0 even though I have defined psotive variables.


Positive Variable
x1,x2,x3,x4,x5,x6,x7,x8,x9,y1,y2,y3;
Free Variable
W;
Equation
obj, r1,r2,r3,r4,r5,r6,r7;

obj… W=e= (4000x1 + 5130x2 + 6500x3 + 8000x4 + 3520x5 + 4600x6 + 6900x7 + 7900x8 + 9900x9 + 6820y1 + 3880y2 + 6800y3)/300 ;
r1… x1+x2+x3+x4 =l= 75;
r2… x5+x6+x7+x8 =l= 125;
r3… x9+y1+y2+y3 =l= 100;
r4… x1+x5+x9 =e= 80;
r5… x2+x6+y1 =e= 65;
r6… x3+x7+y2 =e= 70;
r7… x4+x8+y3 =e= 85;

model Ej431 /all/;
solve Ej431 using LP minimizing W;
display X1.L, x2.l, x3.l, x4.l, x5.l, W.L;


Does anyone see my mistake?
Thank You very much
image.png

Hi,

This problem is pretty close to the well known transport example from the GAMS model library.
You might want to use this as a template to write a nice indexed GAMS model instead of implementing the scalar model (btw, not sure why you mix x and y variables instead of just using x1,x2,…, x12).

A look into the documentation reveals that positive variables (aka nonnegative variables) have a lower bound of 0, so getting some with value 0 is perfectly and simply means that on the corresponding link, 0 trucks ship beer from plant to production center. Not sure why you think this is problematic.

I hope this helps!

Fred