Once you've spelled out the goals and boundaries of your model and you've developed an initial map of the model (as described in Planning and Building Your Model), you need to add the information that will transform the model you're picturing into a working simulation. This process is called building the model, and it's when you place the key variables in your model onto the diagram, and then assign equations and numerical values to those variables.
The following procedure is a high-level guide to the steps involved in building a model.
Set the time your model will run over..
This is done from the Model Settings Properties Panel. Set the units of measure, the start time and the stop time (see Setting up Time Bounds). Try to set DT to be smaller than the amount of time over which you would expect a noticeable change to occur (see Understanding DT (Delta Time) for more discussion).
Note: The units of measure entered will be used for all Model flows.
Place stocks and flows for the "main chains" in your model.
When you were first planning your model, you identified the stocks and flows central to the system or process you're trying to convey. Now, you can lay those out on the diagram and connect them to each other to see how they fit together and might interact. These are like your keywords.
Note: Be aware of unit consistency (each flow into or out of a stock must use the same unit of measure as the stock itself, except for "per time"; all stocks in a main chain must use the same unit of measure) and conservation laws.
Add connectors.
Connectors function as conjunctions. Use them to join stocks and flows together, and join flows together with other flows, to transmit information and actions from one variable to another.
Add converters.
Converters have two main roles: they function as adverbs, by modifying flows (like indicating how quickly or slowly a flow is moving); and they convert units of measure from one variable, to make them compatible with another, connected variable.
Graphical functions are graphs that show the relationships between variables in a model. When one model variable changes, the other will change, depending on assumptions or perception of what happens in reality and how that's laid out in the graphs.
Define variables by adding equations and values.
If you haven't done it already, specify the equations and/or initial values for the stocks, flows, and converters in the model. If you're defining constants, use simple numbers for testing before you introduce more realistic numbers.
Assign and check units.
If you didn't assign units to the stocks and converters in your model already, go back and do that now. Then, check the model's units to ensure that the left- and right-hand sides of equations have consistent units, and that conserved flow chains have consistent units.
Identify and highlight feedback loops in your model.
Make the model's feedback loops clear by assigning polarity to connectors and flows in your model. Assigning positive ("+/s") or negative ("-/o") polarity lets you visually indicate the cause-and-effect relationship between model variables. You can also mark loops as either balancing ("-" or "B") or reinforcing ("+" or "R") by placing a text box in the loop. You can format it to contain the information you want in the Text Box Properties Panel.
Add objects to fill out detail.
In the Stella window, add graphs, tables, text, images, or other objects to help people use your model and easily understand its output.
When you've finished building a first draft of your model, test it by running the model and looking for errors, implausible results, and other problems.
Once your model is working, you can move parts of it into modules, or "sub-models". Modules allow you to create "black-boxes", adding clarity to your model without reducing complexity. You can also reuse modules in other models.
For more information, see Working with Modules.