|
Objects in this document may appear out of sequence if not viewed with Internet Explorer |
|
ORMSware NMOD Primer: Chapter 8 |
|
|
Note:
If there are Arrival nodes in a network, there must be at least one Departure
node for customers to leave the system. Otherwise, each arrival will stay
in the system, retaining a piece of
computer memory (space for Customer Token properties, and for properties of
related surrogates). If the number of arrivals is sufficiently large, a
model can cause out of memory condition unless there is at least one
Departure node for the arrivals to leave the system being modeled. This is comparable to memory leak in programming, but a much easier problem to detect. Problems of missing Departure nodes always surface quickly during early stages of model development, since in virtually every problem with customer arrivals there are natural matching departures that would be hard to miss. Also, at every Departure node NMOD checks the Surrogate Count property of the token being returned to make sure there are no stray surrogates associated with that token still remaining in the system. If there are, NMOD issues a warning before continuing execution. |
A surrogate is always related to a token. Default Token ID of a surrogate is 0. For example, as explained earlier, when NMOD creates the very first surrogate to be placed on the Start node of a model, that surrogate's Token ID is set to the default value of 0.
When a surrogate enters an Arrival node, it triggers NMOD's Arrival procedure. For the very first Arrival node occurrence, if the Surrogate ID is (say) 4 with default Token ID and default Customer ID, the surrogate's Name will be S4-T0-C0. When S4-T0-C0 evokes the Arrival node, NMOD does the following:
NMOD maintains a linked-list to track existing tokens. The token that will be available to the next customer will always be the token that was returned most recently by a previous customer. If all previously created tokens are in use, NMOD creates a new token for the new customer.
| Note: Knowing such technical details is not necessary to start using NMOD. However, they are handy while debugging models during development. Analysts can also leverage knowledge of these details at times to develop clever models without sacrificing clarity and transparency, which are two key factors that motivated the creation of ORMSware. |
NMOD also maintains a similar linked-list to track existing surrogates. If there are previously created surrogates not in use whenever a surrogate is needed, the most recent surrogate that came out of circulation will be the one that is called in for action. It may be assigned to a token, or its Token ID property may be given the default Token ID of 0.
When a surrogate finishes a Departure node, the implication is that its customer is leaving the system. But, before leaving the system, the customer returns the token it was given when it entered the system. At that point, NMOD does the following:
| Note: That SignalTarget property is not executed until after Departure procedure is executed is critical. If a Departure node's SignalTarget property is executed before the Departure procedure, a customer that is supposed to have departed could show up later due to some event created by its SignalTarget property. If this does not quite sink in right now, do not be concerned. It will become obvious as you formulate a few problems with NMOD. |
|
Click to go to Chapter 7: ORMSware entities |
|
Click to go to Chapter 9: Creation, assignment and disposal of tokens and surrogates |
|
Click to go to Introduction: NMOD Primer |