header logo

Slider Bars: Setting Initial Values of Box Variables

In addition to controlling the Infection Fraction, it would be nice to be able to vary the initial value of Susceptible People. Since Vensim PLE likes to associate sliders with constant auxiliary variables, you have to 'trick' it a little bit. Create an auxiliary variable to store the inital value for the box variable, set the box variable's intial value equal to that auxiliary, and create a slider to control the auxiliary variable.

Procedure:

  • ICON First, add a new auxiliary variable and name it Initial Value of Susceptible People.
  • ICON Add a connector from this auxiliary varible to Susceptible People.
  • ICON Open the equations window of Susceptible People.
  • Select Initial Value of Susceptible People as the initial value for Susceptible People and click OK.
  • ICON Open the equations window for Initial Value of Susceptible People.
  • Set this constant equal to 99 (the default for our model) and click OK.
  • Following the process on the previous page, create a slider associated with Initial Value of Susceptible People.

Although slightly indirect, this implementation of sliders offers great interactive control over the inital values of box variables.


Previous Next

Vensim PLE is a product of Ventana Systems, Inc.