Skip to content

Making Connections

isee systems blog

Making Connections

  • About
  • More Connections
Search

Converting a Sector-based Model to Modules

Updated: February 1, 2021March 17, 2010Filed under: Modeling Tips5 Comments

I generally do not use modules to build very small models (only a couple of stocks and flows), which may then lead me to use sectors as the model grows because they are very convenient.  By the time I have three sectors, though, it starts to become clear that I should have used modules.  I will then need to convert my sector-based model into a module-based model.  Historically, I also have a number of sector-based models that are crying to be module-based.

Converting from sectors to modules is not very difficult:

  1. Make sure there are no connections or flows between sectors.  Replace any of these with ghosts in the target sector.
  2. In a new model, create one module for every sector.
  3. Copy and paste the structure from each sector into its corresponding module.
  4. Connect the modules:  At this point, the model structure has been rearranged into modules, but none of the modules are connected.  The ghosts that were in the sectors became real entities when they were pasted into the modules.  Go back to identify all of these connections and reconnect them in the module-based model.

Stepping Through a Sample Model

Let’s walk through an example.  A small sector-based model is shown below (and is available by clicking here).

image

This model violates what I would call good sector etiquette:  there are connectors that run between the sectors.  This is often useful in a small model such as this because it makes the feedback loops visible.  However, in a larger model, this can lead to problems such as crossed connections and difficulty in maintaining the model because sectors cannot be easily moved.

Eliminating Cross-Sector Connections

To convert this sector-based model to modules, it is first necessary to remove these cross-sector connections.  This is done with the ghost tool.  The stock Population needs to be ghosted and placed in the Resources Sector and the stock Natural Resources needs to be ghosted and placed in the Population Sector.  The end result is shown below.

image

Creating the Modules

We are now ready to create, in a new model, one module for each sector, using the Module tool.  The result is shown below.  Although you could manually draw the connections between these modules, we will let the software create the connections for us.

image

Each module needs to be associated with its own model file.  This is done by double-clicking on each module and choosing “Create Model…”.  Double-click Population, choose “Create Model…”, and name the model file “Population”.  Repeat for Natural Resources, but name the model file “Natural Resources”.

Pasting Structure into the Modules

It is now a simple matter to paste the structure from each sector into each module.  Using the selection tool in the sector frame, select all of the structure in the Population Sector and copy it by choosing Edit->Copy.  Open the Population module in the new model and paste in the structure by choosing Edit->Paste.  The module contents will appear as shown below.  Note that Natural Resources is no longer a ghost; there is no connection to the other module.

image

Repeat this process with the Resources Sector and the Natural Resources module.  The module contents will appear as shown below.  Note that Population is no longer a ghost.

image

Connecting the Modules

All that remains is to connect the modules.  Inside the Population module, the stock Natural Resources needs to be replaced with a ghost of the real stock.  Inside the Natural Resources stock, the Population stock must be replaced with a ghost.

There are two ways to do this:  manually or semi-automatically with the Ghost tool.  I tend to use the Ghost tool most of the time.  [The documentation chapter “Using Modules to Communicate Between Modules” (available by clicking here) explains how to forge these connections manually.]

To connect the modules, first go into the Natural Resources module and select the Natural Resources stock with the Ghost tool.  Go up one level and then down into the Population module.  The cursor should still be a stock.  Click next to the existing Natural Resources stock to deposit the ghost.  Run a connector from the ghost to resources\person (as the stock does) and then delete the stock.  Drag the ghost over to approximately where the stock was.  Open resources\person and press “OK”.  An error will appear and “Natural_Resources” will be selected.  This happens because Natural Resources is no longer connected to resources\person.  Click on the ghost’s name (Natural Resources.Natural Resources) in the “Required Inputs” list and press “OK”.  The Population module is now properly connected to the Natural Resources module.

Repeat this process to connect a ghost of the real Population stock to the Natural Resources module.  After finishing, the Population module contents appears as shown below.  Note that Population has a double border to signify it is providing its value to another module.

image

The contents of the Natural Resources module appears as shown below.  Note the double border around the Natural Resources stock, signifying that it is providing its value to another module.

image

Finally, returning to the top-level, we see that the software automatically created the required connections between the modules.  Below, the connections have been embellished with their polarity to make the balancing loop obvious.  [The final model is available by clicking here.]

image

A Cautionary Tale

This mechanical process for converting a sector-based model to a module-based model is very appealing due to its simplicity.  It works very well with models that have a small number of sectors (up to about five), but will fall apart beyond that.

