Please enable JavaScript to view this site.

Vensim Help

Sets, changes or removes a SyntheSim override on variable.  This is the scripting equivalent of the interactive override controls described in Overrides - Changing Behavior.  

NOTE  This command only has an effect while SyntheSim is active (for example after MENU>SYNTHESIM).  Outside SyntheSim mode nothing happens and a warning is issued; invalid variable names, modes or arguments are also reported as warnings.  To leave SyntheSim mode use SPECIAL>STOPSIM.

variable is the name of the model variable to override (Time and Lookups cannot be overridden).  Subscripted names are supported; if the variable name contains subscripts you will need to surround the whole command in double quotes " ". mode is one of the mode names listed below (case does not matter).  The remaining parameters are numbers whose meaning depends on the mode.

NONE  removes any existing override so that the variable follows its model equation again.  There are no additional parameters.

SIMULATE>OVERRIDE|variable|NONE

CONSTANT  holds the variable at the constant value start, controllable with a slider ranging from min to max in steps of increment.

SIMULATE>OVERRIDE|variable|CONSTANT|min|max|increment|start

STEP  starts the variable at from and changes it to to when Time reaches at time.

SIMULATE>OVERRIDE|variable|STEP|from|to|at time

RAMP  holds the variable at from until start time, then ramps it linearly up or down to reach to at end time, after which it is again constant.

SIMULATE>OVERRIDE|variable|RAMP|from|to|start time|end time

EXP_GROWTH  holds the variable at start until change at time, then grows it exponentially at growth rate for the rest of the simulation.  The rate is in percent per unit time, so that 2 means 2%/year for a model with time in years.

SIMULATE>OVERRIDE|variable|EXP_GROWTH|start|change at time|growth rate

EXP_DECAY  holds the variable at start until change at time, then decays it toward zero at decay rate for the rest of the simulation.  The rate is in percent per unit time, so that 5 means 5%/month for a model with time in months.

SIMULATE>OVERRIDE|variable|EXP_DECAY|start|change at time|decay rate

SIN  creates a sine wave that oscillates between from and to with the period period.  The variable holds the mean of the two values until mean value until time, then begins oscillating.

SIMULATE>OVERRIDE|variable|SIN|from|to|mean value until time|period

PULSE  holds the variable at base until at time, when it takes on the value pulsing to for duration, then returns to base.  A duration of 0 gives a pulse lasting one TIME STEP.

SIMULATE>OVERRIDE|variable|PULSE|base|pulsing to|at time|duration

PULSE_TRAIN  creates repeating pulses.  The variable stays at base between pulses and takes on the value pulsing to for duration during each pulse, with pulses starting every repeating every time units.

SIMULATE>OVERRIDE|variable|PULSE_TRAIN|base|pulsing to|repeating every|duration

SQUARE_WAVE  creates a square wave that alternates between from and to, switching every half period.  The variable holds the mean of the two values until mean value until time, then begins switching.

SIMULATE>OVERRIDE|variable|SQUARE_WAVE|from|to|mean value until time|period

FREEZE_AT_TIME  lets the variable follow its model equation until at time, then freezes it at whatever value it had at that time for the rest of the simulation.

SIMULATE>OVERRIDE|variable|FREEZE_AT_TIME|at time

FREEZE_BETWEEN_TIMES  freezes the variable's value during the time window from from time to to time.  Outside the window the variable follows its normal model equation.

SIMULATE>OVERRIDE|variable|FREEZE_BETWEEN_TIMES|from time|to time

FREEZE_UNTIL_TIME  holds the variable at its initial value until until time, then releases it to follow its normal model equation.

SIMULATE>OVERRIDE|variable|FREEZE_UNTIL_TIME|until time

NOTE  Freezing a Level clamps the value of the Level itself; the flows into and out of it are untouched and keep their computed values.  A frozen Level can therefore display a nonzero net flow — the suppressed change is not apportioned back to the flows.

LIMIT  leaves the variable following its own model equation, but clips the computed value so that it stays between min and max.  On a Level the bound also holds the rate: while the Level sits at a bound, a net rate that would push it further outside is zeroed, while a rate bringing it back inside acts normally.

SIMULATE>OVERRIDE|variable|LIMIT|min|max

PERTURB  multiplies the variable's computed value by (1 + r).  For a Level the perturbation is applied to its net rate of change instead, leaving its initial value unchanged; when the value is at or near zero, r is added rather than multiplied.  Perturbing a Level nudges a system state, while perturbing an Auxiliary changes the gain of a single link — to test a particular feedback loop, perturb a variable on that loop.  A tiny r (such as 1e-8) confirms gains predicted by linearization; a larger one (such as 0.1) tests the response at realistic magnitudes.

SIMULATE>OVERRIDE|variable|PERTURB|r

PERTURB_BETWEEN_TIMES  applies the same perturbation only during the time window from start time (inclusive) up to stop time (exclusive).

SIMULATE>OVERRIDE|variable|PERTURB_BETWEEN_TIMES|r|start time|stop time

NOTE  LIMIT, PERTURB and PERTURB_BETWEEN_TIMES act on values the model itself computes, so they cannot be applied to variables that take their values from data.

The freeze modes are most useful for freezing Levels; see Freezing Levels for a description of the corresponding interactive controls.  The other modes correspond to the input modes described in Input Modes.