Logo GenPRES

Total Module

Wraps an order variable as a total, with the name part tot, and applies the order variable functions to it.

Functions and values

Function or value Description

apply f

Full Usage: apply f

Parameters:
Returns: Total -> Total

Apply a function to the OrderVariable in a Total

f : OrderVariable -> OrderVariable
Returns: Total -> Total

applyConstraints

Full Usage: applyConstraints

Returns: Total -> Total

Apply the constraints of a Total to the OrderVariable Variable

Returns: Total -> Total

applyOnlyMaxConstraints

Full Usage: applyOnlyMaxConstraints

Returns: Total -> Total
Returns: Total -> Total

convertFirstUnit u

Full Usage: convertFirstUnit u

Parameters:
Returns: Total -> Total

Convert the first unit of a Total (e.g., mg -> g)

u : Unit
Returns: Total -> Total

create n un

Full Usage: create n un

Parameters:
    n : Name - The Name of the Total
    un : Unit - The Unit of the Total

Returns: Total

Create a Total with name n

n : Name

The Name of the Total

un : Unit

The Unit of the Total

Returns: Total

fromDto dto

Full Usage: fromDto dto

Parameters:
Returns: Total

Create a Total from a Dto

dto : Dto
Returns: Total

fromOrdVar

Full Usage: fromOrdVar

Returns: OrderVariable list -> Total -> Total

Replaces a Total with the OrderVariable of the same name from a list, when the list has one.

Returns: OrderVariable list -> Total -> Total

hasConstraints

Full Usage: hasConstraints

Returns: Total -> bool

Check whether a Total has constraints

Returns: Total -> bool

isNonZeroPositive

Full Usage: isNonZeroPositive

Returns: Total -> bool

Check whether a Total is non-zero positive

Returns: Total -> bool

isSolved

Full Usage: isSolved

Returns: Total -> bool

Check whether a Total is solved

Returns: Total -> bool

isWithinConstraints useCalc

Full Usage: isWithinConstraints useCalc

Parameters:
    useCalc : bool

Returns: Total -> bool

Check whether a Total is within its constraints

useCalc : bool
Returns: Total -> bool

name

Full Usage: name

Returns: string
Returns: string

setToNonZeroPositive

Full Usage: setToNonZeroPositive

Returns: Total -> Total

Set a Total to non-zero positive values

Returns: Total -> Total

toDto

Full Usage: toDto

Returns: Total -> Dto

Create a Dto for a Total

Returns: Total -> Dto

toOrdVar arg1

Full Usage: toOrdVar arg1

Parameters:
Returns: OrderVariable

Get the OrderVariable in a Total

arg0 : Total
Returns: OrderVariable

toString

Full Usage: toString

Returns: Total -> string

Turn a Total to a string

Returns: Total -> string

toStringWithConstraints

Full Usage: toStringWithConstraints

Returns: Total -> string

Get a string representation of a Total (including constraints)

Returns: Total -> string

toValueUnitMarkdown

Full Usage: toValueUnitMarkdown

Returns: int -> Total -> string

Get a ValueUnit Markdown representation of a Total

Returns: int -> Total -> string

toValueUnitString

Full Usage: toValueUnitString

Returns: int -> Total -> string

Get a ValueUnit string representation of a Total

Returns: int -> Total -> string

toValueUnitStringList

Full Usage: toValueUnitStringList

Returns: Total -> string option

Gets the value set of a Total as a Dutch string; None without a value set.

Returns: Total -> string option

Type something to start searching.