Logo GenPRES

OrderEffect Module

Runs the effects of an action on an order, such as setting a variable back, selecting a value or solving the order. A failed effect returns the order as it was before the effect.

Functions and values

Function or value Description

apply caps logger effect ord

Full Usage: apply caps logger effect ord

Parameters:
Returns: Result<Order, (Order * ActionFailure)>

Runs one effect. A failure returns the order as it was before the effect, not the partly solved order of a failed solve.

caps : ValueCaps
logger : Logger
effect : OrderEffect
ord : Order
Returns: Result<Order, (Order * ActionFailure)>

applyEffect caps logger effect ord

Full Usage: applyEffect caps logger effect ord

Parameters:
Returns: Result<Order, (Order * ActionFailure)>

Runs one effect; a failure returns the order the effect failed on.

caps : ValueCaps
logger : Logger
effect : OrderEffect
ord : Order
Returns: Result<Order, (Order * ActionFailure)>

enumerate caps logger cap rate original ord

Full Usage: enumerate caps logger cap rate original ord

Parameters:
Returns: Result<Order, (Order * ActionFailure)>

Turns the basic variables into value lists with the cap; WithoutRate leaves the rate out. The lists include the values of the original order.

caps : ValueCaps
logger : Logger
cap : ValueCap
rate : RateList
original : Order option
ord : Order
Returns: Result<Order, (Order * ActionFailure)>

forConcentration ord effs

Full Usage: forConcentration ord effs

Parameters:
Returns: OrderEffect list

Adapts the effects to the order of one combination of concentrations. An enumerate effect includes the values of the original order only when they belong to that combination, so a value of one concentration is not included in another.

ord : Order
effs : OrderEffect list
Returns: OrderEffect list

ofSolve result

Full Usage: ofSolve result

Parameters:
Returns: Result<'a, ('b * ActionFailure)>
Type parameters: 'a, 'b

Maps the error of a solve or calculation to SolveFailed with the solver messages, together with the order it failed on.

result : Result<'a, ('b * Message list)>
Returns: Result<'a, ('b * ActionFailure)>

rateValues caps logger cap selection original ord

Full Usage: rateValues caps logger cap selection original ord

Parameters:
Returns: Result<Order, (Order * ActionFailure)>

Makes the rate list of a timed or once timed order whose dose quantity has one value and whose rate is a range. With SelectMedianRate, a rate that became a list is set to its median and the order is solved.

caps : ValueCaps
logger : Logger
cap : ValueCap
selection : RateSelection
original : Order option
ord : Order
Returns: Result<Order, (Order * ActionFailure)>

recordsConstraints effects

Full Usage: recordsConstraints effects

Parameters:
Returns: bool

Returns true when an effect records or recalculates the calculated constraints.

effects : OrderEffect list
Returns: bool

run caps logger effects ord

Full Usage: run caps logger effects ord

Parameters:
Returns: Result<Order, (Order * ActionFailure)>

Runs the effects in sequence; the first failure stops them.

caps : ValueCaps
logger : Logger
effects : OrderEffect list
ord : Order
Returns: Result<Order, (Order * ActionFailure)>

setBackNames ord effects

Full Usage: setBackNames ord effects

Parameters:
Returns: Set<Name>

Returns the names of the variables that the effects set back.

ord : Order
effects : OrderEffect list
Returns: Set<Name>

setsBack ord effect

Full Usage: setsBack ord effect

Parameters:
Returns: Result<(Set<Name> * SetBackTo) option, (Order * ActionFailure)>

Returns the names of the variables that the effect sets back, with the target. Returns None for an effect that sets nothing back, and NoSuchVariable for a reference the order does not have.

ord : Order
effect : OrderEffect
Returns: Result<(Set<Name> * SetBackTo) option, (Order * ActionFailure)>

solve logger mode ord

Full Usage: solve logger mode ord

Parameters:
Returns: Result<Order, (Order * ActionFailure)>

Solves the order for min and max, or with values, as the mode says.

logger : Logger
mode : SolveMode
ord : Order
Returns: Result<Order, (Order * ActionFailure)>

undetermined kept stays ord

Full Usage: undetermined kept stays ord

Parameters:
Returns: Set<Name>

Returns the names of the variables that the variables in kept do not determine, without the variables in stays.

kept : OrderVariableReference list
stays : OrderVariableReference list
ord : Order
Returns: Set<Name>

withVar ovarRef ord f

Full Usage: withVar ovarRef ord f

Parameters:
Returns: Result<'a, (Order * ActionFailure)>
Type parameters: 'a

Applies f to the variable that the reference names. Returns NoSuchVariable when the order has no such variable.

ovarRef : OrderVariableReference
ord : Order
f : OrderVariable -> Result<'a, (Order * ActionFailure)>
Returns: Result<'a, (Order * ActionFailure)>

Type something to start searching.