Model Description

In this example, we have two objects: a Poisson Source and an Infinite Server Queue. The service event has a uniform distribution . Each message sent by the source and received by the Infinite Server (indicating the arrival of a new packet), generates a new sample of the event Service. Figure [*] presents the model and Figures [*] and [*] show all the attributes of each object.

Figure: Event Cloning Model.
\includegraphics[width=4in]{figuras/clone.eps}

Figure: The ON_OFF Source object (Event Cloning Model).
\includegraphics[width=5in]{figuras/objectclone1.eps}
Figure: The Infinite_Server object (Event Cloning Model).
\includegraphics[width=5in]{figuras/objectclone2.eps}

IMPORTANT It is important to understand how samples of an event are generated when we clone an event. Let us recall how samples are automatically generated by the simulator, when no cloning is used in the model. A new sample is generated whenever: (a) an event is enabled (from a disabled condition) and (b) whenever an event executes, provided that the conditions for the event to occur remain satisfied. Note that only one sample is active at a time. When the clone_ev() executes in an action, the following rule is used to generate a sample :

A new sample is generated after clone_ev() is issued when the current object state is such that the event that will be cloned is enabled and it remains enabled after the action is executed.
One can generate as many samples as specified during the execution of an action.

When cloning is used the simulator only generates automatically a new sample when condition (a) above is true or condition (b) and this is the last sample to execute.

It is also important to note that when the conditions for an event to occur become false, all its samples in the simulator event queue are immediately discarded.

Consider the infinite queue example in this section. When a message is received by object Infinite_Server and the Infinite_Server queue is empty, a sample of the Service event is generated and the event becomes enabled. Note that no other sample of Service is generated, since the clone_ev() command has no effect when the action is executed. This is because the event Service is not enabled when the message is received.

Assume now that the Infinite_Server queue has more than one packet queued, and more than one samples in the event queue. When any of the generated samples triggers, the corresponding action is executed but no other sample is automatically generated, since there are other samples in the simulator event queue. The last sample that triggers resets the state variable serving and the conditions for Service to occur become false. See also the MDk1 example.

Guilherme Dutra Gonzaga Jaime 2010-10-27