Abstract

Computer simulation is used to produce numerical values of the state variables of a dynamic system model over time. Computer programs are created to encode the mathematical equations that describe the dynamic model, specify initial conditions and environmental inputs, then start a program loop during which the changes to system state variables are computed at each time step and state variables are incremented to produce values for the next time step. Repeating this set of calculations as time progrefsses from a starting to an ending value, one obtains estimated values of the system’s state variables vs. time. A general set of steps are used to simulate dynamic models represented by differential equations in continuous time and those represented by difference equations with time progressing in discrete steps. In this chapter, we present three different numerical methods used to obtain approximate solutions to continuous time models written as ordinary differential equations (Euler, Improved Euler, and Runge-Kutta Fourth Order methods). Errors associated with use of numerical approximations are discussed relative to the importance of selecting appropriate time steps. We also discuss the implementation of computer code in R for simulating difference equation models, pointing out similarities and differences with programs written to simulate continuous time dynamic models. Examples of R programs are presented and discussed for various dynamic models, including a continuous differential equation model of insect population dynamics and difference models for a soil water balance and a simple maize crop model.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call