java.lang.Object
org.ojalgo.optimisation.Presolvers
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ExpressionsBasedModel.Presolverstatic final ExpressionsBasedModel.PresolverIf the expression is linear and contributes to the objective function, then the contributions are transferred to the variables and the weight of the expression set to null.static final ExpressionsBasedModel.PresolverCalculates the min and max value of this expression based on the variables' individual bounds.static final org.ojalgo.optimisation.ExpressionsBasedModel.VariableAnalyserVerifies that the variable is actually referenced/used in some expression.static final ExpressionsBasedModel.PresolverLooks for constraint expressions with 0, 1 or 2 non-fixed variables. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckFeasibility(Expression expression, Set<Structure1D.IntIndex> remaining, BigDecimal lower, BigDecimal upper, NumberContext precision, boolean relaxed) static booleancheckSimilarity(Collection<Expression> current, Expression potential) Checks if the potentialExpressionis similar to any in the current collection.static booleanreduce(Collection<Expression> expressions)
-
Field Details
-
INTEGER
-
LINEAR_OBJECTIVE
If the expression is linear and contributes to the objective function, then the contributions are transferred to the variables and the weight of the expression set to null. -
REDUNDANT_CONSTRAINT
Calculates the min and max value of this expression based on the variables' individual bounds. Then compares those with the expression's bounds. -
UNREFERENCED
public static final org.ojalgo.optimisation.ExpressionsBasedModel.VariableAnalyser UNREFERENCEDVerifies that the variable is actually referenced/used in some expression. If not then that variable can either be fixed or marked as unbounded.2019-02-15: Turned this off. Very slow for large models 2019-02-22: Turned this on again, different implementation
-
ZERO_ONE_TWO
Looks for constraint expressions with 0, 1 or 2 non-fixed variables. Transfers the constraints of the expressions to the variables and then (if possible) marks the expression as redundant.
-
-
Constructor Details
-
Presolvers
public Presolvers()
-
-
Method Details
-
checkFeasibility
public static void checkFeasibility(Expression expression, Set<Structure1D.IntIndex> remaining, BigDecimal lower, BigDecimal upper, NumberContext precision, boolean relaxed) -
checkSimilarity
Checks if the potentialExpressionis similar to any in the current collection. Only works for linear expressions. If the potential expression to check has any quadratic term, nothing more is checked, and false is returned.- Returns:
- true, if the potential
Expressionis found to be similar and marked as redundant by this method.
-
reduce
-