Eliminate Sources Based on Rule

About this task

(Available with Order Execution Mgt.)

Description

Eliminate Sources Based on Rule eliminates or applies a weight to items in the range source if their selection breaks a business rule.

The applied weight is a value that:

  • You entered in the Set Block Weights function block's corresponding parameter.
  • Set Block Weights assigns to this function block.

Overview

A business rule assigns any of the following.
Rule Type For items with the same selected attribute values the rule dictates the:
Group Maximum number of consecutive items.
Spacing Minimum separation between items.
Blocking Minimum number of consecutive items.
Percent Minimum or maximum percentage of the total number of items.
  • If a business rule is violated, the Item is eliminated / weighted, or the Failure is saved as history data. Failed items are eliminated from the range source when a block applies a zero weight.
  • An accurate historical record of the item selections is required.

When you use this block, insert a corresponding Record Attribute function block into your routing or output logic module.

Insert a Record Attribute function block where all item eliminations (by any and all methods) have been completed.

Example

If the Eliminate Sources Based on Rule function block is placed within a Resequence Block Module, then the corresponding Record Attribute function block should be inserted immediately before the Resequence Range block where the selection is processed.

The Eliminate Sources Based on Rule and corresponding Record Attribute function blocks should be configured with the same points and array point names.

Rotation numbers can be assigned to items.

Procedure

  1. Apply a zero weight to Eliminate Sources Based on Rule.
  2. Use  Eliminate Sources Based on Rule within a multiple-pass Resequence Block Module.
    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. Note: When all decisions are eliminated the RCO Output Module, None, is executed to handle this condition.
    Soft Roll back any eliminations made by this extension.
    Breakable If the danger flag is set to:
    TRUE (1) Roll back any eliminations made by this extension.
    FALSE (0) The item remains eliminated even if all items in the range source are eliminated.
    Note: The danger flag is an element of the Breakable array described below.
    Rule Type Array A text array point. Each element in the array must contain a rule type.
    Rule Item is:
    G Eliminated if the Count exceeds or equals the Rule.
    S Eliminated if the Count is less than the Rule.
    B Eliminated if the Count is less than the Rule.
    Example P 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.
    Note: Values in this array are the first letter of the rule. Example Use G ior the element value if the rule is a Grouping rule.
    Attribute Name Array Example A 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:
    1. The function block attempts to match the respective Attribute Value element with a value for that attribute from the current item.
    2. For a matching Attribute Value, the function block compares the respective Count and Rule elements, or the respective release limits and release counts according to the respective Rule Type element (G, S, B or P).
    3. If selecting the current item (incrementing the Count) would violate the rule, the comparison fails for that attribute and the item is either weighted or eliminated. The failure is saved as history data.
    If selecting the current item would not violate this rule, the function block attempts to match the next attribute name/value match.

    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 Example A 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. 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: Vehicle.ChasisType='Heavyduty' 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 Vehicle.ChassisType. $ChassisIs$ can be entered as the value element of this array in the form of a an expression: $ChassisIs$ = 'Heavyduty'
    The parameters below define the business rules that evaluate an item with a matching attribute name/value pair.
    Rule Array (Must be configured if a Grouping, Spacing or Blocking rule is used.) An integer (analog) array point. 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.
    B Minimum count requirement of consecutively selected items that have the same specified attribute name/value.
    Example P Ignored.
    Count Array (Must be configured if Grouping, Spacing or Blocking rules are used.) An array point configured as integer (analog). 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 was 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.
    B The same respective attribute name/value that consecutively follow the current item. This count element is reset to the actual look-back count every pass or control cycle.
    Example P Ignored.
    Upper Release % Limit (Must be configured if Percentage rules are used.) A real or integer (analog) array point. This value is used for percentage rules only:
    Rule Each Element is
    G Ignored.
    S Ignored.
    B Ignored.
    Example P The maximum percent of the Total Release Count that items with the respective attribute name/value are allowed reach.
    Lower Release % Limit (Must be configured if Percentage rules are used.) A 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.
    1. The number of red cars selected has not yet reached the Upper Release % Limit defined for Color/Red.
    2. Selecting the red two-door would cause the percentage of four door cars selected to fall below its defined  Lower Release % Limit
    3. The red, two-door car is eliminated instead of being selected.
    Example 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.
    Attribute Release Count Array (Must be configured if Percentage rules are used.) An integer (analog) 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 A 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.
    Example 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.