ConstraintSolver.jl
ConstraintSolver.jl copied to clipboard
More complex constraints in RHS of an indicator / reification
It would be great to be able to write more complex expressions, such as indicators and reifications in the RHS of an indicator / reification. For example (from http://hakank.org/julia/constraints/monks_and_doors.jl )
@constraint(model, m7 := { m3 => m6})
@constraint(model, m8 := { (m7 == 1 && m8 == 1) => m1==1 )
The first version can work by changing it to:
@constraint(model, m7 := { m3 => {m6 == 1}})
which isn't implemented yet but would be easy. It's probably hard to have
@constraint(model, m7 := { m3 => {m6 > 1}})
that working at the moment as >
is not implemented directly and I'm not sure yet how to best allow this inside an indicator constraint which is also inside of a reified
constraint. I might go for implementing it though such that m6 > 1
fails and m6 == 1
works first.
The first is now implemented. Will check what I can do to support a different lhs
of a reified or indicator constraint.
Also support for >
or >=
is still not implemented.