Statistical Distribution
A statistical distribution method lets the system make a weighted random selection of records, instead of picking the first or the oldest one. You set up criteria on the method, each with its own weight, and the system uses those weights to calculate the chance that a given record is selected. This is used, for example, to randomly select a number of orderpick orders for verification, with a higher chance for orders that match certain criteria (such as a specific customer or order type).
Method Type
Every statistical distribution method has a Method Type, which determines what kind of record the method selects from and which fields and conditions are available to define it. Currently the only Method Type is WMS Document, which selects from WMS document headers (such as Shipments or Receipts).
Header and lines
A statistical distribution method is set up on the Statistical Distribution Method Card:
- Method Type and Code together identify the method.
- Description is a free text description.
- Table Filter restricts which records the method considers at all, before any weighting is applied. For example, you can filter the WMS Document on a specific Document Type.
- Blocked excludes the method from being used in calculations.
Each method has one or more Distribution Method Lines. Every line is a criterion: if a record meets it, the line's Weight is multiplied into that record's total weight. A record that does not match a line simply does not get that line's weight applied. The final chance of a record being selected is its total weight divided by the sum of all weights.
Each line has a Line Type, which decides what is evaluated and where:
| Line Type | Evaluated against |
|---|---|
| Field (Header) | A field on the header record itself |
| Field (Any Line) | A field on at least one line of the header's document |
| Field (All Lines) | A field that matches on every line of the header's document |
| Condition (Header) | A condition on the header record |
| Condition (Any Line) | A condition that is met on at least one line |
| Condition (All Lines) | A condition that is met on every line |
For a Field line type you fill in the Field and a Value Filter (for example a specific customer number, or a wildcard filter); for a Condition line type you fill in the Condition Code and a Value Filter on the condition's value. Weight is a factor (such as 0.5 or 2), not a percentage: a line with weight 2 doubles the chance of a matching record relative to not matching it.
A method line can be temporarily excluded from the calculation with Blocked, without having to delete it.
Select Multiple
The Select Multiple field on a method line controls whether more than one selected record may share the same value for that line's field. It only applies to Field (Header) lines, and only has an effect when the system selects several records at once (for example, selecting a batch of orders for verification rather than a single order):
| Select Multiple | Effect |
|---|---|
| (blank) | No restriction: multiple selected records may share the same value. |
| Don't Select Again (Value) | At most one selected record may have a given value for the field; once a record with a value has been selected, every other record with that exact value is excluded from further selection. |
| Don't Select Again (Filter) | At most one selected record may fall within the line's Value Filter range; once a record within that filter has been selected, every other record that matches the same filter is excluded from further selection. |
This is useful to spread a selection of multiple records, for example to avoid selecting several orders for the same customer in one verification batch.
Testing a method
On the Statistical Distribution Method Card and Method List, use:
- Test Weight Distribution to calculate and show the weight of every record the method currently applies to, sorted from highest to lowest weight.
- Test Select 10 Documents to let the method actually select 10 records, the same way it would during normal use.
Where it is used
Statistical distribution is used by the Job Queue function Select random documents based on statistical distribution: it selects a given number of documents using a statistical distribution method (optionally after applying a table filter) and then runs a function set on each of them, for example to flag a random sample of orders for orderpick verification.