## Modeling inventory constrainst

Problems with modeling
Ehsan_sr
User
Posts: 2
Joined: 3 months ago

### Modeling inventory constrainst

Hello everyone,
I am trying to model a supply chain model with inventory decisions. The model has 2 constraints for balancing inventory in different periods which are as follows:
in the second equation H is the inventory level of the first period. My question is how I can set a variable for the first period like when I would like to set the starting inventory level equal to zero.
any tips would be appreciated.
Best regards,
Ehsan

abhosekar
Moderator
Posts: 7
Joined: 2 days ago

### Re: Modeling inventory constrainst

I assume you want to fix the initial inventory to a value. You can do this by H.fx(i, p, '1', s) = 0;
Moreover, you may not even need two separate constraints if the only difference is initial inventory. You can model the first constraint as follows:

H(i, p, t-1, s)\$(ord(t) ne 1) + .....

This way the term H(i, p, t-1, s) will be included only second period onwards.
Hope that helps.

Ehsan_sr
User
Posts: 2
Joined: 3 months ago

### Re: Modeling inventory constrainst

Thank you absohekar, that is helpful. I tried your second suggestion and it is working like a charm.