Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More complex constraints in RHS of an indicator / reification #248

Open
hakank opened this issue Feb 12, 2021 · 2 comments
Open

More complex constraints in RHS of an indicator / reification #248

hakank opened this issue Feb 12, 2021 · 2 comments

Comments

@hakank
Copy link

hakank commented Feb 12, 2021

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 )  
@Wikunia
Copy link
Owner

Wikunia commented Feb 12, 2021

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.

@Wikunia
Copy link
Owner

Wikunia commented Jul 19, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants