Logo GenPRES

PerTime Module

Wraps an order variable as a quantity per time, with the name part ptm, and applies the order variable functions to it.

Functions and values

Function or value Description

apply f

Full Usage: apply f

Parameters:
Returns: PerTime -> PerTime

Apply a function to the OrderVariable in a PerTime

f : OrderVariable -> OrderVariable
Returns: PerTime -> PerTime

applyConstraints

Full Usage: applyConstraints

Returns: PerTime -> PerTime

Apply the constraints of a PerTime to the OrderVariable Variable

Returns: PerTime -> PerTime

applyOnlyMaxConstraints

Full Usage: applyOnlyMaxConstraints

Returns: PerTime -> PerTime
Returns: PerTime -> PerTime

convertFirstUnit u

Full Usage: convertFirstUnit u

Parameters:
Returns: PerTime -> PerTime

Convert the first unit of a PerTime (e.g., mg/kg/day -> g/kg/day)

u : Unit
Returns: PerTime -> PerTime

convertTimeUnit u

Full Usage: convertTimeUnit u

Parameters:
Returns: PerTime -> PerTime

Convert the time unit of a PerTime (e.g., mg/kg/day -> mg/kg/week)

u : Unit
Returns: PerTime -> PerTime

create n un tu

Full Usage: create n un tu

Parameters:
    n : Name - The Name of the PerTime
    un : Unit - The Unit of the PerTime
    tu : Unit - The Time Unit of the PerTime

Returns: PerTime

Create a PerTime with name n

n : Name

The Name of the PerTime

un : Unit

The Unit of the PerTime

tu : Unit

The Time Unit of the PerTime

Returns: PerTime

fromDto dto

Full Usage: fromDto dto

Parameters:
Returns: PerTime

Create a PerTime from a Dto

dto : Dto
Returns: PerTime

fromOrdVar

Full Usage: fromOrdVar

Returns: OrderVariable list -> PerTime -> PerTime

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

Returns: OrderVariable list -> PerTime -> PerTime

hasConstraints

Full Usage: hasConstraints

Returns: PerTime -> bool

Check whether a PerTime has constraints

Returns: PerTime -> bool

isNonZeroPositive

Full Usage: isNonZeroPositive

Returns: PerTime -> bool

Check whether a PerTime is non-zero positive

Returns: PerTime -> bool

isSolved

Full Usage: isSolved

Returns: PerTime -> bool

Check whether a PerTime is solved

Returns: PerTime -> bool

isWithinConstraints useCalc

Full Usage: isWithinConstraints useCalc

Parameters:
    useCalc : bool

Returns: PerTime -> bool

Check whether a PerTime is within its constraints

useCalc : bool
Returns: PerTime -> bool

name

Full Usage: name

Returns: string
Returns: string

setNthValue nth

Full Usage: setNthValue nth

Parameters:
    nth : int

Returns: PerTime -> PerTime

Set the variable to its nth value, counted from 0.

nth : int
Returns: PerTime -> PerTime

setToNonZeroPositive

Full Usage: setToNonZeroPositive

Returns: PerTime -> PerTime

Set a PerTime to non-zero positive values

Returns: PerTime -> PerTime

toDto

Full Usage: toDto

Returns: PerTime -> Dto

Create a Dto for a PerTime

Returns: PerTime -> Dto

toOrdVar arg1

Full Usage: toOrdVar arg1

Parameters:
Returns: OrderVariable

Get the OrderVariable in a PerTime

arg0 : PerTime
Returns: OrderVariable

toString

Full Usage: toString

Returns: PerTime -> string

Turn a PerTime to a string

Returns: PerTime -> string

toStringWithConstraints

Full Usage: toStringWithConstraints

Returns: PerTime -> string

Get a string representation of a PerTime value (including constraints)

Returns: PerTime -> string

toValueUnitMarkdown

Full Usage: toValueUnitMarkdown

Returns: int -> PerTime -> string

Get a ValueUnit Markdown representation of a PerTime

Returns: int -> PerTime -> string

toValueUnitString

Full Usage: toValueUnitString

Returns: int -> PerTime -> string

Get a ValueUnit string representation of a PerTime

Returns: int -> PerTime -> string

toValueUnitStringList

Full Usage: toValueUnitStringList

Returns: PerTime -> string option

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

Returns: PerTime -> string option

Type something to start searching.