InducedLinearity
(class from pyomo.contrib.preprocessing.plugins.induced_linearity)
- class pyomo.contrib.preprocessing.plugins.induced_linearity.InducedLinearity(**kwds)[source]
Bases:
IsomorphicTransformationReformulate 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:
Detect effectively discrete variables and the constraints that imply discreteness.
Determine the set of valid values for each effectively discrete variable
Find nonlinear expressions in which effectively discrete variables participate.
Reformulate nonlinear expressions appropriately.
Note
Tasks 1 & 2 must incorporate scoping considerations (Disjuncts)
Keyword arguments below are specified for the
apply_toandcreate_usingfunctions.- 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
CONFIGMember 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