Fourier_Motzkin_Elimination_Transformation
(class from pyomo.contrib.fme.fourier_motzkin_elimination
)
- class pyomo.contrib.fme.fourier_motzkin_elimination.Fourier_Motzkin_Elimination_Transformation[source]
Bases:
Transformation
Project out specified variables from a linear model.
- This transformation requires the following keyword argument:
- vars_to_eliminate: A user-specified list of continuous variables to
project out of the model
The transformation will deactivate the original constraints of the model and create a new block named “_pyomo_contrib_fme_transformation” with the projected constraints. Note that this transformation will flatten the structure of the original model since there is no obvious mapping between the original model and the transformed one.
Methods
__init__
()Initialize transformation object
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
post_process_fme_constraints
(m, solver_factory)Function that solves a sequence of LPs problems to check if constraints are implied by each other.
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
- post_process_fme_constraints(m, solver_factory, projected_constraints=None, tolerance=0)[source]
Function that solves a sequence of LPs problems to check if constraints are implied by each other. Deletes any that are.
- Parameters:
m (A model, already transformed with FME. Note that if constraints) – have been added, activated, or deactivated, we will check for redundancy against the whole active part of the model. If you call this straight after FME, you are only checking within the projected constraints, but otherwise it is up to the user.
solver_factory (A SolverFactory object (constructed with a solver) – which can solve the continuous relaxation of the active constraints on the model. That is, if you had nonlinear constraints unrelated to the variables being projected, you need to either deactivate them or provide a solver which will do the right thing.)
projected_constraints (The ConstraintList of projected constraints.) – Default is None, in which case we assume that the FME transformation was called without specifying their name, so will look for them on the private transformation block.
tolerance (Tolerance at which we decide a constraint is implied by the) – others. Default is 0, meaning we remove the constraint if the LP solve finds the constraint can be tight but not violated. Setting this to a small positive value would remove constraints more conservatively. Setting it to a negative value would result in a relaxed problem.