Constraint Module
Orders constraints by priority, applies a constraint to the matching variable in a list of equations and solves the equations. Raises a solver exception when no variable matches.
Functions and values
| Function or value |
Description
|
Full Usage:
apply log c eqs
Parameters:
Logger
-
The logger
c : Constraint
-
The constraint
eqs : Equation list
-
The list of Equations
Returns: Variable
The variable the constraint is applied to
|
Apply a constraint to the matching variables in the list of equations.
|
|
Check whether constraint c1 has the same name as constraint c2.
|
Full Usage:
orderConstraints log cs
Parameters:
Logger
-
The logger to log operations
cs : Constraint list
-
The list of constraints
Returns: Constraint list
|
Order constraints based on their score.
|
|
Give a constraint a score based on the property. Low scores should be solved first.
|
Full Usage:
solve onlyMinIncrMax log sortQue c eqs
Parameters:
bool
-
Whether only min incr max should be calculated
log : Logger
-
The logger
sortQue : bool -> Equation list -> (int * Equation) list
-
The algorithm to sort the equations
c : Constraint
-
The constraint
eqs : Equation list
-
The list of Equations
Returns: Result<Equation list, (Equation list * Message list)>
|
Apply a constraint to the matching variables and solve the list of equations.
|
|
GenPRES