Difference between revisions of "Organizing a module hierarchy"

m
 
(7 intermediate revisions by one other user not shown)
Line 3: Line 3:
  
  
In addition to properly arranging the nodes in a single diagram, you can also improve the clarity of your models by using module hierarchies effectively.
+
You can greatly improve the clarity of a large model by the way you organize it into a hierarchy of nested [[Modules and Libraries|modules]].
  
'''Group related nodes in the same diagram''': When assigning nodes to diagrams, the goal is to put groups of nodes that have many links among them in the same diagram, and to separate them from other groups with which they have few or no links. For example, the diagram below shows that a group of nodes related to annual housing costs have been organized into the <code>Annual costs</code> module within the larger model.
+
==== '''Group related nodes in the same diagram''' ====
 +
When assigning nodes to diagrams, the goal is to put groups of nodes that have many links among them in the same diagram, and to separate them from other groups with which they have few or no links. For example, the diagram below shows that a group of nodes related to annual housing costs have been organized into the <code>Annual costs</code> module within the larger model.
  
[[File:Chapter6_10.png]]
+
:[[File:Chapter6_10.png]]
  
Sometimes you have a good idea of how to group nodes before you create them. In such cases, it is easy to create the modules first, and then create and link the nodes in groups in each module.
+
Sometimes you have a good idea of how to group nodes before you [[create and edit nodes|create them]]. In such cases, it is easy to create the modules first, and then create and link the nodes in groups in each module.
  
In other cases, it might not be obvious which groupings work best. It is then often best to create all the nodes in a single large diagram. After drawing all the arrows, you might have a confusing spaghetti diagram. At this point, try to move the nodes around to identify groups containing 5 to 15 nodes, with many links within each group and fewer links between groups. When you arrive at a satisfactory grouping, create a module node for each group and move the group of variables into its own module.
+
In other cases, it might not be obvious which groupings work best. It is then often best to create all the nodes in a single large diagram. After [[draw arrows|drawing all the arrows]], you might have a confusing spaghetti diagram. At this point, try to move the nodes around to identify groups containing 5 to 15 nodes, with many links within each group and fewer links between groups. When you arrive at a satisfactory grouping, create a module node for each group and move the group of variables into its own module.
  
'''Use 10 to 20 nodes per diagram''': When creating a hierarchy of diagrams for a model with 100 variables, you could create a single module with 100 nodes, 10 modules with an average of 11 nodes each, 20 modules with 6 nodes each, or 50 modules with 3 nodes each (''Each module also creates a new node, so the total number of nodes is the number of variables plus the number of modules'').
+
=== '''Aim for 10 to 20 nodes per diagram''' ===
 +
If you have a model with 150 variables, you could organize it as a single module with 150 nodes. But, that is likely to be rather overwhelming. Or you could organize it into 10 modules, each with an average of 15 variables, which is more manageable. The top model could just show the 10 module nodes.  Or you could organize it as 50 modules with an average of 3 variables each. But that would obscure the relationships between variables in different modules (most of them), and create additional cognitive effort in understanding and navigating the many modules.
  
A module containing more than 20 nodes often looks overwhelmingly complicated, unless there are strong regularities in the structure. On the other hand, if modules have fewer than 5 nodes, you need so many modules that it is easy for users to get lost.
+
Experienced modelers have found that a range of 10 to 20 nodes per diagram works best. There may be a good reason for occasional modules with fewer or more nodes.  
  
The range of 10 to 20 nodes per diagram is a good general goal. But don’t feel too constrained by it if a few diagrams are outside this range.
+
==See Also==
 +
* [[Module hierarchy]]
 +
* [[Tutorial: Dynamic system model#Creating_a_module|Tutorial: Creating a module]]
 +
* [[Modules and Libraries]]
 +
* [[Filed modules and libraries]]
 +
* [[Draw arrows between modules]]
 +
* [[Using Add Module... to import a Model file]]
 +
* [[Import a module or library]]
  
Contrast the module hierarchy in the [[Organizing a module hierarchy|simplified model]] with the [[Creating Lucid Influence Diagrams|spaghetti]]. The relationships among objects are much easier to see and understand in the model with 10 nodes in the top-level module and 12 nodes in the embedded module than in the complicated model with 24 top-level nodes.
 
  
==See Also==
 
 
<footer>Arranging nodes to make clear diagrams / {{PAGENAME}} / Color in influence diagrams</footer>
 
<footer>Arranging nodes to make clear diagrams / {{PAGENAME}} / Color in influence diagrams</footer>

Latest revision as of 19:34, 10 June 2018


You can greatly improve the clarity of a large model by the way you organize it into a hierarchy of nested modules.

Group related nodes in the same diagram

When assigning nodes to diagrams, the goal is to put groups of nodes that have many links among them in the same diagram, and to separate them from other groups with which they have few or no links. For example, the diagram below shows that a group of nodes related to annual housing costs have been organized into the Annual costs module within the larger model.

Chapter6 10.png

Sometimes you have a good idea of how to group nodes before you create them. In such cases, it is easy to create the modules first, and then create and link the nodes in groups in each module.

In other cases, it might not be obvious which groupings work best. It is then often best to create all the nodes in a single large diagram. After drawing all the arrows, you might have a confusing spaghetti diagram. At this point, try to move the nodes around to identify groups containing 5 to 15 nodes, with many links within each group and fewer links between groups. When you arrive at a satisfactory grouping, create a module node for each group and move the group of variables into its own module.

Aim for 10 to 20 nodes per diagram

If you have a model with 150 variables, you could organize it as a single module with 150 nodes. But, that is likely to be rather overwhelming. Or you could organize it into 10 modules, each with an average of 15 variables, which is more manageable. The top model could just show the 10 module nodes. Or you could organize it as 50 modules with an average of 3 variables each. But that would obscure the relationships between variables in different modules (most of them), and create additional cognitive effort in understanding and navigating the many modules.

Experienced modelers have found that a range of 10 to 20 nodes per diagram works best. There may be a good reason for occasional modules with fewer or more nodes.

See Also


Comments


You are not allowed to post comments.