Last summer, I helped Khalid Saeed (Worcestor Polytechnic Institute) convert a sector-based model of Jay Forrester’s Urban Dynamics model to modules.  A direct translation using the above process led to the following top-level diagram:

imageIt should be clear that everything is connected to almost everything else.  There is no way to rearrange this diagram to clear up this mess.  For a short time, I flirted with the idea of module ghosts as a solution, but it does not take too long to see that ghosts cannot solve this problem either (indeed, they make it worse).

Recently, I decided to follow my own advice on module hierarchy (see this post).  I also remembered the famous article “The Magical Number Seven, Plus or Minus Two: Some Limits on Our Capacity for Processing Information” by G.A. Miller (1956).  It explains that we cannot keep more than five to nine things simultaneously in our heads, depending on the person.  So I may be able to absorb the meaning of a diagram with seven modules, but someone else may only be able to understand one with five modules.  For this reason, we should strive to keep the number of modules in a diagram below seven (which also may help explain why the above method works well for a small number of sectors).

Rearranging the Urban Dynamics model into three levels, I was able to simplify the top-level of the diagram to the following, which shows all of the important high-level feedback loops:

image

There are also lower-level feedback loops within each of these modules.  The one within workforce is just as complicated:

image

The model logic rests within these second-level modules.  For example, the module underemployed mobility contains the following logic:

image

Modeling Tips
  • iThink/STELLA
  • modules
  • sectors
  • Version 9.1.2

Post navigation

Previous Post:

What are “Mental Models”?

Next Post:

We have met an ally and he is Storytelling

About the Author

Karim Chichakly

Co-President

All posts byKarim ChichaklyWebsite

Hide

Categories

  • Education (4)
  • isee NetSim (3)
  • isee.NET Framework (1)
  • Modeling Tips (32)
  • News & Announcements (15)
  • STELLA & iThink (14)
  • Stories from the Field (5)
  • Systems Thinking (8)
  • Training (6)

Archives

Browse by keyword

2D array archetypes arrays Barry Richmond Bass diffusion builtins calibration Causal Loop CLD command line conferences crisis data diffusion Education environment export game graphical function h1n1 healthcare housing import iThink/STELLA market dynamics MODSIM modules mortgage netsim optimization Physics policy price releases scholarship software spatial Stella storytelling System Dynamics Society Systems Thinking Version 9.1.2 video webinar workshop

Recent Posts

  • COVID-19: Modeling Distributions of Incubation and Recovery Times April 1, 2020
  • Multiobjective Optimization January 9, 2018
  • Optimizing Model Performance December 22, 2017
  • Calibration in Stella® December 15, 2017
  • Drifting Goals March 9, 2016

RSS System Dynamics Forum

Recent Comments

  • best apps review on About
  • digital software on Modeling the Economic Crisis
  • Mishawaka Indiana on What are “Mental Models”?
  • La Paz Indiana on XMILE – An open standard for system dynamics models
  • Bristol Indiana on Modeling the Economic Crisis

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Products
Software (v1.3)
  • Stella Architect
  • Stella Professional
  • Stella Designer
  • Stella Simulator
  • iThink
  • Feature Updates
  • Policies
  • Publishing Options
  • License Agreement
Free Software
  • Stella Online
  • isee Player
  • Stella Architect Trial
Solutions
Consulting
  • Systems Innovation Practice
Common Applications
  • Business
  • Education
  • Research
  • Government
  • Energy
  • Health
  • Agriculture
  • Manufacturing
  • Conservation
Quick Links
About
  • isee systems
  • Systems Thinking
  • Barry Richmond Scholarship
Resources
  • Frequently Asked Questions
  • Product Help
  • Examples
  • Request Support
  • Request Quote
  • Systems in Focus
  • Quick Tips
  • Legacy Tutorials
News and Events
Upcoming Workshops
  • Introduction to Dynamic Modeling
  • Whole Systems Partnership
Newsletter
  • The Connector
Recent Webinars
  • Model Mysteries
Recent Training
  • Systems Thinking Practice
Press Release
  • Stella Architect Release

  Phone: (603) 448-4990   Email: info@iseesystems.com

   Monday - Friday: 9:00 am - 5:00 pm EDT | Saturday - Sunday: Closed
Wheelock Office Park | 31 Old Etna Rd, Suite 7N | Lebanon, NH 03766 | US

isee systems inc. holds registered trademark rights over the following: iThink®, STELLA®, Stella®, isee systems® and claims the following trademarks; isee NetSim™, Stella Live™, Causal Lens™ and Stella Online™.

Terms of Use

© 2017. isee systems inc . All rights reserved.