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

allow add_constraint and add_objective to accept expressions #23

Merged
merged 2 commits into from
May 1, 2023

Conversation

tlambert03
Copy link
Member

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().

@tlambert03 tlambert03 assigned tlambert03 and unassigned tlambert03 Apr 11, 2023
@tlambert03 tlambert03 added the enhancement New feature or request label Apr 11, 2023
@funkey
Copy link
Member

funkey commented May 1, 2023

Nice, thanks :)

@codecov-commenter
Copy link

codecov-commenter commented May 1, 2023

Codecov Report

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

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

@tlambert03 tlambert03 merged commit 9a74037 into funkelab:main May 1, 2023
@tlambert03 tlambert03 deleted the add-expression branch May 1, 2023 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants