Batch by Condition
This method of routing in to an Activity tells the Activity to only accept Work Items when a specified set of conditional statements has been met. These conditional statements can reference any property within the simulation via the Formula Editor input, meaning complex decision-making regarding whether an Activity should accept work can be built into your simulation quickly and flexibly.
When an Activity is looking for work from its feeding routes it will check if the set of conditional statements are true before it pulls in a Work Item. When searching for a Work Item the Activity will look anywhere in the simulation objects that feed it (not just at the head of the queue) to check if it is able to find appropriate work.
Note: This feature can not be used in conjunction with the Batch by Type feature.
Setting the Properties
In the Batch by Condition properties, you must set at least one conditional statement and can use the ellipsis button (denoted ‘…’) to open the Formula Editor, enabling you to reference any property within the simulation in the conditional statement. The Conditional Operators that can be used are available from the drop down list and include:
- CONTAINS – used to specify a list or range of values. Lists of values are separated with commas ‘,’ and ranges are signified with a dash ‘-‘. In this way it is possible to input multiple ranges as a list by separating the ranges with commas
- < Less Than
- < = Less Than or Equal To
- = Equal To
- > = Greater Than or Equal To
- > Greater Than
- <> Not Equal To
Adding Multiple Conditions
Adding multiple conditional statements allows complex IF statements to be developed by adding AND/OR statements to the condition, increasing the power and flexibility of this feature. To add an additional condition select the add button, located on the right hand side.
This will create an additional row and a dropdown, use the dropdown to select AND/OR. Selecting AND will check if the primary condition AND the secondary condition are true, only if they are both true will the Activity be able to accept work. Selecting OR will check if the primary condition OR the secondary condition are true, meaning if either of those conditions are true the Activity will be able to accept work. Each additional condition is checked against the set of all previous conditions as a whole.
In the image above, the Activity concerned is looking for Work Items with a Label 1 value of 1 in its primary conditional statement. However, because of the secondary statement it will take any Work Item when Queue 1's contents is greater than 5, reflecting that it does not prioritize work when the queue has built up. Due to the third condition, it will only accept work when one of the first two statements is true AND the Simulation Time is less than 120 time units. If the contents of Queue 1 is 5 or less and there are no Work Items with Label 1 value of 1 then this Activity will be unable to accept work, regardless of the Simulation Time.