TransformCurrentDisjunctiveState

(class from pyomo.gdp.plugins.transform_current_disjunctive_state)

class pyomo.gdp.plugins.transform_current_disjunctive_state.TransformCurrentDisjunctiveState(**kwds)[source]

Bases: Transformation

This transformation finds disjunctive state (indicator_var values) in the given GDP, and, for any Disjunction, when the state fully determines what Disjunct will be selected, it reclassifies all the Disjuncts of the Disjunction as Blocks, and activates or deactivates them according to whether their indicator_vars are set (or implied to be set) as ‘True’ or ‘False’ (respectively).

Note that this transformation does not necessarily return a MI(N)LP since it will not transform Disjunctions that are not fully determined by the current state. Be careful in partially-transformed states to remember that if even one DisjunctData in an IndexedDisjunct is reclassified as a Block, all of the DisjunctDatas will be as well. It is strongly recommended to not use DisjunctDatas from a single IndexedDisjunction in multiple Disjunctions if you will be working with the partially-transformed model.

If using ‘apply_to’ rather than ‘create_using’, this transformation is reversible. Calling apply_to returns a token to reverse the transformation In order to reverse the transformation, pass this token back to the transformation as the ‘reverse’ argument.

__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