Please enable JavaScript to view this site.

Vensim Help

The SLIDEVARTIE control is used to connect a number of SLIDEVAR controls, forcing the sum of the value of the SLIDEVAR to add to a number.  This is often useful if you want slidevars to be fractions of a number, e.g., fractions that sum to one.  

Only txt is significant.  It must take the form

count=x,search order1,search order2 ..., search order count

Where count is the number of SLIDEVAR controls that are being tied together.  Vensim will search for the last count SLIDEVAR controls that precede the SLIDEVARTIE control.  These controls do not have to be one after another, though this is the easiest way to use them.

is the number the different SLIDEVARS have to sum to.  

search order  is used to determine the order in which the other SLIDEVAR controls will be adjusted in order to add to x.  The search order begins by specifying the SLIDEVAR control that is being moved, then a greater than > and then the other SLIDEVAR controls that will move in order to keep the sum at one.  The search order specification uses the greater than > to indicate that the SLIDEVARs should be adjusted sequentially, and a vertical bar to indicate that they should be adjusted in parallel.  SLIDEVARs will be adjusted until they hit their own minimums or maximums.  Once this happens the later SLIDEVARs in the sequence will be adjusted.  When no more adjustments can be made the SLIDEVAR being adjusted will no longer move.  

SLIDEVAR adjustments can be grouped is appropriate.  For example 1>2|3>4|5 would first adjust 2 and 3 when one is being moved and if both of these hit a bound would then adjust 4 and 5.  The numbers always refer to the SLIDEVARs being tied together in the order they appear in the source file.  A search order can be empty (as in 1,) indicating that the SLIDEVAR in question will only act as a residual.  Every SLIDEVAR being tied together must have a search order specified.

Consider the example:

SLIDEVAR,"FRACTION IMMUNE",60,25,20,8,H,l[0.0|.4|0.01|0|1]

SLIDEVAR,"FRACTION INFECTED",60,35,20,8,H,l[.01|.5|0.01|0|1]

SLIDEVAR,"FRACTION UNAFFECTED",60,45,20,8,H,l[.4|1.0|0.01|0|1]

SLIDEVARTIE,"3=1.0,1>2|3,2>3|1,3>1|2",0,0,0,0

This forces the 3 preceding SLIDEVARs to add to 1.0, and causes the two other SLIDEVARs to adjust in parallel when a SLIDEVAR is moved.  Changing the SLIDEVARTIE control to

SLIDEVARTIE,"3=1.0,1>2>3,2>3>1,3>1>2",0,0,0,0

Moves first the immediately following SLIDEVAR and then the remaining SLIDEVARs