|
Objects in this document may appear out of sequence if not viewed with Internet Explorer |
|
ORMSware NMOD hands-on tutorial: Chapter 3 |
|
In this chapter you will learn the following (though not necessarily in the order listed):
Let us start by constructing the network depicted in Figure 1-Revised window in Chapter 2 of the Primer. If you have not already read at least through Chapter 2 in the Primer, we recommend that you do so now and come back here to continue. If UltraEdit for ORMSware browsing is not up, please bring it up as you did in Chapter 2. When you brought up Visio in Chapter 2, we asked you to close the c:\ORMSware\ProgramFiles\ORMSware.VSD that was automatically loaded. Please reload c:\ORMSware\ProgramFiles\ORMSware.VSD now. Top portion of the Visio window should now look as shown in Figure 3.1 below.
Move the mouse over the ORMSware stencil title bar at the top left corner of the drawing area. The green stencil will pop down as shown below in Figure 3.2.
Before making any changes to this file, save it as tFigure1.VSD into c:\ORMSware\Tutorial folder.
Click here to display Figure 1-Revised from the Primer so that it will be there to help us place objects in tFigure1.VSD as we construct that network.
The ORMSware stencil contains all objects necessary for building ORMSware networks. Objects in the stencil should be self-explanatory, except perhaps the NetName object. To discover what NetName does, do the following:
Visio does not automatically print page (network) names on diagrams. Therefore, it is a good idea to place a Net name object on each page in a model. It is very helpful while looking at printouts of models with multiple networks, and while projecting a model's networks on to large screens during briefings. The light gray 1 in square brackets indicates the object number automatically assigned to this Net name object by Visio. p 1 of 1 indicates that this object is on page 1 of 1 in tFigure1.VSD file. Since we want to duplicate Primer Figure 1 here as is, let us remove Net name object from our diagram for now. The reason is that we would like to keep the ID of each object the same as in Primer Figure 1-Revised. If we keep the Net name object in the diagram, Visio will give the first node we create an object ID of 2 instead of 1.
Enter values in text boxes for node properties as shown below (you may want to copy & paste): Name : WearParameters
& in &S.WearCoeff and &S.WearExpon above indicate that they are Global property variables in the model. S before the period indicates that the variable is of data type S. On a PC, data type S will be a single precision real/floating point number). Global properties and data types are explained in detail in Primer Chapters 10 (System, Global, and entity properties) and 11 (Notations of properties) respectively. Drag 4 more Node objects to the drawing area and position them in the same pattern as in Primer Figure 1. You can also create those 4 node objects by duplicating the existing node on the diagram (select it, press Ctrl-D and then click OK or hit Enter; repeat Ctrl-D and OK/Enter 3 more times). Dialog boxes will open each time you drag a node to the drawing area from the stencil, or duplicate one already on the drawing, but we will not enter data in them at this point. Just click OK or hit Enter to close the dialog boxes as they appear. Since we are not entering any data in those nodes, they will have no unique names, but we can use their object IDs to identify them. To align nodes in a network (i.e. on a page) either horizontally or vertically, click on an anchor node (i.e. a node you wish to use as reference point to align other nodes). Then, while keeping the Shift key down, select other nodes to be aligned with the anchor node. To deselect a node from the set keep the Shift key down while clicking that node. Hit F8 to bring up the alignment dialog box, choose desired alignment and click OK. You can move a node after selecting it by using arrows on the keyboard. Shift-right-arrow [for example] will move a node to the right in finer increments than just the right arrow without the Shift key down. We asked you to create 4 more nodes so that we can get to the point of creating arcs in the model while keeping object IDs of nodes consistent with Primer Figure 1. The first arc we want to create is the one connecting n[1] to n[3] to communicate to anyone looking at the model that expression(s) in n[3] depend(s) on expression(s) in n[1].
Connect the tail end of the arc to the right side of n[1] and its head to the bottom side of n[3]. Notice that when you drag the tail over the side of a node, red squares appear at various points. These are glue points on the node to which the arcs head/tail can be attached. You can pick whichever glue point you would like, but to match the diagram you are constructing to Primer Figure 1-Revised, let us stick to the midpoints of node sides.
We have now stated graphically that whatever we compute in n[3] is/are dependent on &S.WearCoeff and &S.WearExpon. The double arrowhead of a[6] indicates that it is an AND arc. By defining a[6]'s Type as AND, we have implicitly defined n[3] to be a Convergence node.
Let us now create an arc from n[2] to n[3]. To do that drag & drop Arc object from ORMSware stencil on to the drawing area. Click OK button in the dialog box. The new arc is a[7]. Connect [2] to [3] using [7]. Notice that the arc has only a single arrowhead. This implies that a[7] is an OR arc.
Now that you have seen how networks can be put together quickly without entering all of the details, let us go ahead and enter some basic information in the four remaining nodes. When you double-click on any of the nodes, a full node dialog box similar to the arc dialog box above will open. Enter data for the remaining nodes as follows: In [2]... In [3]... In [4]... In [5]... We can now create arcs 8 and 9 by duplicating arc 6 or arc 7. This time let us use another method for duplicating an object. Select [6]. While keeping Ctrl key down, drag it and drop it anywhere. The on-drop mini dialog box for arcs will appear. Since the contents of [8] needs to be no different from those of [7], just hit Enter. You will see that an arc with Visio object ID of 8 has been created. Repeat the process to create a[9]. Connect [3] to [5] with [8] and [4] to [5] with [9]. The model we will build in the next chapter is named Primer, shown in Chapter 12 of the Primer (Working with Visio interface and NET file). Node and arc numbers in that model are a little different than the one in tFigure1.VSD. So, we will start with this model in the next chapter and reconstruct it to parallel the Primer model. So, let us save tFigure1.VSD into c:\ORMSware\Tutorial\Chapter4.
|
|
Click to go to Chapter 2: Quick hands-on tour of the NMOD modeling process |
|
Click to go to Chapter 4: Building ORMSware networks - beyond basics |
|
Click to go to Introduction and table of contents |