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
|
Full Usage:
apply caps logger effect ord
Parameters:
ValueCaps
logger : Logger
effect : OrderEffect
ord : Order
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.
|
Full Usage:
applyEffect caps logger effect ord
Parameters:
ValueCaps
logger : Logger
effect : OrderEffect
ord : Order
Returns: Result<Order, (Order * ActionFailure)>
|
Runs one effect; a failure returns the order the effect failed on.
|
Full Usage:
forConcentration ord effs
Parameters:
Order
effs : OrderEffect list
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.
|
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.
|
Full Usage:
rateValues caps logger cap selection original ord
Parameters:
ValueCaps
logger : Logger
cap : ValueCap
selection : RateSelection
original : Order option
ord : Order
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.
|
|
Returns true when an effect records or recalculates the calculated constraints.
|
Full Usage:
run caps logger effects ord
Parameters:
ValueCaps
logger : Logger
effects : OrderEffect list
ord : Order
Returns: Result<Order, (Order * ActionFailure)>
|
Runs the effects in sequence; the first failure stops them.
|
Full Usage:
setBackNames ord effects
Parameters:
Order
effects : OrderEffect list
Returns: Set<Name>
|
Returns the names of the variables that the effects set back.
|
Full Usage:
setsBack ord effect
Parameters:
Order
effect : OrderEffect
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.
|
|
|
Full Usage:
undetermined kept stays ord
Parameters:
OrderVariableReference list
stays : OrderVariableReference list
ord : Order
Returns: Set<Name>
|
Returns the names of the variables that the variables in kept do not determine, without the variables in stays.
|
Full Usage:
withVar ovarRef ord f
Parameters:
OrderVariableReference
ord : Order
f : OrderVariable -> Result<'a, (Order * ActionFailure)>
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.
|
GenPRES