Minimum Module
Creates an inclusive or exclusive minimum from a single value, compares and restricts minimums, and rounds a minimum up to a multiple of an increment. Raises a solver exception when the ValueUnit does not hold a single value.
Functions and values
| Function or value |
Description
|
||
|
|||
|
Check if either the numerator or denominator of the In theory a Minimum can have a numerator or denominator of any size. However, in practice, this will lead to performance issues. Therefore, we limit the size of the numerator and denominator to a maximum value.
|
||
|
Convert the Unit of a
Example
val min1: obj
val min2: obj
|
||
|
Creates a
|
||
|
|||
|
Checks whether the
|
||
|
|||
Checks whether Minimum is inclusive.
|
|||
|
|||
|
|||
|
Checks whether Note that the fact that a Minimum is inclusive or exclusive must be taken into account.
Example
val min1: obj
val min2: obj
|
||
|
Checks whether Note that the fact that a Minimum is inclusive or exclusive must be taken into account.
Example
val min1: obj
val min2: obj
|
||
|
Checks whether Note that the fact that a Minimum is inclusive or exclusive must be taken into account.
Example
val min1: obj
val min2: obj
|
||
|
Checks whether Note that the fact that a Minimum is inclusive or exclusive must be taken into account.
Example
val min1: obj
val min2: obj
|
||
|
Recalculate the minimum value of a The recalculated minimum is always inclusive as it has to be a multiple of the increment.
Example
val incr: obj
val min: obj
|
||
|
|||
Full Usage:
restrict newMin oldMin
Parameters: Returns: Minimum
The restricted minimum. This is the old minimum if the new minimum
is smaller than the old minimum, or the new minimum if the new minimum
is larger than the old minimum.
|
Restrict an oldMin with a newMin. Effectively this means that the newMin is the new minimum if it is larger than the old minimum.
|
||
|
|||
Full Usage:
toMarkdown isWithUnit prec min
Parameters:
bool
-
whether to print the unit
prec : int
-
The precision
min : Minimum
-
The minimum
Returns: string
|
Get the markdown representation of a
|
||
Full Usage:
toString exact min
Parameters:
bool
-
Print exact or not
min : Minimum
-
The minimum
Returns: string
|
Get the string representation of a
|
||
|
GenPRES