Modeling Equations
Posted: Tue Jan 12, 2021 8:48 am
Hello together,
I am currently trying to implement a model with the following restrictions, which I have not been able to formulate in GAMS:
Sets
i Products / P1*P3 /
m Microperiods / S1*S15 /
t Macroperiods / T1*T3 /
Mt(t,m) Set of Microperiods m within Macroperiod t / T1.S1*S5
T2.S6*S10
T3.S11*S15 /
Lt(t,m) Denoting the last Microperiod of a macroperiod t / T1.S5
T2.S10
T3.S15 /
Ltx(t,m) Without last Microperiod of a macroperiod t / T1.S1*S4
T2.S6*S9
T3.S11*S14 /;
alias(i,j);
alias(m,tau);
is that possible like this:
Relation(j,m) ..
SD(j,m) =g= Sum(tau$(ord(tau) <= (ord(m)-ommega(j))), R(j,tau)) - Sum(tau$(ord(tau) <= (ord(m)-1)), yR(j,tau)) - Sum(tau$(ord(tau) <= (ord(m)-1)), SD(j,tau));
ReworkEarly(j,m) ..
Sum(tau$(ord(tau) <= (ord(m)-1)), R(j,tau)) - Sum(tau$(ord(tau) <= (ord(m)-1)), yR(j,tau)) =g= yR(j,m);
secound issue:
how can I expres the condition to the Set without a "Uncontrol set entered as constant" error:
KapaRest(t)$(M(t,m)) ..
Sum((j,m)$(M(t,m)), (tb(j) * y(j,m) + tbR(j) * yR(j,m))) =l= b(t) - Sum((i,j,m)$(M(t,m) and (not sameas(i,j))), ts(i,j) * zz(i,j,m));
thirdly:
can I expres this lines like this? or is there a logical mistake from my side?:
MinLotsize(j,t,m)$(Ltx(t,m)) ..
y(j,m) + yR(j,m) =g= kt(j) * (x(j,m) - x(j,m-1)$(ord(m)>1));
Prodkont(j,t,m)$(Lt(t,m)) ..
y(j,m) + y(j,m+1) + yR(j,m) + yR(j,m+1) =g= kt(j) * (x(j,m) - x(j,m-1)$(ord(m)>1));
I would be very grateful for any help or discussion!
I am currently trying to implement a model with the following restrictions, which I have not been able to formulate in GAMS:
Sets
i Products / P1*P3 /
m Microperiods / S1*S15 /
t Macroperiods / T1*T3 /
Mt(t,m) Set of Microperiods m within Macroperiod t / T1.S1*S5
T2.S6*S10
T3.S11*S15 /
Lt(t,m) Denoting the last Microperiod of a macroperiod t / T1.S5
T2.S10
T3.S15 /
Ltx(t,m) Without last Microperiod of a macroperiod t / T1.S1*S4
T2.S6*S9
T3.S11*S14 /;
alias(i,j);
alias(m,tau);
is that possible like this:
Relation(j,m) ..
SD(j,m) =g= Sum(tau$(ord(tau) <= (ord(m)-ommega(j))), R(j,tau)) - Sum(tau$(ord(tau) <= (ord(m)-1)), yR(j,tau)) - Sum(tau$(ord(tau) <= (ord(m)-1)), SD(j,tau));
ReworkEarly(j,m) ..
Sum(tau$(ord(tau) <= (ord(m)-1)), R(j,tau)) - Sum(tau$(ord(tau) <= (ord(m)-1)), yR(j,tau)) =g= yR(j,m);
secound issue:
how can I expres the condition to the Set without a "Uncontrol set entered as constant" error:
KapaRest(t)$(M(t,m)) ..
Sum((j,m)$(M(t,m)), (tb(j) * y(j,m) + tbR(j) * yR(j,m))) =l= b(t) - Sum((i,j,m)$(M(t,m) and (not sameas(i,j))), ts(i,j) * zz(i,j,m));
thirdly:
can I expres this lines like this? or is there a logical mistake from my side?:
MinLotsize(j,t,m)$(Ltx(t,m)) ..
y(j,m) + yR(j,m) =g= kt(j) * (x(j,m) - x(j,m-1)$(ord(m)>1));
Prodkont(j,t,m)$(Lt(t,m)) ..
y(j,m) + y(j,m+1) + yR(j,m) + yR(j,m+1) =g= kt(j) * (x(j,m) - x(j,m-1)$(ord(m)>1));
I would be very grateful for any help or discussion!