Submodels

<< Click to Display Table of Contents >>

Navigation:  Building blocks of QGeNIe > Components of GeNIe models >

Submodels

QGeNIe allows for placing groups of nodes into 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. We advise to make a generous use of submodels in case your models become larger than, say 50 variables. A large number of variables may not fit on the screen and may make the interaction with the model cumbersome. The internals of a submodel, along with its structure can be examined in separation from the entire model.

Creation of submodels, moving nodes, navigating through submodels

To create a submodel in QGeNIe, select Submodel from the Tool Menu or the Submodel (submodel_tool) tool from the Standard Toolbar and click on the Graph View. You will see a new submodel.

submodel_node_new

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 Increased Load and Higher Speed Requirements in the following model. We do this by creating a submodel node, renaming it to Customer Wishes, and then dragging and dropping the nodes Increased Load and Higher Speed Requirements to the new submodel.

submodel_dragging

The resulting model will look as follows:

submodel_dragging_result

Submodels are opened by double-clicking on them. Double-clicking on the submodel Customer Wishes yields the following:

submodel_window_plain

One thing that becomes less clear in submodels is the connections that a submodel has with the external world. QGeNIe does not normally 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 Customer Wishes coming into the node Technical Problems 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:

submodel_window

You can locate the child of this node by right clicking and choosing Locate Child from the Node Pop-up menu:

node_context_menu_locate_child

Alternatively, right-clicking on the small triangle on the right-hand-side shows a pop-up menu with a list of children of the node in other submodels. Both actions lead to finding the node and flashing it on the screen as shown below:

submodel_locate

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 QGeNIe draws a double arrow arc from the submodel to the node as shown above. All the above functions can be also performed through QGeNIe Tree View.

Submodel properties

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.

submodel_popup_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.

General tab

The General tab displays the Identifier and the Name of the submodel, along with the submodel's basic statistics.

submodel_property_general

Identifier displays the identifier for the submodel, which can be modified by the user. Identifiers must start with a letter, and can contain letters, digits, and underscore (_) characters. The identifier for the network shown above is Customer_Wishes.

Name displays the name for the submodel, which is specified by the user when the submodel is first created. There are no limitations on the characters that can be part of the name. The name for the network shown above is Customer Wishes.

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.

Format tab

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.

submodel_property_format

The Format tab allows for specifying the physical appearance of the submodel node in the Graph View. The user can specify the font, its size, border width, the color of the text, border, and interior of the submodel node.

Other submodel operations

Submodel Popup menu is slightly different for the Graph View and the Tree View.

Submodel Pop-up menu for the Graph View

The Submodel Pop-up menu for the Graph View can be displayed by right clicking on the submodel icon in the Graph View.

submodel_popup_menu

Open Submodel opens the submodel in a new Graph View window.

Submodel Properties opens the Submodel Properties sheet.

Propagate Color to Parent allows for passing the color of the node (this includes a submodel) icon to the parent submodel icon. This is useful when we want to summarize the effect of a submodel in one node to which we pass the color of a selected outcome node from inside the submodel.

Locate Color Source is an operation opposite to Propagate Color to Parent and it allows to find the node that is passing its color to the current submodel icon.

Select Color Source is an operation symmetric Propagate Color to Parent and it allows to find the node that will pass its color to the current submodel icon. When selected, the following dialog pops up.

select_color_source_dialog

The list of nodes in the dialog contains all nodes inside the submodel. The can be searched using wildcard characters of * and ?.

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).

Layout submenu

submodel_layout_menu

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.

submodel_popup_menu_tree

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.