Wikunia / ConstraintSolver.jl

ConstraintSolver in Julia: Blog posts ->
https://opensourc.es/blog/constraint-solver-1
MIT License
136 stars 13 forks source link

basic indicator in reified constraint #251

Closed Wikunia closed 2 years ago

Wikunia commented 3 years ago

Partly implements #248

such that this:

@constraint(model, m7 := { m3 => {m6 == 1}})

works. Would work nicer with #250

Todo:

@hakank I used your http://hakank.org/julia/constraints/monks_and_doors.jl as a test case for this. Feel free to double check this with other models that you have.

codecov[bot] commented 3 years ago

Codecov Report

Merging #251 (a06baf4) into master (3e11d24) will decrease coverage by 0.03%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #251      +/-   ##
==========================================
- Coverage   97.57%   97.53%   -0.04%     
==========================================
  Files          53       53              
  Lines        4408     4419      +11     
==========================================
+ Hits         4301     4310       +9     
- Misses        107      109       +2     
Impacted Files Coverage Δ
src/MOI_wrapper/util.jl 100.00% <100.00%> (ø)
src/constraints/indicator.jl 100.00% <100.00%> (ø)
src/constraints/reified.jl 100.00% <100.00%> (ø)
src/ConstraintSolver.jl 98.57% <0.00%> (-0.57%) :arrow_down:

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 3e11d24...a06baf4. Read the comment docs.

Wikunia commented 2 years ago

Decided to not support bridges for now as reified and indicator bridges are not SetMapBridge atm and I think this is a relatively minor thing.