Using 2 dimensional sets
Posted: Fri Jul 06, 2018 10:22 am
Hi,
I would like to define a 2 dimensional set, use it as a variable index and use them in an equation. But I get error using following lines:"Dimensions different"
sets
f /1*3/
r /1*3/
fr(f,r) /1.1
2.(1,2)
3.(1,3)/;
binary variables
v(f,r,gb);
equatios:
e7(d,gb).. k(d,gb)=e= sum(fr,(1-min(abs(mod(d,f)-r),1))*v(fr,gb));
Could anyone help me with please?
I would like to define a 2 dimensional set, use it as a variable index and use them in an equation. But I get error using following lines:"Dimensions different"
sets
f /1*3/
r /1*3/
fr(f,r) /1.1
2.(1,2)
3.(1,3)/;
binary variables
v(f,r,gb);
equatios:
e7(d,gb).. k(d,gb)=e= sum(fr,(1-min(abs(mod(d,f)-r),1))*v(fr,gb));
Could anyone help me with please?