Page 334 - ExtendSim User Guide
P. 334

Tips and Techniques
Continuous blocks in discrete event models
In this example, the paint
room is represented by two
Activity blocks. The Gate
block will pass the first two
items it receives into the paint
room, then only let a new item
pass when it sees the first item
at its sensor connector. As
each item leaves the paint
room, a new item can enter. Note that the sensor connector doesn’t accept any items; it only views them as an indicator of their position in the model.
☞ Another, more flexible, approach is to use a Resource Pool block to restrict items in a section of the model. This is useful when you need to track statistics on utilization, or if you have mul- tiple flows of items accessing the same physical space.
Connecting to the select connector
Restricting items
The select connector is used to
control the behavior of the Select
Item In and Select Item Out
blocks. If the select connector
gets its value from a Get block,
you should avoid putting Set
blocks, activities, and queues
between the Get block and the
Select block. These blocks can alter the value sent to the select connector or delay the item so that the Select block routes the wrong item.
For instance, the model segment shown at the left of the above screenshot will work properly. The one shown to its right may not work correctly, because the item to be routed may still be in the Activity block.
Continuous blocks in discrete event models
Value library blocks can be considered passive blocks in discrete event models. In most cases, blocks from the Value library will not recalculate unless told to do so by an Item library block. This has important ramifications for the behavior of Value library and other continuous blocks in discrete event models.
When an Item library block needs a new value at one of its value input connectors, it will send a message out that connector to the connected Value library block, requesting a new value. Likewise, when an Item library block has calculated a new value at one of its value output con- nectors, it will send a message to the connected Value library block notifying it of the change. Typically these messages will cause the Value library blocks to recalculate. The messages are then propagated to all other connected Value library blocks.
In discrete event models, most blocks from the Value library typically neither post events to the Executive nor receive event messages from the Executive. Furthermore, Value library blocks do not recalculate on each time step in discrete event models as they do in continuous models. Rather, they are only alerted to recalculate if they receive a message from an Item library block. And most Item library blocks are triggered to action only by the arrival of an item. Com- plications can arise if a Value library block does not get a message from an Item library block when you expect or want it to recalculate.
Safe and unsafe connections to the select connector
Discrete Event

   332   333   334   335   336