this repo has no description
1include "fzn_dag.mzn";
2include "fzn_dag_reif.mzn";
3
4/** @group globals.graph
5 Constrains the subgraph \a ns and \a es of a given directed graph to be a DAG.
6
7 \a from is the leaving node for each edge
8 \a to is the entering node for each edge
9 \a ns is a Boolean for each node whether it is in the subgraph
10 \a es is a Boolean for each edge whether it is in the subgraph
11*/
12predicate dag(array[int] of $$N: from, array[int] of $$N: to,
13 array[$$N] of var bool: ns, array[int] of var bool: es) =
14 assert(index_set(from) = index_set(to),"dreachable: index set of from and to must be identical") /\
15 assert(index_set(from) = index_set(es),"dreachable: index set of from and es must be identical") /\
16 assert(dom_array(from) subset index_set(ns),"dreachable: nodes in from must be in index set of ns") /\
17 assert(dom_array(from) subset index_set(ns),"dreachable: nodes in to must be in index set of ns") /\
18 fzn_dag(from,to,ns,es);