pyomo icon indicating copy to clipboard operation
pyomo copied to clipboard

Piecewise Linear transformations: Logarithmic and nested inner GDP representation

Open sadavis1 opened this issue 2 years ago • 4 comments

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:

  1. I agree my contributions are submitted under the BSD license.
  2. 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.

sadavis1 avatar Nov 14 '23 18:11 sadavis1

Fixed typos and some other minor issues.

sadavis1 avatar Nov 15 '23 04:11 sadavis1

This should be ready now. The linux/3.12 test failure seems to be spurious.

sadavis1 avatar Feb 15 '24 21:02 sadavis1

Oh... oops. I seem to have done something strange with git. One minute..

sadavis1 avatar Feb 22 '24 01:02 sadavis1

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.

codecov[bot] avatar Apr 03 '24 01:04 codecov[bot]