FixedVarPropagator

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

class pyomo.contrib.preprocessing.plugins.equality_propagate.FixedVarPropagator(**kwds)[source]

Bases: IsomorphicTransformation

Propagate variable fixing for equalities of type \(x = y\).

If \(x\) is fixed and \(y\) is not fixed, then this transformation will fix \(y\) to the value of \(x\).

This transformation can also be performed as a temporary transformation, whereby the transformed variables are saved and can be later unfixed.

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

Keyword Arguments:

tmp (bool, default=False) – True to store the set of transformed variables and their old states so that they can be later restored.

__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

revert(instance)

Revert variables fixed by the 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

revert(instance)[source]

Revert variables fixed by the transformation.