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

basic indicator in reified constraint #251

Merged
merged 6 commits into from
Jul 18, 2021
Merged

Conversation

Wikunia
Copy link
Owner

@Wikunia Wikunia commented Feb 12, 2021

Partly implements #248

such that this:

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

works. Would work nicer with #250

Todo:

  • Make sure that m7 := { m3 => {m6 > 1}} fails early as unsupported or do actually support it 😄
  • Test case for reified in reified, indicator in indicator, reified in indicator

@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
Copy link

codecov bot commented Feb 12, 2021

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%) ⬇️

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
Copy link
Owner Author

Wikunia commented Jul 18, 2021

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.

@Wikunia Wikunia merged commit 29ea78a into master Jul 18, 2021
@Wikunia Wikunia deleted the feature-indicator-in-reified branch July 18, 2021 12:30
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

Successfully merging this pull request may close these issues.

1 participant