Piecewise Linear transformations: Logarithmic and nested inner GDP representation
Fixes # .
Summary/Motivation:
We want to add piecewise-linear to GDP and to MIP transformations from Vielma 2010 so they can be used in Bashar's PWL representations paper.
Changes proposed in this PR:
- Add disaggregated_logarithmic transformation for PW linear, direct to mip as in Vielma
- Add "nested_inner_repn" transformation, which should be a path to GDP-ification of Vielma's log transformations by identifying some variables, once some changes are made to gdp transformations to support it. Also, this transformation is somewhat interesting in its own right, because it is often faster than the inner representation despite not actually having the logarithmic variable count.
- Rename class PiecewiseLinearToGDP to PiecewiseLinearTransformationBase, since it isn't GDP-specific and I'm using it for a MIP.
Legal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:
- I agree my contributions are submitted under the BSD license.
- I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.
Fixed typos and some other minor issues.
This should be ready now. The linux/3.12 test failure seems to be spurious.
Oh... oops. I seem to have done something strange with git. One minute..
Codecov Report
Attention: Patch coverage is 96.05263% with 6 lines in your changes are missing coverage. Please review.
Project coverage is 86.55%. Comparing base (
69082ac) to head (e954043).
| Files | Patch % | Lines |
|---|---|---|
| ...o/contrib/piecewise/transform/nested_inner_repn.py | 93.67% | 5 Missing :warning: |
| ...b/piecewise/transform/disaggregated_logarithmic.py | 98.36% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #3036 +/- ##
==========================================
- Coverage 88.39% 86.55% -1.85%
==========================================
Files 847 849 +2
Lines 95263 95405 +142
==========================================
- Hits 84212 82582 -1630
- Misses 11051 12823 +1772
| Flag | Coverage Δ | |
|---|---|---|
| linux | ? |
|
| osx | ? |
|
| other | 83.83% <96.05%> (-2.70%) |
:arrow_down: |
| win | 83.83% <96.05%> (+<0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.