Wikunia / ConstraintSolver.jl

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

check not only for no variable but also for coefficient 0 #240

Closed Wikunia closed 3 years ago

Wikunia commented 3 years ago

Fix for #239

This makes sure that even if a variable exist like in the case 0x <= -1 it get's checked as 0 <= -1 as done with constraints without a variable. Basically it checks for no variables or whether all variables have coefficient 0.

Wikunia commented 3 years ago

Just needs LinearAlgebra as test dependency I assume.

codecov[bot] commented 3 years ago

Codecov Report

Merging #240 (7142f7d) into master (8bd71c9) will increase coverage by 0.06%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #240      +/-   ##
==========================================
+ Coverage   96.47%   96.54%   +0.06%     
==========================================
  Files          39       39              
  Lines        3407     3411       +4     
==========================================
+ Hits         3287     3293       +6     
+ Misses        120      118       -2     
Impacted Files Coverage Δ
src/MOI_wrapper/constraints.jl 100.00% <100.00%> (ø)
src/constraints/linear_constraints.jl 97.05% <100.00%> (ø)
src/util.jl 95.83% <100.00%> (+0.08%) :arrow_up:
src/ConstraintSolver.jl 99.08% <0.00%> (+0.60%) :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 8bd71c9...7142f7d. Read the comment docs.