Please enable JavaScript to view this site.

Vensim Help

Navigation: Reference Guide > The Vensim Modeling Language

Selecting an Integration Technique

Scroll Prev Top Next More

Vensim provides you with a number of choices for integration that basically trade off speed and accuracy.  The best choice of an integration technique depends on what your purpose is.  For most models of messy problems, where there are large errors from aggregation, mismeasurement, simplification, and lack of information, Euler integration suffices.  For models of physical systems and for simple conceptual models, especially those involving oscillation, Runge-Kutta integration is often preferred.  

If you are conceptualizing your model as a difference equation model, then Euler and Diff are the only integration techniques that are appropriate.  

The details of the different techniques are discussed below.  The choices are:

Euler which performs Euler integration for the simplest, fastest (and least accurate) solution.

Diff which performs Euler integration but stores the values for Auxiliaries computed at the previous save Time.  Regular Euler integration stores the values of Auxiliaries computed at the current save time. Diff, as its name suggests, is intended primarily for difference equations where this reporting convention is often used.

RK4 Auto which performs fourth order Runge-Kutta integration with automatic adjustment of the step size to ensure accuracy.  This is the best choice if you want an accurate answer quickly.

RK4 Fixed which performs fourth order Runge-Kutta integration with a fixed step size specified by TIME_STEP.  This is usually very accurate, but does not detect its own inaccuracies.

RK2 Auto which performs second order Runge-Kutta integration with automatic adjustment of the step size.  This is less accurate, but sometimes faster than RK4 auto.  It is not recommended unless you feel there is a special reason to use it.

RK2 Fixed which performs second order Runge-Kutta integration with a fixed step size.  This is faster than RK4 but more accurate than Euler.  It is useful when both speed and accuracy are important and difficult to achieve.