Learn R Programming

rrepast (version 0.4.0)

Model: The easy API for model initilization

Description

Instantiate a repast model from the model dir without loading the scenario file.

Usage

Model(modeldir = "", maxtime = 300, dataset = "none", load = FALSE)

Arguments

modeldir
The installation directory of some repast model
maxtime
The total simulated time
dataset
The name of any model aggregate dataset
load
--- If true instantiate model and load scenario

Value

  • Returns the instance of repast model

Details

This is the entry point for model execution. Typically any model execution will start with this function which encapsulates all low level calls for model initialization. In order to perform simulations with repast from R code only Model and a few more function calls are required: Load, Run. Finally the output of model is managed with functions GetResults and SaveSimulationData.

References

[1] North, M.J., N.T. Collier, and J.R. Vos, "Experiences Creating Three Implementations of the Repast Agent Modeling Toolkit," ACM Transactions on Modeling and Computer Simulation, Vol. 16, Issue 1, pp. 1-25, ACM, New York, New York, USA (January 2006).

Examples

Run this code
d<- "C:/usr/models/your-model-directory"
   m<- Model(d)

Run the code above in your browser using DataLab