I am currently struggling with implementing one of the constraints: for each i in flow j=3, the value of Xi3 should be some integer (say 0 to 10) times the flowcapacity (=45). After some searching on this forum, I figured I should try adding a parameter Flowcapacity(j), make Flowcapacity(3)=45 and all other Flowcapacity(j=/=3)=0. Then, in the constraint, include an if statement: "if Flowcapacity(j)>0 then X(ij)=Flowcapacity(j)*{0,1,2,3,4,5,6,7,8,9,10}".
The program seems to accept the reference to the parameter, but not the subset of integers (which was a long shot). How should I formulate this constraint?
Best answer by mohansx
View original