<< Click to Display Table of Contents >> Navigation: Building blocks of GeNIe > Components of GeNIe models > Submodels |
Submodels are special types of nodes that host sub-graphs of the entire graph and make the Graph View structured hierarchically. Submodeling facilitates modularity in large models. The internals of a submodel, along with its structure can be examined in separation from the entire model.
To create a submodel in GeNIe, select Submodel from the Tools Menu or the Submodel () tool from the Standard Toolbar and click on the Graph View. You will see a new submodel.
Submodel windows can be opened by double-clicking on the Submodel icon or right-clicking on the submodel icon and choosing Open Submodel from the Submodel properties menu.
Nodes can be moved between submodels by selecting them in the source submodel, dragging, and dropping them in the destination submodel. For example, we might want to create a submodel for the variables Success and Forecast in the influence diagram model used in the Creating an influence diagrams section. We do this by creating a submodel node, renaming it to Risks, and then dragging and dropping the nodes Success of the venture and Expert Forecast to the new submodel.
The resulting model will look as follows:
Submodels are opened by double-clicking on them. Double-clicking on the submodel Risks yields the following:
One thing that becomes less clear in submodels is the connections that the submodel has with the external world. GeNIe does not show arcs that are coming from outside or that go to the outside world. It does let the user know that there are such connections. First of all, by showing these connections as coming into the submodel node (note the arcs from the submodel node Risks coming into the nodes Invest and Gain at the main model level). It also adds small triangle-shaped marks on the left and right sides of the internal submodel nodes showing that there are incoming and outgoing arcs respectively. The user can examine these connections by placing the cursor over the small triangle. This will display the name of the child of the node in another submodel as follows:
You can locate the child of this node by right clicking and choosing Locate Child from the Node Pop-up menu. Select the appropriate name from the Locate Child sub-menu to flash the child on the screen as shown below:
It is possible to add arcs between nodes that are located in different submodels in the very same way that arcs are added between nodes in the same submodel. When more than one arc is drawn between a submodel and a node, then GeNIe draws a double arrow arc from the submodel to the node as shown below:
All the above functions can be also performed through GeNIe Tree View. The above model is included among the example models as VentureEVPISub.
Submodel properties sheet can be displayed by right clicking on the name of the submodel in the Tree View or right clicking on the submodel icon in the Graph View. This will display the Submodel Pop-up menu. Select Submodel Properties from the menu.
Note : Double clicking on the submodel will open the graph view of the submodel, it will not open the Submodel properties sheet.
The Submodel properties sheet consist of two tabs: General and Format. The General tab allows to change the identifier and the name of the submodel, the Format sheet allows to change the graphical properties of the submodel icon and is identical to the property sheet described in node property sheets.
The General tab displays the Identifier and the Name of the submodel, along with the submodel's basic statistics.
Identifier displays the identifier for the submodel, which is user-specified. Identifiers must start with a letter, and can contain letters, digits, and underscore (_) characters. The identifier for the network shown above is Blood_work.
Name displays the name for the submodel, which is user-specified. There are no limitations on the characters that can be part of the name. The name for the network shown above is Blood work.
The Objects in the submodel lists counts of various types of objects and numerical parameters in the submodel. They give an idea of the submodel's complexity.
The Format tab allows to modify the visual properties of the submodel icon, i.e., how the submodel icon is displayed in the Graph View.
The Format tab is similar in function to the Format tab of the Node properties sheet.
Submodel Popup menu is slightly different for the Graph View and the Tree View.
The Submodel Pop-up menu for the Graph View can be displayed by right clicking on the submodel icon in the Graph View.
Open Submodel opens the submodel in a new Graph View window.
Submodel Properties opens the Submodel Properties sheet.
Rename allows you to rename the submodel by placing the submodel icon in edit mode. You can also rename a submodel by modifying the Name field in Submodel Properties sheet.
Delete deletes the selected submodel.
Resize to Fit Text resizes the submodel icon so that it fits the entire submodel name.
Annotation... opens up the annotation dialog so that you can add an annotation to the submodel (see Annotations section for more information).
Most of the commands on the Layout submenu are the same as those in the Layout menu. The only commands here that are not found in the Layout menu are:
Make Same Size (enabled only if two or more items are selected in the Graph View) resizes the selected items so that they are the same size as the item that was right clicked.
Make Same Width (enabled only if two or more items are selected in the Graph View) resizes the selected items so that they are the same width as the item that was right clicked.
Make Same Height (enabled only if two or more items are selected in the Graph View) resizes the selected items so that they are the same height as the item that was right clicked.
Submodel Popup menu for the Tree View
The Submodel pop-up menu for the Tree View can be displayed by right clicking on the submodel name.
The two commands that are not available in the Graph View are:
Locate locates the submodel in the Graph View of its parent model or submodel. Once located, the submodel icon flashes several times on the screen to attract user attention.
Sort Items sorts the list of nodes or submodels of the current submodel listed in the tree view in alphabetical order.