Page 348 - ExtendSim User Guide
P. 348

322 Tips and Techniques
Messaging in discrete event models
Pulling items
To pull an item, a residence block sends the wants message upstream. This wants message is passed through the passing and decision blocks until it reaches a residence block. If the resi- dence block has an item that is ready to leave, then a needs message is returned. If no item is available, then the residence block rejects the wants message.
Following is an example of pulling an item from an upstream block to a downstream block:
Activity completes processing and sends a “wants” upstream
Passing or No decision block
Item “needs” to Do I have an be taken
No item, “reject” wants
Send wants to next upstream block
Flowchart for how items are pulled
This is only the first step in the process of moving an item. A number of messages follow that propel the item through the network of blocks. More details about those messages can be found in the Developer Reference.
Block-to-block messages
Block-to-block messages update the status of other blocks in the model. Sometimes a block needs to communicate with another block in the model, but there is no direct connection between them. For example, if a change in the shift status occurs, a Shift block needs to notify all of the blocks that reference that shift. These messages are sent ‘through the air’ to the blocks. In most cases, you will not even be aware that these messages are being passed back and forth. The actual operation and context of the message depends on the blocks involved in the conversation.
Discrete Event

   346   347   348   349   350