-
Notifications
You must be signed in to change notification settings - Fork 4
Description
It would be good if there would be a set/sets that would allow to encode
that two specific nodes of a graph (modelled as a NxN boolean adjacency matrix)
are / are not reachable from one another.
This is an obvious thing given an actual, non-symbolic, graph
e.g. by simply looking at the graph reachability matrix,
which can be computed by raising the boolean adjacency matrix
to a certain power (by performing matrix self-multiplication multiple times).
but that doesn't so nicely translate to JuMP.
Its easy to model with quadratic constraints, but the performance,
even on the most toy examples seems unsatisfactory.
Its straight-forward to model binary matrix multiplication with linear constraints,
but the number of constraints scales with cube of the number of graph nodes,
so even on the most toy example that results in millions of constraints,
and while the solver performance seems better, it's still unsatisfactory.
I haven't looked deeper, but even just creating those constraints via @constraint
can take minutes.
I haven't looked into modelling it as a NLP problem, partly because that iface is still unsupported by both HiGHS and SCIP,
and i'm not sure if there even is any solver that supports said new iface and (MI)LP constraints.
Thus, the only thing left to check is constraint programming.
https://docs.minizinc.dev/en/stable/lib-globals-graph.html#mzn-globals-graph-reachable seems useful,
but i'm not sure about the inverse (non-reachability).