Please enable JavaScript to view this site.

Vensim Help

The SMOOTH function is commonly used to take time averages and represent expectations.  It is different from LN, EXP and IF THEN ELSE in that it has time behavior built into it.  That is, if you know what value x takes on then you can compute EXP(x), but just knowing x does not tell you the value of SMOOTH(x,4), you also need to know what value the SMOOTH previously had.  This is because the SMOOTH function has a level implicitly built into it.

We will write the equation

expected demand=SMOOTH(demand, time to form expectations)

This equation is exactly the same as:

expected demand =INTEG((demand-expected demand)/ time to form expectations,demand)

When you use a SMOOTH function Vensim actually creates two variables.  One, expected demand, is treated as an Auxiliary that is equal to a Level made up by Vensim called #SMOOTH(demand,timetoformexpectations)#.  Normally Vensim will hide such variables internally, but you can display them by checking Macro Variables: Show  in the Settings  tab of the Global Options dialog (using the Tools>Options menu item).  This is not available in Vensim PLE or PLE Plus.

To enter the smooth equation:

ØOpen the Equation Editor on expected demand.

Because expected demand was entered in a box Vensim expects it to be a Level and the Equation Editor will open with this type selected.  To enter the SMOOTH equation, however, we want to change this type to Auxiliary.  We still want to keep the box around the variable, however, because of the hidden level it contains.

ØChange the equation Type from Level to Auxiliary using the dropdown list on the left.
ØClick on the Functions tab, select the function SMOOTH and press Enter.
ØClick on the Variables tab and click on demand.
ØDouble click on {stime} then click on time to form expectations in the variable list.
ØAdd the units Box/Month, the same as the units for demand.
ØClick on OK to close the Equation editor.

There are a number of functions which, like smooth, introduce hidden variables and dynamics.  These include DELAY1, DELAY1I, DELAY3, DELAY3I, FORECAST, SMOOTH3, SMOOTH3I, SMOOTHI and TREND.  It is often helpful to put variables using these functions in a box to emphasize the hidden Levels.  For the SMOOTH function itself, since it is so simple, it is often clearer to use the alternative INTEG formula instead of SMOOTH, but this is a matter of taste.

Whether it is written as SMOOTH(x,t) or INTEG((x-sx)/t,x), diagrammatically we have a Level with information arrows instead of rates coming in.  There are different schools of thought on whether or not Levels should be allowed to appear without rates.  We will often use the convention shown here for informational concepts, such as expected demand.  In this case, there is no physical process that increases or decreases an information concept, it simply adjusts in response to pressures and imbalances.  Vensim itself will let you draw both rates and informational arrows going into levels, so you need to choose a convention that will be clear to those you want to show your work to.