Difference between revisions of "Action Synchronization"

From Mobius Wiki
Jump to: navigation, search
(Created page with "=== <span style="font-size:110%">Replicate/Join</span> === This section begins with an overview of the Replicate/Join composed model formalism as well as definitions of terms...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=== <span style="font-size:110%">Replicate/Join</span> ===
+
=== <span style="font-size:110%">Action Synchronization</span> ===
  
This section begins with an overview of the Replicate/Join composed model formalism as well as definitions of terms that will be used throughout the section. Then, the different parts of the Replicate/Join composed model formalism and the way they can be used to build a composed model will be described.
+
This section covers the overview of the Action Synchronization formalism supported in Möbius. It includes a brief description of the different parts of the Action Synchronization model editor and basic steps to build a composed model with this formalism.
  
 
==== <span style="font-size:106%">''Overview''</span> ====
 
==== <span style="font-size:106%">''Overview''</span> ====
  
The Replicate/Join composed model formalism was originally conceived for SAN models<ref name=Sanders:SAIC:91>W. H. Sanders and J. F. Meyer. Reduced base model construction methods for stochastic activity networks. ''IEEE Journal on Selected Areas in Communications, special issue on Computer-Aided Modeling, Analysis, and Design of Communication Networks'', 9(1):25–36, January 1991.</ref>. However, in the Möbius tool, it can be used with any atomic or composed formalism. The formalism enables the modeler to define a composed model in the form of a tree, in which each leaf node is a predefined ''submodel'' node (atomic or composed), and each non-leaf node is classified as either a ''Join'' node or a ''Replicate'' node. The root of the tree represents the complete composed model.
+
The Möbius tool also supports the composed model formalism known as Action Synchronization. Much like the Replicate/Join composed model formalism, Action Synchronization takes the form of an acyclic tree, utilizing join nodes in a similar manner as Replicate/Join.
  
A Join is a general state-sharing composition node used to compose two or more submodels. A Join node may have other Joins, Replicates, or other submodels defined as its ''children''.
+
Action Synchronization is a composition formalism based on the notion of composing actions instead of places. If two actions are said to be shared between two models, then the new composed action’s enabling conditions are the union of the enabling conditions of the submodel actions, that is neither action can fire unless all are enabled. When the composed action fires, the result is then the union of results of the submodel actions.
  
A Replicate is a special case of the Join node used to construct a model consisting of a number of identical copies of a submodel. The resulting composed model is equivalent, in behavior, to that which would result from a Join composed model in which all the children were copies of the same submodel. A Replicate node has one child, which may be another Replicate, a Join, or a single atomic or composed model. The modeler may also specify a set of state variables to be held in common among all replicated instances of the submodel. For each state variable in that set, all state variables with the same name in each of the instances are shared.
+
==== <span style="font-size:106%">''Action Synchronization model editor''</span> ====
  
Since the instances of a Replicate composed model are indistinguishable, Möbius is able to exploit this ''structural symmetry'' and generate a ''lumped'' state space. The lumped state space is smaller than the ''unlumped'' state space in which symmetries are not present or exploited. Thus, when appropriate, use of a Replicate node instead of a Join node can lead to less time- and space-consuming state-space-based numerical solution. Details of the symmetry-based optimization remain private inside a Replicate/Join model, and the rest of the Möbius tool has no need to know the details of such optimizations. A more detailed description of this optimization is available in <ref name=Sanders:SAIC:91 />.
+
<xr id="fig:actionsync#1" /> shows the Action Synchronization composed model editor. The editor is accessed either by creating a new model, or opening an existing model, much as with the other composed editors.
  
==== <span style="font-size:106%">''Replicate/Join composed model editor''</span> ====
+
<figure id="fig:actionsync">
 
 
<xr id="fig:repjoin_main_editor" /> shows the Replicate/Join composed model editor. As with other model editors, this editor can be opened either by creating a new model or by opening an existing one. To create a new Replicate/Join, select <span style="font-size:115%">Composed</span> or any of its children in the project window and select the <span style="font-size:108%"><span style="font-variant:small-caps">New</span></span> command either by choosing it in the context menu or by clicking the leftmost icon in the toolbar (see <xr id="fig:project_main" />). To open an existing Replicate/Join model, select the <span style="font-size:108%"><span style="font-variant:small-caps">Open</span></span> command either by choosing it in the context menu or by clicking the corresponding icon.
 
 
 
 
 
<figure id="fig:repjoin_main_editor">
 
[[Image:repjoin_main_editor.png|center]]
 
<br/>
 
<center><xr id="fig:repjoin_main_editor" nolink />: Replicate/Join composed model editor.</center></figure>
 
 
 
 
 
This model editor is divided into the following sections:
 
 
 
:* Top menu bar. It consists of the following five menus: <span style="font-size:108%"><span style="font-variant:small-caps">File</span></span>, <span style="font-size:108%"><span style="font-variant:small-caps">Edit</span></span>, <span style="font-size:108%"><span style="font-variant:small-caps">View</span></span>, <span style="font-size:108%"><span style="font-variant:small-caps">Elements</span></span>, and <span style="font-size:108%"><span style="font-variant:small-caps">Help</span></span>.
 
 
 
:* Toolbar. It gives the user one-click access to some of the menu commands.
 
 
 
:* Editor pane. The composed model is drawn in this area.
 
 
 
:* Status pane. The version of Möbius running and the version of the composed model that is open are shown in this pane.
 
 
 
 
 
<span style="font-size:108%"><span style="font-variant:small-caps">File</span></span>, <span style="font-size:108%"><span style="font-variant:small-caps">Edit</span></span>, <span style="font-size:108%"><span style="font-variant:small-caps">View</span></span>, and <span style="font-size:108%"><span style="font-variant:small-caps">Help</span></span> menus have sets of commands similar to those in the previously described model editors. For more information on those menus, refer to Section [[Building_Models#Common_Menus|3.1]]. The menus unique to the <span style="font-size:108%"><span style="font-variant:small-caps">Elements</span></span> menu in this editor are explained below.
 
 
 
 
 
<span style="font-size:102%">'''<span style="font-size:108%"><span style="font-variant:small-caps">Elements</span></span> menu'''</span>
 
 
 
As with other GUI-based model editors, the <span style="font-size:108%"><span style="font-variant:small-caps">Elements</span></span> menu (shown in <xr id="fig:repjoin_elements_menu" />) contains the set of all elements from which a Replicate/Join composed model can be built. The order of the elements from top to bottom is the same as the order of buttons on the toolbar.
 
 
 
 
 
<figure id="fig:repjoin_elements_menu">
 
[[Image:repjoin_elements_menu.png|center]]
 
<br/>
 
<center><xr id="fig:repjoin_elements_menu" nolink />: <span style="font-size:108%"><span style="font-variant:small-caps">Elements</span></span> menu.</center></figure>
 
 
 
 
 
:* <span style="font-size:108%"><span style="font-variant:small-caps">Cursor</span></span> [[Image:cursor32.png]], the first (starting from left) icon in the toolbar, is used to select elements in the editor pane.
 
 
 
:* <span style="font-size:108%"><span style="font-variant:small-caps">Rep</span></span> (abbreviation for Replicate) [[Image:rj_rep32.png]] and <span style="font-size:108%"><span style="font-variant:small-caps">Join</span></span> [[Image:rj_join32.png]] are unique to this editor and are used to create Replicate and Join nodes, respectively.
 
 
 
:* <span style="font-size:108%"><span style="font-variant:small-caps">Submodel</span></span> [[Image:rj_submodel32.png]] is used to create a node that represents a previously defined submodel (atomic or composed).
 
 
 
:* The remaining selections [[Image:base_line32.png]] [[Image:base_conline32.png]] [[Image:base_spline32.png]] are used to connect nodes just as in other graphical editors.
 
 
 
 
 
<span style="font-size:102%">'''Submodel node'''</span>
 
 
 
Submodels are the building blocks for constructing larger models. They are models that have already been built in any of the atomic or composed model editors, and form the leaves of the tree structure of Replicate/Join composed models. To create a Submodel node, first either select <span style="font-size:108%"><span style="font-variant:small-caps">Submodel</span></span> from the <span style="font-size:108%"><span style="font-variant:small-caps">Elements</span></span> menu or click on the [[Image:rj_submodel32.png]] icon in the toolbar. Then click in the editor pane where the node needs to be placed.
 
 
 
The set of commands available for a submodel node are available in its context menu (opened by right-clicking on the node) and are <span style="font-size:108%"><span style="font-variant:small-caps">Edit</span></span>, <span style="font-size:108%"><span style="font-variant:small-caps">Open</span></span>, <span style="font-size:108%"><span style="font-variant:small-caps">Hide Label</span></span> (or <span style="font-size:108%"><span style="font-variant:small-caps">Show Label</span></span>), and <span style="font-size:108%"><span style="font-variant:small-caps">Delete</span></span>.
 
 
 
<span style="font-size:108%"><span style="font-variant:small-caps">Edit</span></span> opens the <span style="font-size:115%">Specify Atomic Model</span> dialog as shown in <xr id="fig:repjoin_submodel_dialog" />. To choose which model to use for this node, click the “<span style="font-size:115%">...</span>” button, and a list of existing atomic and composed models will be shown as in <xr id="fig:repjoin_submodel_list" />. The name (or label) of the submodel can be set in the <span style="font-size:115%">Node Name</span> edit box.
 
 
 
 
 
<figure id="fig:repjoin_submodel_dialog">
 
[[Image:repjoin_submodel_dialog.png|center]]
 
<br/>
 
<center><xr id="fig:repjoin_submodel_dialog" nolink />: Submodel type dialog.</center></figure>
 
 
 
 
 
<figure id="fig:repjoin_submodel_list">
 
[[Image:repjoin_submodel_list.png|center]]
 
<br/>
 
<center><xr id="fig:repjoin_submodel_list" nolink />: List of available submodel types.</center></figure>
 
 
 
 
 
If the type of the submodel has been defined, the <span style="font-size:108%"><span style="font-variant:small-caps">Open</span></span> command opens the appropriate model editor for the submodel node while the composed editor is still open. This feature can be used to study the different building blocks, i.e., submodels of the composed model, while the model is being built.
 
 
 
The <span style="font-size:108%"><span style="font-variant:small-caps">Hide Label</span></span> (<span style="font-size:108%"><span style="font-variant:small-caps">Show Label</span></span>) command hides (or shows) the label of the submodel that is shown below the node. Finally, the <span style="font-size:108%"><span style="font-variant:small-caps">Delete</span></span> command deletes the submodel node from the composed model.
 
 
 
 
 
<span style="font-size:102%">'''Join node'''</span>
 
 
 
As mentioned before, a Replicate/Join composed model is structurally a tree, and it should be built in a bottom-up fashion. That means that the child(ren) of a Join or Replicate node should be defined before the node itself. Note that this composed editor allows for the definition of only one Replicate/Join tree, corresponding to one top-level (root) node. If there are nodes that are not in any way connected to the rest of the nodes, Möbius will show the error dialog shown in <xr id="fig:repjoin_toplevelerror" />.
 
 
 
 
 
<figure id="fig:repjoin_toplevelerror">
 
[[Image:repjoin_toplevelerror.png|center]]
 
<br/>
 
<center><xr id="fig:repjoin_toplevelerror" nolink />: Only one top-level node is allowed.</center></figure>
 
 
 
 
 
A Join node establishes a number of state variable sharings among its children. It must have at least two children. Each sharing consists of a non-empty set of state variables of children of the Join node; no more than one state variable from each child is included. All the state variables in that set are superimposed and given a common name in the Join node. The common name is a state variable in the Join node.
 
 
 
To create a Join node, choose <span style="font-size:108%"><span style="font-variant:small-caps">Elements</span></span><math>\rightarrow</math><span style="font-size:108%"><span style="font-variant:small-caps">Join</span></span> or click on the [[Image:rj_join32.png]] icon in the toolbar and then click in the editor pane where the node needs to be placed. You can access the set of commands available for a Join node by right-clicking on the node: the commands are <span style="font-size:108%"><span style="font-variant:small-caps">Edit</span></span>, <span style="font-size:108%"><span style="font-variant:small-caps">Hide Label</span></span> (or <span style="font-size:108%"><span style="font-variant:small-caps">Show Label</span></span>), and <span style="font-size:108%"><span style="font-variant:small-caps">Delete</span></span>. <span style="font-size:108%"><span style="font-variant:small-caps">Hide Label</span></span>, <span style="font-size:108%"><span style="font-variant:small-caps">Show Label</span></span>, and <span style="font-size:108%"><span style="font-variant:small-caps">Delete</span></span> behave just as they did for submodel nodes.
 
 
 
After creating a Join node, you must connect it to each of its children by choosing one of the connection lines, <span style="font-size:108%"><span style="font-variant:small-caps">Straight Connection</span></span> [[Image:base_line32.png]], <span style="font-size:108%"><span style="font-variant:small-caps">Connected Line</span></span> [[Image:base_conline32.png]], or <span style="font-size:108%"><span style="font-variant:small-caps">Spline Curve</span></span> [[Image:base_spline32.png]], from the <span style="font-size:108%"><span style="font-variant:small-caps">Elements</span></span> menu or the toolbar. A child of a Join node can be another Join, a Replicate, or a submodel node. Note that the first point of the connection between a Join and its child must be the Join node. This direction determines which node is the child and which node is the parent.
 
 
 
In the next step, use the context-menu command <span style="font-size:108%"><span style="font-variant:small-caps">Edit</span></span> to define the sharings established by the Join node. When you choose <span style="font-size:108%"><span style="font-variant:small-caps">Edit</span></span>, the <span style="font-size:115%">Define Join Node Dialog</span> shown in <xr id="fig:repjoin_join_dialog" /> appears. On the top of the dialog, the name of the Join node is shown. It can be modified in the <span style="font-size:115%">Join node name</span> edit box. There are also two lists in this dialog, called <span style="font-size:115%">Join State Variables</span> and <span style="font-size:115%">Submodel Variables</span>. The former, as its name implies, shows the state variables of the Join. Each line corresponds to one state variable, which itself corresponds to one sharing. If you highlight a Join state variable in the former list, the latter list shows the set of state variables of the children nodes (i.e., submodels) that are shared to create the Join state variable. For example, in <xr id="fig:repjoin_join_dialog" /> the Join state variable <span style="font-size:115%">computer_failed</span> is created by sharing 4 state variables among children of the Join node <span style="font-size:115%">Computer</span>. Notice the arrow symbol that is used to refer to a state variable of a submodel.
 
 
 
 
 
<figure id="fig:repjoin_join_dialog">
 
[[Image:repjoin_join_dialog.png|center]]
 
<br/>
 
<center><xr id="fig:repjoin_join_dialog" nolink />: Join node definition dialog.</center></figure>
 
 
 
 
 
To create or edit an existing Join state variable, click on <span style="font-size:115%">Create New Shared Variable</span> or <span style="font-size:115%">Edit Selected Variable</span>, respectively. The <span style="font-size:115%">Define Shared State Variable</span> dialog, shown in <xr id="fig:repjoin_join_newsv" />, will appear after you press either of the buttons.
 
 
 
 
 
<figure id="fig:repjoin_join_newsv">
 
[[Image:repjoin_join_newsv.png|center]]
 
<br/>
 
<center><xr id="fig:repjoin_join_newsv" nolink />: Join state variable definition dialog.</center></figure>
 
 
 
 
 
The main part of the dialog is a multi-tab panel consisting of one tab for each child of the Join node. To define a sharing, select the state variable to be shared in each of the child tabs. No more than one state variable can be selected from each tab. Finally, give the Join state variable a name by entering it in the <span style="font-size:115%">Join node name</span> edit box. This name will appear in the <span style="font-size:115%">Join State Variables</span> list (the left list) shown in <xr id="fig:repjoin_join_dialog" />.
 
 
 
Three conditions must be satisfied before a set of state variables can be shared. First, they must all have the same initial value assigned to them in their corresponding model editors. If this condition is not satisfied, Möbius will show the error dialog shown in <xr id="fig:repjoin_join_errors#1" />. Second, they must all be of the same type, regardless of whether it is a simple type, like int, short, or char, or a structural type. An error dialog as shown in <xr id="fig:repjoin_join_errors#2" /> will appear if this condition is not met. Third, none of the state variables can be part of a currently defined sharing relationship.
 
 
 
<figure id="fig:repjoin_join_errors">
 
 
{| cellspacing="20" align="center"
 
{| cellspacing="20" align="center"
 
|- valign="bottom"
 
|- valign="bottom"
| <subfigure>[[Image:repjoin_join_iverror.png]]</subfigure>
+
| <subfigure>[[Image:syncmaineditor.png]]</subfigure>
| <subfigure>[[Image:repjoin_join_typeerror.png]]</subfigure>
+
| <subfigure>[[Image:actionsyncjoin.png]]</subfigure>
 
|- align="center"
 
|- align="center"
| <span style="font-size:88%">(a) Nonequal initial values error dialog.</span>
+
| <span style="font-size:88%">(a) <span style="font-size:115%">Action Synchronization Model Editor</span>.</span>
| <span style="font-size:88%">(b) Non-matching types error dialog.</span>
+
| <span style="font-size:88%">(b) Action Synchronization join node editor.</span>
 
|}</figure>
 
|}</figure>
  
<center><xr id="fig:repjoin_join_errors" nolink />: Error dialogs related to the definition of Join nodes.</center>
+
<center><xr id="fig:actionsync" nolink />: Parts of the <span style="font-size:115%">Action Synchronization Model Editor</span>.</center>
 
 
 
 
The <span style="font-size:115%">Share All Similar Variables</span> button joins all state variables in the children of the Join node with common names. The Join state variable will have the same common name. If you choose the names of submodels’ state variables appropriately with respect to the larger composed model, this feature proves very useful.
 
 
 
<span style="font-size:115%">Delete Selected Variable(s)</span> deletes the Join state variable selected in the left list. <span style="font-size:115%">Delete All Shared Variables</span> deletes all the Join state variables. The <span style="font-size:115%">Sort additions to list</span> checkbox controls how newly created state variables are added to the left list. If it is checked, the name of a new Join state variable will be added to the list in alphabetical order.
 
 
 
 
 
<span style="font-size:102%">'''Replicate node'''</span>
 
  
This node is a special case of the Join node. Its advantage over the Join node is that it leads to structural symmetries that can eventually result in less time- and space-consuming state-based numerical solution of the model. The extra restrictions that Replicate has relative to Join are as follows:
 
  
:* All children of a Replicate are of the same submodel type. Therefore, in the composed editor, a Replicate node is connected to only one child node, and the number of replications is specified in the Replicate node definition dialog.
+
Due to the similarities of Action Synchronization to the Replicate/Join composed model editor, please refer to Section [[Building_Models#Replicate/Join_composed_model_editor|5.1.2]] for a discussion of most of the features of this editor. The primary difference comes when editing a join node itself.
  
:* Only state variables with the same name can be shared among replicas (copies) of a Replicate node. Therefore, to create a Replicate state variable, select only one state variable from the Replicate child; copies of that state variable will be shared among all replicas.
+
Unlike the Replicate/Join composed model editor, Action Synchronization connects models by Joining on actions, not places. As such when the Join node editor (<xr id="fig:actionsync#2" />) is opened, instead of an option to “Create New Shared place”, we have “Create New Shared action”.
  
When you choose the <span style="font-size:108%"><span style="font-variant:small-caps">Edit</span></span> command from the context menu of a Replicate node, the <span style="font-size:115%">Define Rep Node</span> dialog, as shown in <xr id="fig:repjoin_rep_dialog" />, is shown. The label (name) of the Replicate node can be modified in the <span style="font-size:115%">Rep Node Name</span> edit box. The number of replicas can be set in the <span style="font-size:115%">Number of Reps</span> edit box. That number can be an integral constant or global variable that has been defined in the current composed model or in any of the constituent atomic or composed models. Two lists of state variables (called <span style="font-size:115%">Unshared State Variables</span> and <span style="font-size:115%">Shared State Variables</span>) and a number of buttons between them are used to move state variables from one list to the other.
+
The shared action dialog, seen in <xr id="fig:actionsync_share" />, allows one to define synchronization amongst actions. Unlike sharing variables, shared actions need not have the same rate. The new shared action instead has the rate defined by the user in the “Rate” dialog. The actions to be shared in each of the submodels are then selected from the tabbed section of the dialog.
  
  
<figure id="fig:repjoin_rep_dialog">
+
<figure id="fig:actionsync_share">
[[Image:repjoin_rep_dialog.png|center]]
+
[[Image:definesharedaction.png|center]]
 
<br/>
 
<br/>
<center><xr id="fig:repjoin_rep_dialog" nolink />: Replicate definition dialog.</center></figure>
+
<center><xr id="fig:actionsync_share" nolink />: Shared action dialog.</center></figure>
  
  
Each line in the latter (right) list shows the name of a state variable that has been shared among all replicas of the Replicate node. The rest of the state variables of the child submodel are shown in the left list. As mentioned before, each Replicate (or Join) node is itself a model. Notice that in the corresponding model of the Replicate node, for each name in the right list, there is only one copy of that state variable, and for each name in the left list, there are as many copies as have been specified in the <span style="font-size:115%">Number of Reps</span> edit box, i.e., one copy per child replica.
+
If the actions to be shared all have common names, the <span style="font-size:115%">Share All Similar Action</span> button can be used. If this is done the <span style="font-size:115%">Join</span> action will have the same common name. After sharing all similar actions, the shared actions must be edited with the <span style="font-size:115%">Edit Selected action</span> button to set the rate to an appropriate value.
  
The buttons between the lists are self-descriptive. <span style="font-size:115%">Share</span> moves the selected state variable in the left list to the right list and <span style="font-size:115%">Unshare</span> does the reverse. <span style="font-size:115%">Share All</span> moves all state variables from the left list to the right list, and <span style="font-size:115%">Unshare All</span> does the reverse.
+
Much as with the Replicate/Join editor, the button labeled <span style="font-size:115%">Delete Selected Actions</span> deletes the selected Join action from the list on the left, and <span style="font-size:115%">Delete All Shared action</span> deletes all of the Join actions.

Latest revision as of 22:42, 29 October 2014

Action Synchronization

This section covers the overview of the Action Synchronization formalism supported in Möbius. It includes a brief description of the different parts of the Action Synchronization model editor and basic steps to build a composed model with this formalism.

Overview

The Möbius tool also supports the composed model formalism known as Action Synchronization. Much like the Replicate/Join composed model formalism, Action Synchronization takes the form of an acyclic tree, utilizing join nodes in a similar manner as Replicate/Join.

Action Synchronization is a composition formalism based on the notion of composing actions instead of places. If two actions are said to be shared between two models, then the new composed action’s enabling conditions are the union of the enabling conditions of the submodel actions, that is neither action can fire unless all are enabled. When the composed action fires, the result is then the union of results of the submodel actions.

Action Synchronization model editor

<xr id="fig:actionsync#1" /> shows the Action Synchronization composed model editor. The editor is accessed either by creating a new model, or opening an existing model, much as with the other composed editors.

<figure id="fig:actionsync">

<subfigure>Syncmaineditor.png</subfigure> <subfigure>Actionsyncjoin.png</subfigure>
(a) Action Synchronization Model Editor. (b) Action Synchronization join node editor.
</figure>
<xr id="fig:actionsync" nolink />: Parts of the Action Synchronization Model Editor.


Due to the similarities of Action Synchronization to the Replicate/Join composed model editor, please refer to Section 5.1.2 for a discussion of most of the features of this editor. The primary difference comes when editing a join node itself.

Unlike the Replicate/Join composed model editor, Action Synchronization connects models by Joining on actions, not places. As such when the Join node editor (<xr id="fig:actionsync#2" />) is opened, instead of an option to “Create New Shared place”, we have “Create New Shared action”.

The shared action dialog, seen in <xr id="fig:actionsync_share" />, allows one to define synchronization amongst actions. Unlike sharing variables, shared actions need not have the same rate. The new shared action instead has the rate defined by the user in the “Rate” dialog. The actions to be shared in each of the submodels are then selected from the tabbed section of the dialog.


<figure id="fig:actionsync_share">

Definesharedaction.png


<xr id="fig:actionsync_share" nolink />: Shared action dialog.
</figure>


If the actions to be shared all have common names, the Share All Similar Action button can be used. If this is done the Join action will have the same common name. After sharing all similar actions, the shared actions must be edited with the Edit Selected action button to set the rate to an appropriate value.

Much as with the Replicate/Join editor, the button labeled Delete Selected Actions deletes the selected Join action from the list on the left, and Delete All Shared action deletes all of the Join actions.

Replicate/Join[edit]

This section begins with an overview of the Replicate/Join composed model formalism as well as definitions of terms that will be used throughout the section. Then, the different parts of the Replicate/Join composed model formalism and the way they can be used to build a composed model will be described.

Overview[edit]

The Replicate/Join composed model formalism was originally conceived for SAN models[1]. However, in the Möbius tool, it can be used with any atomic or composed formalism. The formalism enables the modeler to define a composed model in the form of a tree, in which each leaf node is a predefined submodel node (atomic or composed), and each non-leaf node is classified as either a Join node or a Replicate node. The root of the tree represents the complete composed model.

A Join is a general state-sharing composition node used to compose two or more submodels. A Join node may have other Joins, Replicates, or other submodels defined as its children.

A Replicate is a special case of the Join node used to construct a model consisting of a number of identical copies of a submodel. The resulting composed model is equivalent, in behavior, to that which would result from a Join composed model in which all the children were copies of the same submodel. A Replicate node has one child, which may be another Replicate, a Join, or a single atomic or composed model. The modeler may also specify a set of state variables to be held in common among all replicated instances of the submodel. For each state variable in that set, all state variables with the same name in each of the instances are shared.

Since the instances of a Replicate composed model are indistinguishable, Möbius is able to exploit this structural symmetry and generate a lumped state space. The lumped state space is smaller than the unlumped state space in which symmetries are not present or exploited. Thus, when appropriate, use of a Replicate node instead of a Join node can lead to less time- and space-consuming state-space-based numerical solution. Details of the symmetry-based optimization remain private inside a Replicate/Join model, and the rest of the Möbius tool has no need to know the details of such optimizations. A more detailed description of this optimization is available in [1].

Replicate/Join composed model editor[edit]

<xr id="fig:repjoin_main_editor" /> shows the Replicate/Join composed model editor. As with other model editors, this editor can be opened either by creating a new model or by opening an existing one. To create a new Replicate/Join, select Composed or any of its children in the project window and select the New command either by choosing it in the context menu or by clicking the leftmost icon in the toolbar (see <xr id="fig:project_main" />). To open an existing Replicate/Join model, select the Open command either by choosing it in the context menu or by clicking the corresponding icon.


<figure id="fig:repjoin_main_editor">

Repjoin main editor.png


<xr id="fig:repjoin_main_editor" nolink />: Replicate/Join composed model editor.
</figure>


This model editor is divided into the following sections:

  • Top menu bar. It consists of the following five menus: File, Edit, View, Elements, and Help.
  • Toolbar. It gives the user one-click access to some of the menu commands.
  • Editor pane. The composed model is drawn in this area.
  • Status pane. The version of Möbius running and the version of the composed model that is open are shown in this pane.


File, Edit, View, and Help menus have sets of commands similar to those in the previously described model editors. For more information on those menus, refer to Section 3.1. The menus unique to the Elements menu in this editor are explained below.


Elements menu

As with other GUI-based model editors, the Elements menu (shown in <xr id="fig:repjoin_elements_menu" />) contains the set of all elements from which a Replicate/Join composed model can be built. The order of the elements from top to bottom is the same as the order of buttons on the toolbar.


<figure id="fig:repjoin_elements_menu">

Repjoin elements menu.png


<xr id="fig:repjoin_elements_menu" nolink />: Elements menu.
</figure>


  • Cursor Cursor32.png, the first (starting from left) icon in the toolbar, is used to select elements in the editor pane.
  • Rep (abbreviation for Replicate) Rj rep32.png and Join Rj join32.png are unique to this editor and are used to create Replicate and Join nodes, respectively.
  • Submodel Rj submodel32.png is used to create a node that represents a previously defined submodel (atomic or composed).
  • The remaining selections Base line32.png Base conline32.png Base spline32.png are used to connect nodes just as in other graphical editors.


Submodel node

Submodels are the building blocks for constructing larger models. They are models that have already been built in any of the atomic or composed model editors, and form the leaves of the tree structure of Replicate/Join composed models. To create a Submodel node, first either select Submodel from the Elements menu or click on the Rj submodel32.png icon in the toolbar. Then click in the editor pane where the node needs to be placed.

The set of commands available for a submodel node are available in its context menu (opened by right-clicking on the node) and are Edit, Open, Hide Label (or Show Label), and Delete.

Edit opens the Specify Atomic Model dialog as shown in <xr id="fig:repjoin_submodel_dialog" />. To choose which model to use for this node, click the “...” button, and a list of existing atomic and composed models will be shown as in <xr id="fig:repjoin_submodel_list" />. The name (or label) of the submodel can be set in the Node Name edit box.


<figure id="fig:repjoin_submodel_dialog">

Repjoin submodel dialog.png


<xr id="fig:repjoin_submodel_dialog" nolink />: Submodel type dialog.
</figure>


<figure id="fig:repjoin_submodel_list">

Repjoin submodel list.png


<xr id="fig:repjoin_submodel_list" nolink />: List of available submodel types.
</figure>


If the type of the submodel has been defined, the Open command opens the appropriate model editor for the submodel node while the composed editor is still open. This feature can be used to study the different building blocks, i.e., submodels of the composed model, while the model is being built.

The Hide Label (Show Label) command hides (or shows) the label of the submodel that is shown below the node. Finally, the Delete command deletes the submodel node from the composed model.


Join node

As mentioned before, a Replicate/Join composed model is structurally a tree, and it should be built in a bottom-up fashion. That means that the child(ren) of a Join or Replicate node should be defined before the node itself. Note that this composed editor allows for the definition of only one Replicate/Join tree, corresponding to one top-level (root) node. If there are nodes that are not in any way connected to the rest of the nodes, Möbius will show the error dialog shown in <xr id="fig:repjoin_toplevelerror" />.


<figure id="fig:repjoin_toplevelerror">

Repjoin toplevelerror.png


<xr id="fig:repjoin_toplevelerror" nolink />: Only one top-level node is allowed.
</figure>


A Join node establishes a number of state variable sharings among its children. It must have at least two children. Each sharing consists of a non-empty set of state variables of children of the Join node; no more than one state variable from each child is included. All the state variables in that set are superimposed and given a common name in the Join node. The common name is a state variable in the Join node.

To create a Join node, choose Elements\rightarrowJoin or click on the Rj join32.png icon in the toolbar and then click in the editor pane where the node needs to be placed. You can access the set of commands available for a Join node by right-clicking on the node: the commands are Edit, Hide Label (or Show Label), and Delete. Hide Label, Show Label, and Delete behave just as they did for submodel nodes.

After creating a Join node, you must connect it to each of its children by choosing one of the connection lines, Straight Connection Base line32.png, Connected Line Base conline32.png, or Spline Curve Base spline32.png, from the Elements menu or the toolbar. A child of a Join node can be another Join, a Replicate, or a submodel node. Note that the first point of the connection between a Join and its child must be the Join node. This direction determines which node is the child and which node is the parent.

In the next step, use the context-menu command Edit to define the sharings established by the Join node. When you choose Edit, the Define Join Node Dialog shown in <xr id="fig:repjoin_join_dialog" /> appears. On the top of the dialog, the name of the Join node is shown. It can be modified in the Join node name edit box. There are also two lists in this dialog, called Join State Variables and Submodel Variables. The former, as its name implies, shows the state variables of the Join. Each line corresponds to one state variable, which itself corresponds to one sharing. If you highlight a Join state variable in the former list, the latter list shows the set of state variables of the children nodes (i.e., submodels) that are shared to create the Join state variable. For example, in <xr id="fig:repjoin_join_dialog" /> the Join state variable computer_failed is created by sharing 4 state variables among children of the Join node Computer. Notice the arrow symbol that is used to refer to a state variable of a submodel.


<figure id="fig:repjoin_join_dialog">

Repjoin join dialog.png


<xr id="fig:repjoin_join_dialog" nolink />: Join node definition dialog.
</figure>


To create or edit an existing Join state variable, click on Create New Shared Variable or Edit Selected Variable, respectively. The Define Shared State Variable dialog, shown in <xr id="fig:repjoin_join_newsv" />, will appear after you press either of the buttons.


<figure id="fig:repjoin_join_newsv">

Repjoin join newsv.png


<xr id="fig:repjoin_join_newsv" nolink />: Join state variable definition dialog.
</figure>


The main part of the dialog is a multi-tab panel consisting of one tab for each child of the Join node. To define a sharing, select the state variable to be shared in each of the child tabs. No more than one state variable can be selected from each tab. Finally, give the Join state variable a name by entering it in the Join node name edit box. This name will appear in the Join State Variables list (the left list) shown in <xr id="fig:repjoin_join_dialog" />.

Three conditions must be satisfied before a set of state variables can be shared. First, they must all have the same initial value assigned to them in their corresponding model editors. If this condition is not satisfied, Möbius will show the error dialog shown in <xr id="fig:repjoin_join_errors#1" />. Second, they must all be of the same type, regardless of whether it is a simple type, like int, short, or char, or a structural type. An error dialog as shown in <xr id="fig:repjoin_join_errors#2" /> will appear if this condition is not met. Third, none of the state variables can be part of a currently defined sharing relationship.

<figure id="fig:repjoin_join_errors">

<subfigure>Repjoin join iverror.png</subfigure> <subfigure>Repjoin join typeerror.png</subfigure>
(a) Nonequal initial values error dialog. (b) Non-matching types error dialog.
</figure>
<xr id="fig:repjoin_join_errors" nolink />: Error dialogs related to the definition of Join nodes.


The Share All Similar Variables button joins all state variables in the children of the Join node with common names. The Join state variable will have the same common name. If you choose the names of submodels’ state variables appropriately with respect to the larger composed model, this feature proves very useful.

Delete Selected Variable(s) deletes the Join state variable selected in the left list. Delete All Shared Variables deletes all the Join state variables. The Sort additions to list checkbox controls how newly created state variables are added to the left list. If it is checked, the name of a new Join state variable will be added to the list in alphabetical order.


Replicate node

This node is a special case of the Join node. Its advantage over the Join node is that it leads to structural symmetries that can eventually result in less time- and space-consuming state-based numerical solution of the model. The extra restrictions that Replicate has relative to Join are as follows:

  • All children of a Replicate are of the same submodel type. Therefore, in the composed editor, a Replicate node is connected to only one child node, and the number of replications is specified in the Replicate node definition dialog.
  • Only state variables with the same name can be shared among replicas (copies) of a Replicate node. Therefore, to create a Replicate state variable, select only one state variable from the Replicate child; copies of that state variable will be shared among all replicas.

When you choose the Edit command from the context menu of a Replicate node, the Define Rep Node dialog, as shown in <xr id="fig:repjoin_rep_dialog" />, is shown. The label (name) of the Replicate node can be modified in the Rep Node Name edit box. The number of replicas can be set in the Number of Reps edit box. That number can be an integral constant or global variable that has been defined in the current composed model or in any of the constituent atomic or composed models. Two lists of state variables (called Unshared State Variables and Shared State Variables) and a number of buttons between them are used to move state variables from one list to the other.


<figure id="fig:repjoin_rep_dialog">

Repjoin rep dialog.png


<xr id="fig:repjoin_rep_dialog" nolink />: Replicate definition dialog.
</figure>


Each line in the latter (right) list shows the name of a state variable that has been shared among all replicas of the Replicate node. The rest of the state variables of the child submodel are shown in the left list. As mentioned before, each Replicate (or Join) node is itself a model. Notice that in the corresponding model of the Replicate node, for each name in the right list, there is only one copy of that state variable, and for each name in the left list, there are as many copies as have been specified in the Number of Reps edit box, i.e., one copy per child replica.

The buttons between the lists are self-descriptive. Share moves the selected state variable in the left list to the right list and Unshare does the reverse. Share All moves all state variables from the left list to the right list, and Unshare All does the reverse.
  1. 1.0 1.1 W. H. Sanders and J. F. Meyer. Reduced base model construction methods for stochastic activity networks. IEEE Journal on Selected Areas in Communications, special issue on Computer-Aided Modeling, Analysis, and Design of Communication Networks, 9(1):25–36, January 1991.