I'm sure i've somehow written bogus model (i've reduced it somewhat, the remaining constraints seem to matter),
but it probably shouldn't crash on it...
include "link_set_to_booleans.mzn";
int: NUM_GRAPH_NODES = 15;
int: NUM_GRAPH_EDGES = length(GRAPH_EDGES);
enum GRAPH_NODES = GN(1..NUM_GRAPH_NODES);
enum GRAPH_EDGES = GE(1..length(j,i in GRAPH_NODES where i > j)(1));
array[GRAPH_EDGES] of var bool: GraphEdges;
enum DISJOINT_SUBGRAPH_INDICES = DG(1..NUM_GRAPH_NODES);
array[GRAPH_EDGES] of var opt DISJOINT_SUBGRAPH_INDICES: EdgeDisjointSubgraphIndex;
array[GRAPH_EDGES,DISJOINT_SUBGRAPH_INDICES] of var bool: DisjointSubgraphEdgesMatrix;
constraint (
forall (n in GRAPH_EDGES)(
(EdgeDisjointSubgraphIndex[n] != <>) == GraphEdges[n]
/\ (EdgeDisjointSubgraphIndex[n] != <>) == count(DisjointSubgraphEdgesMatrix[n,..])
/\ count(DisjointSubgraphEdgesMatrix[n,..]) == GraphEdges[n]
/\ ((EdgeDisjointSubgraphIndex[n] == <>) == (not exists(DisjointSubgraphEdgesMatrix[n,..])))
/\ ((EdgeDisjointSubgraphIndex[n] != <>) -> (link_set_to_booleans({EdgeDisjointSubgraphIndex[n]}, DisjointSubgraphEdgesMatrix[n,..])))
)
);
minizinc: ./lib/flatten.cpp:2833: MiniZinc::KeepAlive MiniZinc::bind(EnvI&, Ctx, VarDecl*, Expression*): Assertion `Expression::type(e).isbool()' failed.
Process finished with non-zero exit code 6.
I'm sure i've somehow written bogus model (i've reduced it somewhat, the remaining constraints seem to matter), but it probably shouldn't crash on it...