Draft
Conversation
Updating error to note that absolute_value not valid for cvxpy, as neither is DCP-compliant Allowing binary_big_M for cvxpy with gurobi
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #50 +/- ##
==========================================
+ Coverage 93.40% 93.48% +0.07%
==========================================
Files 10 10
Lines 1593 1626 +33
==========================================
+ Hits 1488 1520 +32
- Misses 105 106 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fletchapin
approved these changes
Jan 6, 2026
Contributor
fletchapin
left a comment
There was a problem hiding this comment.
Looks great to me! @arao53 might have comments since he's more familiar with MILP
| .. code-block:: python | ||
|
|
||
| from electric_emission_cost import costs | ||
| from eeco import costs |
| - "absolute_value": Uses max(x, 0) constraints. Creates nonlinear problem | ||
| for Pyomo due to abs() constraint. | ||
| - "binary_big_M": Uses binary indicator with Big-M constraints. | ||
| Creates a MILP (mixed-integer linear program) for Pyomo. |
Contributor
There was a problem hiding this comment.
Should this be "for Pyomo or CVXPY" since binary_big_M is supported for both?
| - "absolute_value": Uses max(x, 0) constraints. Creates nonlinear problem | ||
| for Pyomo due to abs() constraint. | ||
| - "binary_big_M": Uses binary indicator with Big-M constraints. | ||
| Creates a MILP (mixed-integer linear program) for Pyomo. |
Contributor
There was a problem hiding this comment.
Should this be "for Pyomo or CVXPY" since binary_big_M is supported for both?
Contributor
Author
|
(Still working on this PR, it can be merged AFTER #51 if that's approved) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updating error to note that absolute_value not valid for cvxpy, as neither is DCP-compliant
Allowing binary_big_M for cvxpy with gurobi
Addresses #45 and #46
Pull request recommendations:
Thanks for contributing!