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

Refactor and rename src/constraints #553

Merged
merged 2 commits into from
Jan 12, 2024
Merged

Refactor and rename src/constraints #553

merged 2 commits into from
Jan 12, 2024

Conversation

odow
Copy link
Member

@odow odow commented Jan 12, 2024

Since these are implementation details (they are not exported), I'm being a bit ruthless with renaming for clarity.

One question for @ericphanson: it's not clear to me why some atoms call MOI_add_constraint, and others call a <: Constraint. Is it because we can only return duals via <: Constraint?

Copy link

codecov bot commented Jan 12, 2024

Codecov Report

Attention: 26 lines in your changes are missing coverage. Please review.

Comparison is base (32b487d) 92.63% compared to head (af1522c) 92.64%.

Files Patch % Lines
src/constraints/LessThanConstraint.jl 78.94% 8 Missing ⚠️
src/constraints/GreaterThanConstraint.jl 81.57% 7 Missing ⚠️
src/constraints/EqualToConstraint.jl 83.78% 6 Missing ⚠️
src/constraints/ExponentialConeConstraint.jl 63.63% 4 Missing ⚠️
src/problems.jl 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #553      +/-   ##
==========================================
+ Coverage   92.63%   92.64%   +0.01%     
==========================================
  Files          89       91       +2     
  Lines        5171     5179       +8     
==========================================
+ Hits         4790     4798       +8     
  Misses        381      381              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@odow odow merged commit 3077a3a into master Jan 12, 2024
9 of 10 checks passed
@odow odow deleted the od/constraint branch January 12, 2024 03:45
@ericphanson
Copy link
Collaborator

ericphanson commented Jan 12, 2024

Yeah, we only have some constraints modeled as objects. Those the user can construct with operator-overloading syntax (for most of em), and they support show and duals (for the most part), and often have constructors to make it easier to construct. However the MOI model only needs an MOI constraint so if we don’t have an object defined then we sometimes just add the constraint directly instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants