Please enable JavaScript to view this site.

Vensim Help

In the previous models we have used an Auxiliary variable with subtype With Lookup to enter the nonlinear effect of population density on the rate at which rabbits die.  In some cases it is desirable to place a name on the functional form.  This is especially true if you want to use the Lookup in more than one place.  

ØSave the model rabbit2.mdl as a new name (rabbit3.mdl).  
ØClick on the Variable tool and add the new variable effect of rabbit crowding on deaths function.
ØDraw an arrow from the effect of rabbit crowding on deaths function to effect of rabbit crowding on deaths.
ØOpen the equation editor on effect of rabbit crowding on deaths function.  
ØClick on the dropdown for type and select Lookup.  Click on the As Graph button to open the Graph Editor and enter the Lookup values as you did before.
ØClose the Graph Editor, add in units Dmnl and click on OK to close the Equation Editor.  Your equation should look like:

effect of rabbit crowding on deaths function( [(0,0)-(4,2)],(0,0.9),(1,1),(2,1.2),(3,1.5),(4,2))

Units: Dmnl

 

ØOpen the equation editor on effect of rabbit crowding on deaths.  
ØSelect the Subtype Normal from the dropdown.  The lower window will disappear.  Click on the beginning of the equation and select effect of rabbit crowding on deaths function from the Variable list.  Add parentheses () around normalized population.  
effect of rabbit crowding on deaths= 
       effect of rabbit crowding on deaths function(normalized population)

 

ØClick on OK to close the dialog.

This model is exactly the same as rabbit2.mdl except that the Lookup relationship has been explicitly named.  While naming Lookups in this manner is cumbersome for a simple relationship such as the one defined here it can be very helpful in more complex situations, especially if you want to use the same nonlinear relationship in more than one place.  When you click on the Simulation Setup button the named Lookup will highlight allowing you to change it.