Until
Entity And Resource-Related Operation Statement
The Until statement repeatedly executes an action until a specified Boolean expression becomes true.
Syntax
Do <statement> Until <Boolean expression>
Syntax Example
Do
{
Wait 5 sec
}
Until
{
Var1=5
}
Parameters
<statement>
The action to execute.
<Boolean expression>
The true or false condition to evaluate.
Parameter Examples
Suppose you have a model where the second half of your Flow moves a lot faster than your first half. For this reason, you want to let 100 Entities pile up in the first part's last Location (a Storage Location) before allowing them to the second part, since this saves money by not running the second half of your model during that time. You then want the Entities to pass through the Storage Location freely, since the second half of your model is fast enough to process the 100 Entities and all the new Entities that come after without falling behind. To achieve this result, define a Variable to represent how many Entities are in your Storage Location, vStorage. Next, define the statements...
Inc vStorage
Until vStorage > 100 Do Wait 10 min
...in the Storage Location Logic. Every time an Entity enters the Storage Location, the Inc statement increases the value of vStorage. Until vStorage is greater than 100, the Until loop continues to execute, keeping the Entities in the Storage Location due to the Wait statement. Once the vStorage value is 100 or greater, the Until loop no longer executes and the Entities pass through the Storage Location directly after being processed.