Constraints Module
Creates, changes, checks and prints the constraints of an order variable and converts the constraints to and from a value range.
Functions and values
| Function or value |
Description
|
Full Usage:
create min incr max vs
Parameters:
Minimum option
-
An optional Minimum
incr : Increment option
-
An optional Increment
max : Maximum option
-
An optional Maximum
vs : ValueSet option
-
An optional ValueSet
Returns: Constraints
|
Create a
|
|
|
Get the fields of a Constraints record
|
|
|
Returns the norm dose when the minimum is 0.9 and the maximum is 1.1 times the same value, as setMinMax stores a norm dose; otherwise None.
|
|
|
|
|
|
Checks whether a Constraints record has only an exclusive minimum of zero.
|
Full Usage:
map fMin fMax fIncr fVals cs
Parameters:
Minimum -> Minimum
-
The function to map the Min
fMax : Maximum -> Maximum
-
The function to map the Max
fIncr : Increment -> Increment
-
The function to map the Incr
fVals : ValueSet -> ValueSet
-
The function to map the Values
cs : Constraints
-
The Constraints record
Returns: Constraints
|
Map the functions, fMin, fMax, fIncr and fVals over the
|
|
Sets the increment between the values the order variable may take. None or an empty ValueUnit removes the increment.
|
Full Usage:
setMax incl vu cs
Parameters:
bool
vu : ValueUnit option
cs : Constraints
Returns: Constraints
|
Sets the maximum, inclusive when incl is true. None removes the maximum.
|
Full Usage:
setMin incl vu cs
Parameters:
bool
vu : ValueUnit option
cs : Constraints
Returns: Constraints
|
Sets the minimum, inclusive when incl is true. None removes the minimum.
|
Full Usage:
setMinMax calcNormDose minMax cs
Parameters:
bool
-
When true, a MinMax with an equal minimum and maximum is a norm dose: the minimum becomes 0.9
and the maximum 1.1 times that value, so the solver has a range to work with
minMax : MinMax
-
The MinMax to take the bounds from
cs : Constraints
-
The Constraints to set the bounds on
Returns: Constraints
|
Sets the minimum and maximum of a MinMax as inclusive bounds. A bound the MinMax does not have is left unchanged.
|
|
Sets the values the order variable may take. None or an empty ValueUnit removes the values.
|
|
Creates a ValueRange from only the Increment and the Maximum of a Constraints record.
|
|
Formats the maximum of a Constraints record as a short Dutch decimal string with precision prec; None when there is no maximum.
|
|
Creates a ValueRange from only the Minimum and the Increment of a Constraints record.
|
Full Usage:
toMinMaxString prec cs
Parameters:
int
-
The precision for decimal values
cs : Constraints
-
The Constraints record
Returns: string
|
Formats the minimum and maximum of a Constraints record as a Dutch string: one value when they are equal or a norm dose, else "min - max". Returns an empty string when a bound is missing.
|
|
Get the string representation of a
val min: obj
val max: obj
val incr: obj
val cs: obj
union case Option.Some: Value: 'T -> Option<'T>
union case Option.None: Option<'T>
|
|
Creates a ValueRange from a Constraints record. A ValueSet, when present, replaces the minimum, maximum and increment.
|
|
Get the string representation of a ValueRange from a Constraints record
|
GenPRES