Description
Eliminate Decision Based on Rule eliminates decisions based on attribute Grouping and Spacing Rules. This block can be configured to eliminate by either rule and treats both rules with the same priority.
Note: The Always Evaluate parameter is ignored for this function block. This block deals with multiple rules in one call. Therefore there is an array that handles the Always Evaluate flag for each rule.
Following is a basic definition of the rules.
Rule |
Description |
Spacing |
Separates items with matching attributes. |
|
Example Two BLUE items should not be selected consecutively. The Spacing rule can eliminate a decision to select a second consecutive Blue item. |
Grouping |
Limits consecutive blocks of items with a specified attribute. |
|
Example The color combination Blue/Red/Blue should not be selected more than two times consecutively. The Grouping rule can eliminate decisions to select the group after the second consecutive occurrence of the color combination. |
Percentage |
Eliminates a decision if the percentage of attributes released falls below or above a specified percent range. |
|
Example A blue item should not be more than 65% or less than 35% of the total release count. The Percentage rule can eliminate: A decision to select a blue item if it would make blue items 66% and over of the total. Decisions to select non-blue items if selecting them would cause blue items to fall below 35% of the total count. |
Parameters
This function block has the following parameters:
Parameter |
Description |
|||
Always Evaluate |
Hard, soft or Breakable. Controls what happens when the extension eliminates all items in the range source. |
|||
|
Hard |
All items: Will remain eliminated. Enter a wait state after the logic script has completed. |
||
|
Soft |
Roll back any eliminations made by this extension. |
||
|
Breakable |
If the danger flag is set to: |
||
|
|
FALSE (0) |
The item remains eliminated even if all items in the range source are eliminated. |
|
|
|
TRUE (1) |
Roll back any eliminations made by this extension. |
|
|
Note: The danger flag is an element of the Breakable array described below. |
|||
Item Class Array |
Class of the item that contains the attribute, e.g. vehicle, carrier. Blank will specify all items at the region. |
|||
Text array point. Each element in the array must contain a rule type. |
||||
|
Rule |
Decision is: |
||
|
Eliminated if the Count exceeds or equals the Rule. |
|||
|
Eliminated if the Count is less then the Rule. |
|||
|
Eliminated if: The percentage of the total for this attribute would exceed Upper Release % Limit, or The percentage of the total for another percentage rule (defined for a different attribute name/value pair) would fail to reach its Lower Release % Limit. |
|||
Attribute Name Array
|
Text array point. Each element in this array contains the name of an attribute to be paired with an attribute value for evaluation by the respective business rule. For each Attribute Name element:
the respective Count and Rule elements, or the respective release limits and release counts according to the respective Rule Type element (G, S, or P).
If selecting the current item would not violate this rule, the function block attempts to match the next attribute name/value match. Notes An elimination may be rolled back depending on the respective danger flag setting in the Breakable array. Items remain in the range source unless they are eliminated. To compare items that satisfy a named solve (query) or query expression, enter the reserved name SOLVE for this element in the Attribute Name array. (This is instead of the name of an attribute). You can then enter a named query or query expression as the respective element in the Attribute Value array. |
|||
Attribute Value Array
|
Text array point. Each element of this array contains a value to be paired with the respective element in the Attribute Name Array. An element of the array can contain: The value of the respective attribute in the Attribute Name Array. Note: Each element can contain one or multiple values with a comma separator. Do not include quotes. A named query, or query expression, returning a Boolean result. Guidelines For any element of the Attribute Name Array that contains the reserved name SOLVE you can enter a named query, or query expression, as the respective value element. In this case, the respective rule is not applied to an attribute name/value pair, but is instead applied to any items for which the query returns TRUE. Example A Boolean named query $IsATruck$ returns TRUE for items that have a heavy-duty chasis $IsATruck$ is the
query expression: When $IsATruck$ is entered as the value element, a spacing rule can be applied to determine the number of counts required between truck items in a resulting sequence. You can use a query that returns a set of attributes, instead of a Boolean result, by setting the query name or expression to a particular value. Example An attribute named query $ChassisIs$ is the query
expression $ChassisIs$ can be
entered as the value element of this array in the form of a an
expression: |
|||
|
The parameters below define the business rules that evaluate an item with a matching attribute name/value pair. |
|||
(Must be configured if a Grouping, Spacing or Blocking rule is used.) Integer (analog) array point. Number of jobs. The Rule value has a different interpretation for each Rule Type. |
||||
|
Rule |
Dictates the: |
||
|
G |
Maximum count allowed of consecutively selected items that have the same specified attribute name/value. |
||
|
S |
Minimum item count required between items that have the same specified attribute name/value. |
||
P |
Ignored. |
|||
|
(Must be configured if Grouping, Spacing or Blocking rules are used.) Integer array point. Number of jobs released. The Count value has a different interpretation for each Rule Type: |
|||
|
Rule |
Each Element counts the number of selected items that have: |
||
|
G |
The same respective attribute name/value that were consecutively selected immediately before the current item. The count is reset to zero as soon as an item with a different value for the respective Attribute Name is selected. |
||
|
S |
A different value from the specified name/value. The count is reset to zero when the minimum count requirement (S in the Rule array) is reached and the item with the respective value can be selected again. |
||
P |
Ignored. |
|||
Upper Release % Target |
(Must be configured if Percentage rules are used.) Real or integer (analog) array point. This value is used for percentage rules only: |
|||
|
Rule |
Each Element is |
||
|
G |
Ignored. |
||
|
S |
Ignored. |
||
|
P |
The maximum percent of the Total Release Count that items with the respective attribute name/value are allowed reach. |
||
Lower Release % Target |
(Must be configured if Percentage rules are used.) Real or integer (analog) array point. This value is used for percentage rules only: |
|||
|
Rule |
Each Element is |
||
|
G |
Ignored. |
||
|
S |
Ignored. |
||
|
B |
Ignored. |
||
|
P |
The minimum percent of the Total Release Count that items with the respective attribute name/value must reach. |
||
|
|
Example The current item is a red, two-door car.
|
||
|
|
Notes: This evaluation checks the Lower Release % Limit for attributes of all items that remain in the range source for which a percentage rule has been defined. The Eliminate Sources Based on Rule function block is generally used within a multiple-pass Resequence Block Module where a rejected item may be selected by a subsequent pass. |
||
(Must be configured if Percentage rules are used.) Integer array point. Each element of the array contains the total number of selected items that have the same respective attribute name/value. |
||||
Total Release Count point |
(Must be configured if Percentage rules are used.) Integer (analog) point. Counter point stores and continues to increment the total number of items released. |
|||
Breakable Array |
Boolean array point. Each element of the array contains a danger flag. Example |
|||
|
0 = |
Nonbreakable |
||
|
1 = |
Breakable |
||
|
The flag value 1 roll backs eliminations when the respective rule is broken. |
|||
|
Note: The danger flag only has effect for a given rule when Always Evaluate is set to Breakable. A danger state can be set for any attribute name/value pair for which a rule is defined. |
Eliminate Decision Based On rule example. |
|
Eliminate Decision based On rule pseudo code. |
|
Routing function blocks list. |