You are here

Running models : building models

Running simulations : preparing a model for running

Simile runs a model by executing a program that it has generated specifically for that model. This program contains all the instructions need to calculate the values of the model variables as they change over time. Whenever you want to run the model after making any changes to it, you must re-generate this program. At the same time, the value of all the variables are calculated ready for the start of the simulation.

To build the model, select either the "Run" command in the Model menu, or the "Debug" command. These generate programs in either of two languages, C++ or Tcl, respectively. Use the "Debug" command if you have a problem running your model, due to a mathematical error. You will get a more informative error message. Otherwise, use the "Run" command, for faster model execution.

If you use the Windows or Mac versions of Simile, you may choose to use a c++ compiler already installed on your computer rather than the one included with Simile. The Preferences dialogue window, obtained by selecting the Preferences item in the Edit menu, is used to indicate which C++ compiler is to be invoked. An open source C++ compiler, GNU g++, is included in the Simile distribution. Under Windows, Microsoft Visual C++ is also supported. Linux users on the other hand are expected to have the GNU g++ compiler installed on their system, and Simile will always use this compiler.

Development of a model will often involve an "edit/run cycle" in which the modeller alternates between exploring the behaviour of the running model, and making changes to the model diagram and equations. Changes to the model diagram and equations are not reflected in the behaviour of the executing model until "Run" or "Debug" is selected again. Interacting with an executing model that is out-of-date will produce a warning message and a change in the status indicator. This warning message provides an option of rebuilding the model, and there is also a "rerun" button in the model window toolbar (play arrow or running man) that rebuilds the model and starts it running in a single operation.

In: Contents >> Running models