InducedLinearity

(class from pyomo.contrib.preprocessing.plugins.induced_linearity)

class pyomo.contrib.preprocessing.plugins.induced_linearity.InducedLinearity(**kwds)[source]

Bases: IsomorphicTransformation

Reformulate nonlinear constraints with induced linearity.

Finds continuous variables \(v\) where \(v = d_1 + d_2 + d_3\), where \(d\)’s are discrete variables. These continuous variables may participate nonlinearly in other expressions, which may then be induced to be linear.

The overall algorithm flow can be summarized as:

  1. Detect effectively discrete variables and the constraints that imply discreteness.

  2. Determine the set of valid values for each effectively discrete variable

  3. Find nonlinear expressions in which effectively discrete variables participate.

  4. Reformulate nonlinear expressions appropriately.

Note

Tasks 1 & 2 must incorporate scoping considerations (Disjuncts)

Keyword arguments below are specified for the apply_to and create_using functions.

Keyword Arguments:
  • equality_tolerance (NonNegativeFloat, default=1e-06) – Tolerance on equality constraints.

  • pruning_solver (default='glpk') – Solver to use when pruning possible values.

__init__(**kwds)

Methods

__init__(**kwds)

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