- java.lang.Object
- com.anylogic.engine.optimization.optquest.ConstraintProcessor
public class ConstraintProcessor extends Object
| Constructor | Description |
|---|---|
ConstraintProcessor() |
| Modifier and Type | Method | Description |
|---|---|---|
static List<Pair<Pattern, | getOptQuestParameterNameTransformers |
Converts mapping {Parameter -> NewName} to pairs
{Pattern_For_Parameter_Name -> NewName}
|
static LinearConstraint | parseLinearConstraint |
Parses expression and if it is linear, returns a result
|
static com.opttek.optquest.COptQuestConstraint | prepareLinearConstraint | |
static com.opttek.optquest.COptQuestStringConstraint | prepareNonLinearConstraint | |
static String | transformExpression |
Applies all patterns to given expression
|
public ConstraintProcessor()
public static LinearConstraint parseLinearConstraint(Collection<OptQuestVariable> optParameters, String expression, ConstraintTypeEnum type, double bound)
Parses expression and if it is linear, returns a result
- Parameters:
optParameters-c-- Returns:
- new
LinearConstraintifcrepresents a valid linear constraint ornullif parsing was unsuccessful
public static List<Pair<Pattern,String>> getOptQuestParameterNameTransformers(Map<OptQuestVariable, String> optQuestParameterNames)
Converts mapping {Parameter -> NewName} to pairs
{Pattern_For_Parameter_Name -> NewName}
- Parameters:
optQuestParameterNames-- Returns:
public static String transformExpression(String expression, List<Pair<Pattern, String>> transformations)
Applies all patterns to given expression
- Parameters:
expression-transformations-- Returns:
public static com.opttek.optquest.COptQuestStringConstraint prepareNonLinearConstraint(Map<OptQuestVariable, String> variables, String expression, ConstraintTypeEnum type, double bound)
public static com.opttek.optquest.COptQuestConstraint prepareLinearConstraint(LinearConstraint linearConstraint) throws com.opttek.optquest.COptQuestException
- Throws:
com.opttek.optquest.COptQuestException