Nova Workshop2015: Insecticide

From Nova Documentation
Revision as of 19:00, 18 June 2015 by Omuellerklein (Talk | contribs) (The v(n,ta,g) function)

Jump to: navigation, search

This is an extension of the Lotka-Volterra that was discussed and created in the 2015 Nova Workshop at Oberlin College.

About this model

This model looks at the rates of predator and prey with the use of insecticides.

Error creating thumbnail: File missing

Prey Stock and Flow

This is the code within the Births and predation Flow for the prey Stock.


Error creating thumbnail: File missing

This uses the v(n, ta, g) function that is defined in the Programming Window in the top-left corner of Nova. This function is described below.


Predator Stock and Flow

This is the code within the eating and death Flow for the predator Stock.

Error creating thumbnail: File missing

This uses the v(n, ta, g) function that is defined in the Programming Window in the top-left corner of Nova. This function is described below.

The v(n,ta,g) function

The v(n, ta, g) function within the Programming Window (top-left of Nova) is used in both the prey and predator Stock and Flows.

Error creating thumbnail: File missing


Note: functions have their own environment in which the variables that they use live within. You must give a function the variables that it will use. In other words, the v() function uses the variables n, ta, and g. Thus, we need to give that function those parameters (or arguments). We pass the TIME() built-in function (Primop) as the parameter n in the Births and predation and eating and death Flows.

Also, this function uses the Ternary Conditional. Conditional statements (like the if-else statement) are extremely important concepts in computer programming for most modeling. You can get references and examples here:

Ternary Conditional and more

It may be helpful to search for Ternary Conditional, JS Math Functions, and If-else Statements in the Mozilla Developer Network site (developer.mozilla.org).

Tables and Graphs

We can set the Tables and Graphs by right-clicking and going to the Properties section for each. Drag variables to the right side of the >>> arrows that you would like to show in the Table(s) and Graph(s).

Error creating thumbnail: File missing
Error creating thumbnail: File missing