TrivialConstraintDeactivator
(class from pyomo.contrib.preprocessing.plugins.deactivate_trivial_constraints
)
- class pyomo.contrib.preprocessing.plugins.deactivate_trivial_constraints.TrivialConstraintDeactivator(**kwds)[source]
Bases:
IsomorphicTransformation
Deactivates trivial constraints.
Trivial constraints take form \(k_1 = k_2\) or \(k_1 \leq k_2\), where \(k_1\) and \(k_2\) are constants. These constraints typically arise when variables are fixed.
Keyword arguments below are specified for the
apply_to
andcreate_using
functions.- Keyword Arguments:
tmp (bool, default=False) – True to store a set of transformed constraints for future reversion of the transformation.
ignore_infeasible (bool, default=False) – True to skip over trivial constraints that are infeasible instead of raising an InfeasibleConstraintException.
return_trivial (default=[]) – a list to which the deactivated trivialconstraints are appended (side effect)
tolerance (NonNegativeFloat, default=1e-13) – tolerance on constraint violations
- __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 constraints deactivated 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