Skip to content

Comments

Add Reified set support#13

Merged
odow merged 5 commits intomasterfrom
od/reified
Jul 20, 2022
Merged

Add Reified set support#13
odow merged 5 commits intomasterfrom
od/reified

Conversation

@odow
Copy link
Member

@odow odow commented Jul 18, 2022

Part of jump-dev/MathOptInterface.jl#1805 (comment).

Adding to MiniZinc.jl first to work out the kinks before we decide to add to MOI. I think that adding the Reified set with minimal infrastructure might be the way to go. It's a pretty solid/standard set and we already have Indicator, but it'd need a lot of other stuff before it was useful to non-constraint programming solvers.

MiniZinc doesn't support reified constraints for complicated sets like Table, Path, Cumulative, etc. It's been trial and error to see which are supported and which aren't.

  • AllDifferent
  • BinPacking
  • Circuit MiniZinc: evaluation error: Abort: Reified circuit/1 is not supported.
  • CountAtLeast
  • CountBelongs
  • CountDistinct
  • CountGreaterThan
  • Cumulative
  • Path MiniZinc: evaluation error: Abort: Reified path constraint is not supported
  • Table
  • LessThan
  • GreaterThan
  • EqualTo

@codecov
Copy link

codecov bot commented Jul 18, 2022

Codecov Report

Merging #13 (2f650d7) into master (de8f1ed) will increase coverage by 1.28%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #13      +/-   ##
==========================================
+ Coverage   93.42%   94.70%   +1.28%     
==========================================
  Files           3        3              
  Lines         289      359      +70     
==========================================
+ Hits          270      340      +70     
  Misses         19       19              
Impacted Files Coverage Δ
src/MiniZinc.jl 63.63% <100.00%> (+63.63%) ⬆️
src/write.jl 99.26% <100.00%> (+0.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de8f1ed...2f650d7. Read the comment docs.

@odow odow changed the title WIP: Add Reified set support Add Reified set support Jul 19, 2022
@odow
Copy link
Member Author

odow commented Jul 20, 2022

Merging this for now, since MOI support might be a while away. If we decide to add Reified to MOI, we can remove from MiniZinc.jl and release a breaking v0.2 release.

@odow odow merged commit 4a0411d into master Jul 20, 2022
@odow odow deleted the od/reified branch July 20, 2022 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant