Page 447 - ExtendSim User Guide
P. 447

Item Controls Flow model
Unless the presence of an item in an Activity block triggers them to open, Valves 1 and 2 are both closed during the simulation run. While an item is in the Activity block (Item library) labeled Filling Valve 1, it causes Valve 1 to open; this allows the Reception tank to fill. When the item moves to the Activity block labeled Emptying Valve 2, it causes Valve 1 to close and Valve 2 to open. This allows the Reception tank to empty into the Sink tank. The closing and opening of the valves is accomplished by detecting which Activity block has the item and for how long it is held there.
Mixing Flow and Items 421
Controlling flow with items and items with flow
Item Controls Flow model
In this model, constant blocks (Value
library) provide a potential constrain-
ing rate of 100 for the valves. Multiplying the constant value by an Activity’s F (Full) output (which will be 1 if the Activity has the item in it and 0 if it does not) gives the valves their actual constraining rate (100 or 0). This causes the valves to open and close depending on where the item is in the model. Both Activity blocks are set to delay the item for a random amount of time, which represents how long the Reception tank can fill and empty.
Notice that the Reception tank can be full even while the item is still in the Filling Valve 1 activity. Since the tank can’t accept any more flow when it is full, and can’t start emptying until the item moves to the Emptying Valve 2 block, the flow stops before the Filling process has been completed. The next model shows how the Reception tank can let the item know that it is full.
Flow controlling items
The example below illustrates one of ways blocks from the Rate library can be used to control the movement of items in a model.
Discrete Rate

   445   446   447   448   449