Hello,

In a product mix problem (with multiple products, over a period of time) that I am trying to solve there is a constraint w.r.t inventory where starting inventory is 0 for all the products, but at the end of n month period, the closing inventory should be equal to 200 for all the products. Also in each month (from 1 to n-1) the maximum inventory should be less than or equal to 100 w.r.t each product. I write the code in GAMS as below but ended up in an infeasible solution. Can you give me some suggestions on how to fix this or how these constraints can be written in a better/correct way. Thank you

```
*I(i,j) - inventory of product i month j
*P(i,j) - qty of product i month j
*demand balancing from month 2-12
d2(i,j)$((ord(j) > 1) and (ord(j) < 12)).. I(i,j-1) + P(i,j) - I(i,j) =e= D(i,j) ;
*demand balancing for month one
d1(i,j)$(ord(j) < 2) .. P(i,j) - I(i,j) =e= D(i,j) ;
*demand balancing for month 12
d12(i,j)$(ord(j) > 11) .. I(i,j-1) + P(i,j) - I(i,j) =e= D(i,j);
*max inventory constraint 1-12
IN(i,j)$((ord(j) < 12)) .. I(i,j) =l= 100;
*closing inventory
IC(i,j)$(ord(j) > 11) .. I(i,j) =e= 200;
```