Dear GamsWorld Group,
I have problems with sets,
I want to handle domain violations below gams code. I appreciate any help. Thanks in advance,
Nazmi
sets
u /120/
i(u) /110/
j /131/
sj(j) /130/
sn(j) /31/
k(u) /1120/
t /13/
st(t) /1*2/
sk(t) /2/
sx(t) /3/
sc(t) /1/
;
scalars
S /480/
;
parameters
A(k,sk)
d(i,sx)
e(k,sx)
cf
cv
;
A(k,sk)=uniformInt(0,1);
d(i,sx)=normal(25,15);
e(k,sx)=uniform(0,10);
cf=60;
cv=1;
binary variables
x(sj)
y(u,j,st);
positive variables
o(j,sx);
free variables
z1
z2
z3;
equations
obj1
eq1(i,sj,t)
eq2(i)
obj2
eq3(k,sj,sk)
eq4(k,sk)
eq5(k,sk)
eq6(k,sn,sk)
obj3
eq7(sj)
;
obj1… z1=e= sum(sj,cf*x(sj));
eq1(u,j,t)$sj(j)… y(u,j,t)=l=x(j);
eq2(i,st)… sum(sj,y(i,sj,st))=e=1;
obj2… z2=e= z3;
eq3(k,sj,sk)… y(k,sj,sk)=l=x(sj);
eq4(k,sk)… y(k,sn,sk)=l=1;
eq5(k,sk)… sum(j,y(k,j,sk))=e=1;
eq6(k,sn,sk)… A(k,sk)+y(k,sn,sk)=e=1;
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.