Hello,
I’m having the following problem, which can be reduced from my code to:
set t:= 1..5; #Time periods
set e:= 1..2; #Intentory places
set p:= 1..3; #Products
var Iq{p,e,t} >= 0; #Inventory variable
#Moving variables:
# i for sums in t
# g for sums in e
# j for sums in p
subject to inventory_balance {j in p, i in t}:
sum{g in e} Iq[j,g,i] = sum{g in e} Iq[j,g,i-1] + sum{x in k} A[j,i,x] * Mt[i] - DS[i,j] ;
This is the inventory level, which is the sum of "g in e" of the inventory level at time i-1 plus other things. The problem is the "i-1" time period. The first iteration will be for time t=1 i.e because of the constraint it will become time t=0. I know that in that period (t=0) the amount of inventory is 0. So the thing is, how can I set the variable Iq[p,e,0] be 0 in a constraint?
Thanks in advance!