Wikunia / ConstraintSolver.jl

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

bin variable symbol as constraint #267

Closed Wikunia closed 2 years ago

Wikunia commented 2 years ago

Implementation for #250 Currently it does not check whether the variables used are binary as I'm unsure how to do this.

codecov[bot] commented 2 years ago

Codecov Report

Merging #267 (f8f1bd4) into master (29ea78a) will increase coverage by 0.05%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #267      +/-   ##
==========================================
+ Coverage   97.53%   97.58%   +0.05%     
==========================================
  Files          53       53              
  Lines        4419     4428       +9     
==========================================
+ Hits         4310     4321      +11     
+ Misses        109      107       -2     
Impacted Files Coverage Δ
src/MOI_wrapper/bool.jl 95.23% <100.00%> (+1.29%) :arrow_up:
src/ConstraintSolver.jl 99.14% <0.00%> (+0.56%) :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 29ea78a...f8f1bd4. Read the comment docs.

Wikunia commented 2 years ago

Should probably allow

a := { b => {c}}

Edit: That doesn't seem to work here as c is a normal expr and I don't have access at the parse constraint call in that case