Hello,

I have a problem with blocking the arc in Minimum cost flow problem. Suppose I have one supplier L1 that sends 60 m3 of product either through the packaging plant to production plant or directly to production plant. When I run the model, it shows that, for example, 13 m3 go through the packaging plant and 47 m3 are sent directly. How can I possibly show that there exists only one possibility, I mean either shipping 60 m3 directly or through packaging plant, and not the combination of both?

Thank you!

Assuming you have decision variables flow(i,j) representing the flow quantities on arc i->j, you probably need to create additional binary variables ifuse(i,j) to be able to impose limits on the number of arcs from a certain node, for example:

! Linking the 'flow' and 'ifuse' variables

forall(i,j in Nodes | exists(flow(i,j))) do

ifuse(i,j) is_binary

indicator(-1, ifuse(i,j), flow(i,j)<=0) ! ifuse(i,j)=0 -> flow(i,j)<=0

flow(i,j)>=ifuse(i,j) ! ifuse(i,j)=1 -> flow(i,j)>=1 NB: this assumes a minimum flow quantity of 1 unit

end-do

! Limit the number of outgoing arcs in node "L1"

sum(j in Nodes | exists(flow("L1",j))) ifuse("L1",j) <= 1