funkelab / ilpy

Unified python wrappers for popular ILP solvers
https://funkelab.github.io/ilpy/
MIT License
3 stars 2 forks source link

allow add_constraint and add_objective to accept expressions #23

Closed tlambert03 closed 1 year ago

tlambert03 commented 1 year ago

This lets Solver.add_constraint and Solver.set_objective accept instances of Expression ... which makes it unnecessary to always check if isinstance() elsewhere and manually call as_constraint() or as_objective().

funkey commented 1 year ago

Nice, thanks :)

codecov-commenter commented 1 year ago

Codecov Report

Merging #23 (1a03cd8) into main (5a2b221) will decrease coverage by 0.90%. The diff coverage is 90.90%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main      #23      +/-   ##
==========================================
- Coverage   86.46%   85.57%   -0.90%     
==========================================
  Files           3        3              
  Lines         303      312       +9     
==========================================
+ Hits          262      267       +5     
- Misses         41       45       +4     
Impacted Files Coverage Δ
ilpy/wrapper.pyx 70.00% <90.90%> (-2.14%) :arrow_down: