ReducedInnerRepresentationGDPTransformation
(class from pyomo.contrib.piecewise.transform.reduced_inner_representation_gdp)
- class pyomo.contrib.piecewise.transform.reduced_inner_representation_gdp.ReducedInnerRepresentationGDPTransformation[source]
Bases:
PiecewiseLinearTransformationBaseConvert a model involving piecewise linear expressions into a GDP by representing the piecewise linear functions as Disjunctions where the simplices over which the linear functions are defined are represented in a reduced “inner” representation–as convex combinations of their extreme points. We refer to this as ‘reduced’ since we create only one multiplier for each extreme point in the union of the extreme points over all the simplices. Within the Disjuncts, we then enforce that all of the multipliers for extreme points not in the simplex are 0.
- This transformation can be called in one of two ways:
The default, where ‘descend_into_expressions’ is False. This is more computationally efficient, but relies on the PiecewiseLinearFunctions being declared on the same Block in which they are used in Expressions (if you are hoping to maintain the original hierarchical structure of the model). In this mode, targets must be Blocks and/or PiecewiseLinearFunctions.
With ‘descend_into_expressions’ True. This is less computationally efficient, but will respect hierarchical structure by finding uses of PiecewiseLinearFunctions in Constraint and Obective expressions and putting their transformed counterparts on the same parent Block as the component owning their parent expression. In this mode, targets must be Blocks, Constraints, and/or Objectives.
- __init__()
Methods
__init__()apply(model, **kwds)DEPRECATED.
apply_to(model, **kwds)Apply the transformation to the given model.
create_using(model, **kwds)Create a new model with this transformation
Attributes
CONFIGMember Documentation
- apply(model, **kwds)
DEPRECATED.
Deprecated since version 4.3.11323: Transformation.apply() has been deprecated. Please use either Transformation.apply_to() for in-place transformations or Transformation.create_using() for transformations that create a new, independent transformed model instance.
- apply_to(model, **kwds)
Apply the transformation to the given model.
- create_using(model, **kwds)
Create a new model with this transformation