Skip to content

Comments

Add Reified set and MILP bridges#1955

Merged
odow merged 8 commits intomasterfrom
od/reified
Aug 25, 2022
Merged

Add Reified set and MILP bridges#1955
odow merged 8 commits intomasterfrom
od/reified

Conversation

@odow
Copy link
Member

@odow odow commented Jul 20, 2022

Closes #1805

I've implemented these in MiniZinc: jump-dev/MiniZinc.jl#13, but I don't know if we should add to MOI.

They're a little harder to write MILP bridges for, and unlike Indicator, there isn't a range of solvers supporting a small number of constraint types (like Indicator{GreaterThan} and Indicator{LessThan}). Instead, it's pretty arbitrary what sets you can wrap in a Reified.

@odow odow added Project: constraint programming Issues relating to constraint programming Status: Needs review labels Jul 20, 2022
@odow
Copy link
Member Author

odow commented Aug 14, 2022

@blegat can you take a look at this?

@chriscoey
Copy link
Contributor

LGTM - pretty straightforward.

@odow
Copy link
Member Author

odow commented Aug 22, 2022

Okay. I've added a bridge from Reified{AllDifferent} to Reified{CountDistinct} and one from Reified{CountDistinct} to MILP. I've also added a test for Reified{AlDifferent} and verified that HiGHS passes the test with the new bridges.

I think that shows an avenue to making the MILP bridges work, even if the reformulations are a little more work.

@odow odow changed the title RFC: Add Reified set Add Reified set and MILP bridges Aug 22, 2022
@odow
Copy link
Member Author

odow commented Aug 23, 2022

I think I'm pretty happy with this, so I'll leave open for a few days if anyone wants to comment, otherwise I'll merge.

@odow odow merged commit 9ba623e into master Aug 25, 2022
@odow odow deleted the od/reified branch August 25, 2022 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Project: constraint programming Issues relating to constraint programming Status: Needs review

Development

Successfully merging this pull request may close these issues.

Constraint programming support

3 participants