this repo has no description
at develop 604 B view raw
1predicate fzn_network_flow_cost(array[int,1..2] of int: arc, 2 array[int] of int: balance, 3 array[int] of int: weight, 4 array[int] of var int: flow, var int: cost) = 5 6 let { int: source_node = 1; 7 int: sink_node = 2; 8 set of int: ARCS = index_set_1of2(arc); 9 set of int: NODES = index_set(balance); 10 } in 11 cost = sum(i in ARCS) (flow[i] * weight[i]) 12 /\ 13 forall (i in NODES) ( 14 sum (j in ARCS where i == arc[j,source_node]) (flow[j]) - 15 sum (j in ARCS where i == arc[j,sink_node]) (flow[j]) 16 = balance[i] 17 );