ReverseTransformationToken
(class from pyomo.core.base.transformation
)
- class pyomo.core.base.transformation.ReverseTransformationToken(transformation, model, targets, reverse_dict)[source]
Bases:
object
Class returned by reversible transformations’ apply_to methods that can be passed back to the transformation in order to revert its changes to the model.
We store the transformation that created it, so that we have some basic error checking when the user attempts to revert, and we store a dictionary that can be whatever the transformation wants/needs in order to revert itself.
- Parameters:
transformation – The class of the transformation that created this token
model – The model being transformed when this token was created
targets – The targets on ‘model’ being transformed when this token was created.
reverse_dict – Dictionary with everything the transformation needs to undo itself.
Methods
__init__
(transformation, model, targets, ...)check_token_valid
(cls, model, targets)Attributes
reverse_dict
transformation
Member Documentation