Maximum Module
Creates an inclusive or exclusive maximum from a single value, compares and restricts maximums, and rounds a maximum down 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 Maximum 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 max1: obj
val max2: obj
|
||
|
Create a
|
||
|
|||
|
Checks whether the
|
||
|
|||
Checks whether Maximum is inclusive.
|
|||
|
|||
|
Checks whether Note that the fact that a Maximum is inclusive or exclusive must be taken into account.
Example
val max1: obj
val max2: obj
|
||
|
Checks whether Note that the fact that a Maximum is inclusive or exclusive must be taken into account.
Example
val max1: obj
val max2: obj
|
||
|
Checks whether Note that the fact that a Maximum is inclusive or exclusive must be taken into account.
Example
val max1: obj
val max2: obj
|
||
|
Checks whether Note that the fact that a Maximum is inclusive or exclusive must be taken into account.
Example
val max1: obj
val max2: obj
|
||
|
Recalculate the maximum value of a The recalculated maximum is always inclusive as it has to be a multiple of the increment.
Example
val incr: obj
val max: obj
|
||
|
|||
Full Usage:
restrict newMax oldMax
Parameters: Returns: Maximum
The restricted maximum. This is the old maximum if the new maximum
is greater than the old maximum, or the new maximum if the new maximum
is smaller than the old maximum.
|
Restrict an oldMax with a newMax. Effectively this means that the newMax is the new maximum if it is smaller than the old maximum.
|
||
|
|||
Full Usage:
toMarkdown prec max
Parameters:
int
-
The precision
max : Maximum
-
The maximum
Returns: string
|
Get the markdown representation of a
|
||
Full Usage:
toString exact max
Parameters:
bool
-
Print exact or not
max : Maximum
-
The maximum
Returns: string
|
Get the string representation of a
|
||
|
GenPRES