this repo has no description
at develop 737 B view raw
1include "tree.mzn"; 2include "subgraph.mzn"; 3 4predicate fzn_path(int: N, int: E, array[int] of int: from, array[int] of int: to, 5 var int: s, var int: t, array[int] of var bool: ns, array[int] of var bool: es) = 6 let { array[1..2*E] of int: dfrom = from ++ to; 7 array[1..2*E] of int: dto = to ++ from; 8 array[1..2*E] of var bool: des; 9 } in 10 /* ensure that the directed edges selected agree with undirected edges */ 11 forall(e in 1..E)(es[e] <-> (des[e] \/ des[e+E])) /\ 12 /* duplicate the edges so that the we can use directed graph path */ 13 fzn_dpath(N,2*E,dfrom,dto,s,t,ns,des); 14 15%-----------------------------------------------------------------------------%