RepastHPC  2.3.1
Public Member Functions | List of all members
repast::ScheduleRunner Class Reference

Runs the Schedule by popping events off of the Schedule and executing them; also provides methods for scheduling events. More...

#include <Schedule.h>

Inheritance diagram for repast::ScheduleRunner:

Public Member Functions

 ScheduleRunner (boost::mpi::communicator *communicator)
 
ScheduledEventscheduleEvent (double at, Schedule::FunctorPtr func)
 Schedules the Functor to execute at the specified tick. More...
 
ScheduledEventscheduleEvent (double start, double interval, Schedule::FunctorPtr func)
 Schedules the Functor to execute at the specified start tick and every interval thereafter. More...
 
void scheduleEndEvent (Schedule::FunctorPtr func)
 Schedules the specified functor to execute when the simulation ends. More...
 
void scheduleStop (double at)
 Schedules the simulation to stop at the specified tick. More...
 
void run ()
 Starts and runs the simulation schedule.
 
double currentTick ()
 Gets the current tick. More...
 
void stop ()
 Stops the simulation.
 
const Scheduleschedule ()
 Gets the schedule executed by this simulation runner. More...
 

Detailed Description

Runs the Schedule by popping events off of the Schedule and executing them; also provides methods for scheduling events.

Simulation events should be scheduled for execution using this class which is accessible via RepastProcess::instance()->getScheduleRunner()

Member Function Documentation

◆ currentTick()

double repast::ScheduleRunner::currentTick ( )
inline

Gets the current tick.

Returns
the current tick

◆ schedule()

const Schedule& repast::ScheduleRunner::schedule ( )
inline

Gets the schedule executed by this simulation runner.

Returns
the schedule used by this simulation runner.

◆ scheduleEndEvent()

void repast::ScheduleRunner::scheduleEndEvent ( Schedule::FunctorPtr  func)

Schedules the specified functor to execute when the simulation ends.

Parameters
functhe functor to execute when the simulatione ends

◆ scheduleEvent() [1/2]

ScheduledEvent * repast::ScheduleRunner::scheduleEvent ( double  at,
Schedule::FunctorPtr  func 
)

Schedules the Functor to execute at the specified tick.

Parameters
atthe time to execute at
functhe functor to execute
Returns
the event that was scheduled for the func

◆ scheduleEvent() [2/2]

ScheduledEvent * repast::ScheduleRunner::scheduleEvent ( double  start,
double  interval,
Schedule::FunctorPtr  func 
)

Schedules the Functor to execute at the specified start tick and every interval thereafter.

Parameters
startthe time to start at
intervalthe interval to execute at
functhe functor to execute
Returns
the event that was scheduled for the func

◆ scheduleStop()

void repast::ScheduleRunner::scheduleStop ( double  at)

Schedules the simulation to stop at the specified tick.

Parameters
atthe tick at which the simulation should stop

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