OuterRepresentationGDPTransformation

(class from pyomo.contrib.piecewise.transform.outer_representation_gdp)

class pyomo.contrib.piecewise.transform.outer_representation_gdp.OuterRepresentationGDPTransformation[source]

Bases: PiecewiseLinearTransformationBase

Convert 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 an “outer” representation–in sets of constraints of the form Ax <= b.

This transformation can be called in one of two ways:
  1. 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.

  2. With ‘descend_into_expressions’ True. This is less computationally efficient, but will respect hierarchical structure by finding uses of PiecewiseLinearFunctions in Constraint and Objective 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

CONFIG

Member 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