|
Objects in this document may appear out of sequence if not viewed with Internet Explorer |
|
ORMSware NMOD Primer: Chapter 6 |
|
| Note: We will look at actual contents of nodes and arcs at a later stage. You may have noticed that objects in networks displayed in Figure 6 window do not have any property content at this point. |
Once a thread comes into existence, it keeps traveling through the network triggering computations until it comes across instructions to wait for some event to happen or until there is no path to go further.
Suspension of a thread (i.e. a thread having to wait) is caused by dwell/duration instruction in a network object it is traversing (i.e. instruction to wait for a given amount of conceptual time, sometimes even if that time is zero), or instruction to wait at the object till some other thread reactivates the suspended thread. Disposal of a thread is caused automatically by nodes with no successor arcs (i.e. when there is no path to go further).
| Note: We will expand on suspension and reactivation of threads in Chapter 13 (Events, execution feedback, and model debugging). |
Getting back to our example, one of the threads we were discussing above will execute [1] and continue along a[9] (unconditionally, with no computational instructions to execute), to n[3]MachineCostPerHour. But, when it reaches n[3], it may get suspended.
Why might it get suspended? Because n[3] is a Convergence node.
Why is n[3] a Convergence node? Because, as you can see per our earlier definition of Convergence nodes, there is at least one AND arc terminating in n[3]. The thread coming along [9] may get suspended, because [9] is an AND arc. This is a good time to point out, however, that if [9] were an OR arc, thread arriving along [9] to [3] will not get suspended, though [3] is a Convergence node. You will see examples of this later in this primer.
Under what circumstances would the thread coming along AND arc [9] get suspended? Since there is one other AND condition that need to be satisfied (i.e. arrival of a matching thread along a[8]), the thread along a[9] will be suspended when it reaches n[3] if that matching thread along a[8] is not already waiting at n[3].
| Note: While both arrive at n[3] at the same conceptual time, because the Duration property of every node and arc along the way in the current version of the model is zero, only one event can occur in real time at any given point during model execution. If this notion seems fuzzy now, it will become quite clear when we look at model execution feedback later in this primer. |
When both AND threads have arrived at n[3], NMOD merges the two threads and executes n[3]. The analyst does have the option to override the default merging process and specify exactly how the threads should be merged. We will cover this topic in Chapter 19 (Reinforcing concepts through PrimerSig's feedback file).
As you can see, n[5] is a Convergence node, too. Its execution takes place in exactly the same fashion as n[3] as described above. When execution of n[5] is finished, NMOD notices that there are no arcs leading out of that node. Since the thread cannot go any further, NMOD disposes off the thread at that point. As there are no other outstanding threads at this point, model execution comes to an end.
In the next chapter on ORMSware entities, you will learn how NMOD uses instances of one of the entity types as "thread-heads" to weave execution threads through ORMSware networks.
|
Click to go to Chapter 5: Execution of Network Type nodes |
|
Click to go to Chapter 7: ORMSware entities |
|
Click to go to Introduction: NMOD Primer |