OrderProcessor Module
Processes an order by a command, as an action of the order program or through a pipeline of solve steps. A failure returns the order with the solver messages; a refusal by the order program that is not a failed solve returns the order with no messages.
Types and nested modules
| Type/Module | Description |
|
Returns the solver messages of a failed solve, and an empty list for any other action failure. |
|
|
Returns the value a choice selects from the current range of an order variable. Returns a failure when the choice is not allowed or finds no value. |
|
|
Maps an order command or a property command to the action of the order program. Returns None for a command that the pipeline processes. |
|
|
Searches for complete orders, in which every variable has one value and every equation holds, and drops the values that a search proves no complete order reaches. The search fixes the free variables one at a time and solves the order for the minimum and the maximum after each value, so values that the equations then rule out are removed before the search tries them. |
|
|
Returns the effects of an action on an order and runs the action, once per combination of concentrations when a component has several concentrations. |
|
|
Tells whether a condition, such as a dose with a single value for every variable, holds on an order. |
|
|
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. |
|
|
Finds the order variable that a reference names, tells whether the variable is basic for a schedule and lists the adjusted and the invariant variables. |
|
|
Returns the effects of each recipe, a step or percentile on a variable or a recalculation, and returns the recalculation recipe for a variable on the schedule of an order. |
|
|
Sets an order variable back to a target range, such as its calculated constraints, its defined constraints or any positive value. |
|
|
Decides what a choice on an order variable runs: no command, a command that sets only the value, or a recipe before the value. |
|
|
|
|
|
The state of an order that the guards of the pipeline steps read to decide whether a step runs. |
|
|
The schedule kind of an order, used to classify the order for the pipeline steps. |
|
|
A pipeline step with a name, a guard that decides from the order state whether the step runs, and a run function that returns the processed order, or the order and the solver messages. |
Functions and values
| Function or value |
Description
|
|
|
|
|
Full Usage:
processChangeProperty logger cmd ord
Parameters:
Logger
cmd : ChangePropertyCommand
ord : 'a
Returns: 'a
Type parameters: 'a |
Returns the order unchanged. Logs a warning for ComponentInStock, which is not implemented; the order program runs the other property commands.
|
Full Usage:
processCommandWith caps logger cmd
Parameters:
ValueCaps
logger : Logger
cmd : OrderCommand
Returns: Result<Order, (Order * GenSolverExceptionMsg list)>
|
Runs the pipeline steps of the command, without the order program. The caps give the maximum number of values a pruned variable keeps, per schedule. Returns the processed order, or the order and the solver messages of the failed step. Throws an ArgumentException for a command that the order program runs.
|
|
|
|
Active patterns
| Active pattern |
Description
|
|
GenPRES