Thank you. I want to remove a few elements from the two-dimensional set that I have created. However, it does not work. Do you have any suggestions?
Code: Select all
Sets
c /1*10/
t /1*10/
tc(c,t) /#c.#t/;
Parameters
p(c) /1 3, 2 4, 3 5, 4 2, 5 3, 6 4, 7 5, 8 6, 9 5, 10 5/;
loop((c,t),
if(ord(t)-p(c)+1>card(t),
tc(c,t) = No;
);
);
Moreover, I think the format that you provided for writing the constraint should be reformulated as follows. This is because when I use your format, I face an error like "Uncontrolled set entered as constant."
Code: Select all
Con(j) .. sum((c,r,d)$c_j(c,j), x(c,r,d)) =l= y(j);
Am I right? Thanks in advance.