Adding a Looping Control Strategy
A looping control strategy provides the Simulation engine with the necessary mechanism to break out of loops:
MaxLoopCountStrategy
This strategy allows sequence flow to traverse a loop up to the specified maximum number of times.
<simulation:LoopControl> <simulation:MaxLoopCountStrategy> <simulation:DecisionActivity>5</simulation:DecisionActivity> <simulation:ToActivity>8</simulation:ToActivity> <simulation:MaxLoopCount>5</simulation:MaxLoopCount> </simulation:MaxLoopCountStrategy> </simulation:LoopControl>
NormalDistributionStrategy
This strategy allows sequence flow to traverse a loop based on a normal distribution of times (which you specify by providing the mean and standard deviation).
<simulation:LoopControl> <simulation:NormalDistributionStrategy> <simulation:DecisionActivity>5</simulation:DecisionActivity> <simulation:ToActivity>8</simulation:ToActivity> <simulation:Mean>2.0</simulation:Mean> <simulation:StandardDeviation>0.5</simulation:Standard Deviation> </simulation:NormalDistributionStrategy> </simulation:LoopControl>
Attribute | Notes |
---|---|
DecisionActivity | Specifies the activity that will be used to decide whether to end the loop. |
ToActivity | Specifies the activity to proceed with once the loop is finished. |
Mean | Specifies the mean used to construct the normal distribution. |
StandardDeviation | Specifies the standard deviation used to construct the normal distribution. |
MaxElapseTimeStrategy
This strategy allows sequence flow to traverse a loop for an elapsed period of time.
<simulation:LoopControl> <simulation:MaxElapseTimeStrategy> <simulation:DecisionActivity>5</simulation:DecisionActivity> <simulation:ToActivity>8</simulation:ToActivity> <simulation:DisplayTimeUnit>MINUTE</simulation:DisplayTimeUnit> <simulation:MaxElapseTime>10.0</simulation:MaxElapseTime> </simulation:MaxElapseTimeStrategy> </simulation:LoopControl>
Attribute | Notes |
---|---|
DecisionActivity | Specifies the activity that will be used to decide whether to end the loop. |
ToActivity | Specifies the activity to proceed with once the loop is finished. |
DisplayTimeUnit | Specifies the unit in which the elapsed time is measured. Valid values include YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND. |
MaxElapseTime | Specifies the elapsed time in which you want the loop to finish. |
Copyright © Cloud Software Group, Inc. All rights reserved.