Very early this morning I dropped into Hacker Dojo in Mountain View. Founder Brian Klug was still there from the night before and invited me in. Accomplace Luke offered up a great cup of French-pressed coffee from Brazil while we discussed an R package for ecological simulations called simecol.
The design goals of simecol are set out in an article written in the Journal of Statistical Software (Petzoldt and Rinke) that describes simecol as R's "standard protocol for describing individual-based and agent-based models."
Suppose you have a natural system of states with interdependent variables. A classic example is the Lotka-Volterra predator-prey model of differential equations. There are several factors that influence the behavior of the system. Take an insect species and the existence of another organism that feeds on the insects. The initial conditions of the system are stated in terms of the initial density of each of the agent populations. The behavior of the system depends on the interaction of agents - the independent growth rate of the organisms, the predation rate of the prey when they encounter predators, the rate of reproduction of predator and prey, the death rate of predators, and systemic boundaries. There are points in the system that exhibit a resurgence of prey with concurrent decrease in predator population. If prey density is low enough, predators will start to die off.
The simecol package places the various system parameters, functions, and initial conditions into the model as objects of the simObj class. sim(simObjects, ...) is the core function that makes simObjects work. The result of each simulation is a modified version of the original simObject.