Page 345 - ExtendSim User Guide
P. 345

Tips and Techniques 319
Messaging in discrete event models
scheduling but does not show all of the detail of what is happening as the items move through the blocks. For example, the Queue schedules a zero time current event as it moves the item through, but this is not shown in the table.
Messaging in discrete event models
As discussed in “How ExtendSim passes messages in models” on page 612, the ExtendSim architecture allows application messages to be sent from ExtendSim to a model’s blocks and block messages to be passed between blocks.
Discrete event models use the same application messages as do continuous and discrete rate models. The block messages sent between Item library blocks are discussed below.
Block messages
Discrete event blocks have a sophisticated messaging structure for communicating with each other and with blocks in the Value and Rate libraries. These messages can be categorized as:
• Event
• Value connector • Itemconnector • Block-to-block
Event messages
Event messages communicate between the Executive block and Item library blocks in a model. In a discrete event model the simulation clock advances from one event to another. Each time the clock advances, the Executive block sends event messages to the Item library blocks that have associated themselves with that event. There are two types of events: future and current.
• Afutureeventmessageoccurswhenthesimulationclockreachesatimepostedbyablock. For example, when an item enters an activity, the activity will post a future event to the Executive corresponding to the item’s “finished time”. Once the simulation clock has advanced to this future event, the Executive sends an event message to the activity, alerting it that the item has finished processing.
• Acurrenteventmessageoccurswhenablockwantstobeactivatedbeforethesimulation clock advances, but after it has completed its response to another message. For example, a queue will post a current event message to the Executive as it is pulling in items. After all the items have arrived to the queue, the Executive sends a current event message to the queue. This signals the queue to try and push all the items out of the block.
☞ The only blocks in the Value library that post future events are the ones that provide values or perform actions at specific times. Examples are the Clear Statistics block that resets the simu- lation statistics at a scheduled time and the Lookup Table block that provides values at sched- uled times. Other Value library blocks lie dormant during a discrete event simulation unless they receive an activating message (either directly or indirectly through another block) from an Item library block.
Value input and output connector messages
Blocks in a discrete event model send value connector messages either because a new number is needed by an input connector or because the value of an output connector has changed. These messages either request updated information for the input connectors or notify con- nected blocks that the output value has changed.
Discrete Event

   343   344   345   346   347