Hi All
I am currently working on some aggregate planning modeling. Since I am a total beginner in GAMS modeling I wanted to ask some of the members who have done aggregate problems to guide me through…
The issue is that I can’t get a fully feasible solution. It seems that the number of spent hours Ru(t) of the workers is not reflected fully in the solution. The model, however, gives a feasible solution but it doesn’t look like it calculated all the (i). Apart from this, the model seems to be fine.
Here’s a short part:
Set
i ‘products’ / prod1*prod22 /
t ‘periods’ / Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec/;
…
…
…
Variable
X(i,t) ‘units of product i to be produced in period t’
Inv(i,t) ‘units of product i to be left over as an inventory in period t’
Ru(t) ‘man-hours of regular labor used during period t’
Ou(t) ‘man-hours of overtime labor used during period t’
z ‘total cost…’;
Positive Variable X, Inv, Ru, Ou;
Equation cost, con1, con2, con3, con4;
cost… z =e= sum((i,t), c(i,t)*X(i,t) + h(i,t)*Inv(i,t)) + sum((t),oc(t)*Ou(t) + rc(t)*Ru(t));
con1(i,t)… X(i,t) + Inv(i,t-1) - Inv(i,t) =e= d(i,t);
con2(t)… sum(i, m(i)*X(i,t) - Ou(t) - Ru(t)) =e= 0;
con3(t)… Ou(t) =l= o(t);
con4(t)… Ru(t) =l= r(t);
Model Aggregate / all /;
solve Aggregate using lp minimizing z;
Display X.l, Inv.l, Ru.l, Ou.l;
I have tried to model it through sum(i,t) as it ranges from 1*22 products. I have also attached the gms file if there will be the need.
Greatly appreciate your time and effort…thanks in advance!.
HALF WORKING2.gms (6.29 KB)