How dynamic unit allocation works
Unit selection is done in the context of a unit alias. A unit alias represents one of the units that the recipe requires. Typically several unit procedures can run on the same unit (where the steps are using the same unit alias). When a unit is selected it is assigned to a unit alias. Once a unit is assigned, all unit procedures using that unit alias run on the same unit.
Unit aliases can have one of two selection modes, From_Policy or Defer. The selection mode controls whether the unit selection is performed by the system (From_Policy) or by the operator (Defer).
Unit aliases (in an equipment train class) that are resolved using a unit selection policy (a From_Policy selection mode) must have the policy specified.
Additionally, the initial selection mode (From_Policy or Defer), must be selected for each unit alias in the equipment train class that uses a unit selection policy. This controls what the selection mode is when the batch is created. The operator (with the appropriate key) can change the mode when the batch is created or when rebinding equipment.
The operator needs the key for the BATCH_CHANGE_SELECTION_MODE lock to change the selection mode of a unit alias.
Operator selected units (that is, where the selection mode is Defer) are filtered by the equipment configuration factors. Programmatically allocated units are further processed by the downstream equipment filtering, priority choice sorting and run-time equipment filtering.
Dynamic unit allocation filters the list of all possible units for each unit alias based on the following factors:
Equipment Configuration - Equipment configuration is applied to all unit aliases, regardless of selection mode (Defer or From_Policy)
Downstream Equipment Filtering - Downstream filtering is applied to unit aliases with Defer and From_Policy selection mode. The order of the bullets represents the precedence of the filters.
The unit is valid for the unit alias as defined in the equipment train referenced.
The unit can be resolved to the downstream unit alias' unit class (where downstream unit aliases are configured). That is the unit has the downstream units as required by equipment train configuration.
The unit is configured as downstream of the preceding unit module (where downstream units are configured). That is, the unit is downstream of the assigned upstream unit (for this, there must be a unit alias that has the current (being evaluated) unit alias downstream of it.
Equipment Sorting - Equipment sorting is based on the priority choice in the unit selection policy and is applied after downstream equipment filtering. Equipment sorting is only performed on unit aliases with the From_Policy selection mode. The following choices are available (only one can be selected per unit selection policy):
First Available where the list of units is sorted by the order in the equipment train. If the equipment train does not have an ordered list of units, the list is sorted alphabetically.
Least Recently Used where the list of units is sorted by the $IDLE_TIME parameter value in descending order. $IDLE_TIME is reset when the NUMPHASES parameter is not zero.
Run-Time Equipment Filtering - Run-time equipment filtering is applied only to aliases with From_Policy selection mode. Acquire requests are sent to all possible units and if a unit is not acquired within 10 seconds (the default timeout period), the process is repeated until a unit is acquired. The order of the bullets represents the precedence of the run-time filtering.
The unit selection policy is used to determine valid units during the execution of a recipe. The policy allows units to be discarded from selection based on the evaluation of the expression and applies the priority choice option to the remaining units. The unit selection policy is evaluated one time through the list of possible units (unless the evaluation times out).