I have a problem regarding the assignment of an initial value to a binary variable in a lot sizing model.
Basically i want to assign the value 1 to the binary setup variable w for the dummyproduct k=0 in the dummy period s=0.
Code: Select all
sets
s microperiods with s=0 being a dummy period
k products with k=0 being a dummy product...
;
binary variables
w(k,s) machine state indicator
...
;
Code: Select all
initialization(k)..
w('k0','s0') =e= 1;
I'm not sure how to fix it or what I'm doing wrong.The domain for this index position is unknown and the element cannot be checked at this point. Missing data statement.
Alternatively I was wondering if it's possible to assign an initial value like that:
Code: Select all
initialization(k,s)$(ord (k)=0 and ord(s)=0)..
w(k,s) =e= 1;