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

The simulation schedule queue. More...

#include <Schedule.h>

Public Types

typedef boost::shared_ptr< FunctorFunctorPtr
 Typedef of for the functors that get scheduled.
 

Public Member Functions

ScheduledEventschedule_event (double at, FunctorPtr functor)
 Schedule the specified functor to execute once at the specified tick. More...
 
ScheduledEventschedule_event (double start, double interval, FunctorPtr func)
 Schedules the specified functor to execute start at start, and at the specified interval thereafter. More...
 
void execute ()
 
double getCurrentTick () const
 Gets the current simulation tick. More...
 
double getNextTick () const
 Gets the next tick at which the next events will be executed. More...
 

Detailed Description

The simulation schedule queue.

This wraps a priority queue to schedule repast ScheduledEvents.

Member Function Documentation

◆ getCurrentTick()

double repast::Schedule::getCurrentTick ( ) const
inline

Gets the current simulation tick.

Returns
the current simulation tick.

◆ getNextTick()

double repast::Schedule::getNextTick ( ) const
inline

Gets the next tick at which the next events will be executed.

Returns
the next tick at which the next events will be executed.

◆ schedule_event() [1/2]

ScheduledEvent * repast::Schedule::schedule_event ( double  at,
FunctorPtr  functor 
)

Schedule the specified functor to execute once at the specified tick.

Parameters
atthe tick to execute at
functorthe functor to schedule
Returns
the event that has been scheduled

◆ schedule_event() [2/2]

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

Schedules the specified functor to execute start at start, and at the specified interval thereafter.

Parameters
start
interval
func
Returns
the event that has been scheduled

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