RepastHPC  2.3.1
Public Member Functions | Protected Attributes | List of all members
repast::relogo::SimulationRunner Class Reference

Runs a Relogo simulation. More...

#include <SimulationRunner.h>

Public Member Functions

 SimulationRunner (boost::mpi::communicator *communicator)
 Creates a SimulationRunner.
 
template<typename ObserverType , typename PatchType >
void run (Properties &props)
 Creates and runs the simulation using the properties defined in props. More...
 

Protected Attributes

boost::mpi::communicator * comm
 

Detailed Description

Runs a Relogo simulation.

Member Function Documentation

◆ run()

template<typename ObserverType , typename PatchType >
void repast::relogo::SimulationRunner::run ( Properties props)

Creates and runs the simulation using the properties defined in props.

The properties file must have the following properties defined:

  • min.x the minimum integer x coordinate of the world
  • min.y the minimum integer y coordinate of the world
  • max.x the maximum integer x coordinate of the world
  • max.h the maximum integer y coordinate of the world
  • grid.buffer the size of the grid and space buffers
  • proc.per.x the number of processes to assign to the world's x dimension. proc.per.x multiplied by proc.per.y must equal the number processes that the simulation will run on
  • proc.per.y the number of processes to assign to the world's y dimension. proc.per.x multiplied by proc.per.y must equal the number processes that the simulation will run on
  • stop.at the tick at which to stop the simulation

    This will create an Observer of the specified type and populate the world with Patches of the specified type. It will then call setup(props) on that Observer implementation and start the simulation schedule which will call the Observer's go method each tick.

    Parameters
    propsa properties file containing the properties mentioned above
    Template Parameters
    ObserverTypethe type of Observer to create. This type must extend relogo::Observer.
    PatchTypethe type of Patches to create. This must extend relogo::Patch.

The documentation for this class was generated from the following file: