Running Your Model
This section describes how you run a model built with Numerus's visual interface. It also describes several useful run-time features.
Clock Settings
Once you have built a model but before you can run it as a simulation, you must first set the clock parameters. The clock settings consist of the following 4 parameters:
- Start The time (in model time) when the simulation starts (this is usually 0).
- End The time (in model time) when the simulation ends.
- Dt The unit of increment (in model time) for updates.
- Integration Method The mathematical algorithm used to update Stocks.
Numerus currently uses an abstract unit of time ("model time") that serves as the equivalent of some model-dependent real time unit (seconds, minutes, hours, days, years). You can specify a time unit in the Unit text field.
Dt, the increment, or "delta t", value, is the amount of time that elapses between State updates. For discrete models this is fixed at 1 (see below), but can be any value otherwise (0.1, 0.01, 0.05, 2, 20).
Numerus supports 3 different integration methods
- Euler
- Current state values are used in computations to determine the next state. Used for all discrete models.
- RK2, RK4
- These Runge-Kutta algorithms treat Stocks and Variables as continuous functions and reduce the error by subdividing the update interval. Simulations run slower but with more accuracy. RK4 is the preferred option of the two.
- Discrete
- This is not actually an integration method; rather it sets Dt to 1 and uses the Euler method. The result is a sequence of State values rather than an attempt to approximate a continuous function.
Launching The Simulation
Once you have finished specifying the runtime parameters click the Launch button to produce the runtime canvas. This will either appear in a separate frame or as a new panel, depending on the mode choice made in Preferences.
Run Buttons
The runtime system comes with its own set of controls. Let’s break it down and see what they do.
- Buttons
- Reload
- This button reloads the NumerusScript program. It is equivalent to the Launch button on the main frame.
- Reset
- Returns the simulation to its initial state.
- Run
- Executes the model from its initial state.
- Stop
- Halts execution at the current point in model time.
- Cont
- Continues execution from the current state after a Stop.
- Step
- Executes a single time-step of length DT.