Objects in this document may appear out of sequence if not viewed with Internet Explorer

ORMSware NMOD hands-on tutorial: Chapter 3


Building ORMSware networks - basics

If you wish to print this document, please set your browser page margins to <= 0.5 inches.

In this chapter you will learn the following (though not necessarily in the order listed):

  • Placing objects from ORMSware stencil in the drawing area
  • Connecting nodes with arcs to show dependencies of quantitative expressions
  • Creating new nodes and arcs from nodes and arcs already in the drawing
  • Visio's object ID assignment approach
  • Aligning objects
  • Constructing a quick, high level model with minimal data entry
  • Entering network properties details of nodes and arcs
  • Purpose of Type property of arcs

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.

Figure 3.1

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.

Figure 3.2

Before making any changes to this file, save it as tFigure1.VSD into c:\ORMSware\Tutorial folder.

Note: Saving ORMSware.VSD by renaming it with the name of the model is the first step in creating a new model.

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.

ORMSware stencil

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:

  1. Drag NetName from the stencil to top left of the drawing page. When you drop the object, its display changes to [1] c:\ORMSware\Tutorial\tFigure1.vsd(p 1 of 1): Network.

  2. Double-click the tab labeled Network at the bottom of the window. Type CostPerPiece and hit Enter. Look up to the NetName object. It has changed to [1] c:\ORMSware\Tutorial\tFigure1.vsd(p 1 of 1): CostPerPiece.

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.

Note: When objects have been deleted in a Visio file, Visio will assign IDs of deleted objects to new objects, reusing deleted IDs in last-out-first-in order. Visio-assigned object IDs are explained in detail in Chapter 2 of the Primer.

On-drop mini dialog box for nodes

To start diagramming Figure 1, drag the Node object from the stencil to the bottom of the drawing area as laid out in Primer Figure 1-Revised window. A node dialog box as shown on the left appears when you drop the object.

The way most people work, there is always a good chance that this dialog box will appear right on top of the object you have dragged on to the drawing area, or on top of another object (if there were one) which you want to keep visible while entering data in the dialog box. You can move the dialog box to look at whatever you need to see to jog your mind of what you were thinking of doing by adding this new node.

 

Figure 3.3

Enter values in text boxes for node properties as shown below (you may want to copy & paste):

Name : WearParameters
Leave the choice for Type property as Normal.
Description
: Get values of WearCoeff, WearExponent
Trans/control : {&S.WearCoeff = 0.1; &S.WearExpon = 1.8}

Note: We do not have to enter any data in dialog boxes that appear as above to construct networks. Any and all necessary data can be entered whenever we want. It is often desirable to keep moving ahead putting together a network, depicting relationships at a high level, without spending too much time on details or neat alignment of the nodes. Chances are one will change the network several times before a model matures to a results-producing stage. You may want to enter Name values of each node so that the network is easy to follow as you proceed.

& 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].

On-drop mini dialog box for arcs

Drag Arc object from the stencil to the drawing area. An arc dialog box appears as shown at left.

Click down arrow on the drop-down list for the Type property and select -->>| (i.e. AND arc). Tab to the Description property box and delete the default description. Hit Enter or click OK. Visio has created a[6], an arc which has been automatically assigned an ID of 6 by Visio.

Figure 3.4

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.

Note: When you try to move an arc as a whole or one of the ends, if you happen to unintentionally click and drag the wrong point on the arc and end up bending it out of shape (you will know when this happens), hit Esc if you have not yet released the mouse button. If the deed is already done, simply undo the deed (click Undo arrow on the tool bar, press Ctrl-Z, or choose Edit-Undo from the main menu).

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.

Note: If a node has at least one AND arc terminating in it, it is automatically considered a Convergence node by NMOD.

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.

Full dialog box for arcs

We want to change the Type property of [7] to AND and delete the default string in the Description property. Double-click [7]. The full arc dialog box appears as shown here.

This is the complete dialog box of an arc. Let us change a[7]'s Type to AND (-->>|). Tab to Description property text box and delete its content. Click OK or hit Enter. Notice that [7] now has a double arrowhead. We have now completed the flows to [3]. The two AND arcs terminating in [3] imply that 2 (two) flows to n[3] must occur to enable calculation of expression(s) in [3].

Properties displayed in dialog boxes for nodes and arcs (network objects) are discussed in NMOD Primer. Please be aware, however, that discussion of network object properties in the Primer is not concentrated in one chapter. The discussion of properties is spread throughout the primer as we evolve a simple example model in Chapter 1 to a model that contains many powerful NMOD concepts by the time we reach the end of the Primer.

Figure 3.5

Full dialog box for nodes

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]...
Name : PiecesPerHour
Description : Get pieces per hour
Trans/control : {#D.PiecesPerHour = @D.PiecesPerHour}

In [3]...
Name : MachineCostPerHour
Description : Calculate machine cost per hour
Trans/control : {#S.MachineCostPerHour = &S.WearCoeff * #D.PiecesPerHour ** &S.WearExpon}...

In [4]...
Name : LaborCostPerHour
Description : Get labor cost per hour
Trans/control : {}...

In [5]...
Name : CostPerPiece
Description : Calculate total cost per piece
Trans/control : {&D.CostPerPiece = (#S.MachineCostPerHour + #S.LaborCostPerHour) / #D.PiecesPerHour}...

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