jump-dev / MiniZinc.jl

A Julia interface to the MiniZinc constraint modeling language
https://www.minizinc.org/
MIT License
18 stars 4 forks source link

Add Reified set support #13

Closed odow closed 2 years ago

odow commented 2 years ago

Part of https://github.com/jump-dev/MathOptInterface.jl/issues/1805#issuecomment-1132254501.

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.

codecov[bot] commented 2 years ago

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%) :arrow_up:
src/write.jl 99.26% <100.00%> (+0.22%) :arrow_up:

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 commented 2 years ago

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.