Public Member Functions | List of all members
cyclus::Timer Class Reference

Detailed Description

Controls simulation timestepping and inter-timestep phases.

Definition at line 22 of file timer.h.

#include <timer.h>

Public Member Functions

int dur ()
void Initialize (Context *ctx, SimInfo si)
void KillSim ()
void RegisterTimeListener (TimeListener *agent)
void Reset ()
void RunSim ()
void SchedBuild (Agent *parent, std::string proto_name, int t)
void SchedDecom (Agent *m, int time)
void Snapshot ()
int time ()
 Timer ()
void UnregisterTimeListener (TimeListener *tl)

Constructor & Destructor Documentation

cyclus::Timer::Timer ( )

Definition at line 241 of file

Member Function Documentation

int cyclus::Timer::dur ( )

Returns the duration of the simulation this Timer's timing.

the duration, in months

Definition at line 237 of file

void cyclus::Timer::Initialize ( Context ctx,
SimInfo  si 

Sets intial time-related parameters for the simulation.

ctxsimulation context

Definition at line 222 of file

void cyclus::Timer::KillSim ( )

Schedules the simulation to be terminated at the end of this timestep.

Definition at line 60 of file timer.h.

void cyclus::Timer::RegisterTimeListener ( TimeListener agent)

Registers an agent to receive tick/tock notifications every timestep.

Agents should register from their Deploy method.

Definition at line 165 of file

void cyclus::Timer::Reset ( )

resets all data (registered listeners, etc.) to empty or initial state

Definition at line 215 of file

void cyclus::Timer::RunSim ( )

Runs the simulation.

Definition at line 14 of file

void cyclus::Timer::SchedBuild ( Agent parent,
std::string  proto_name,
int  t 

Schedules the named prototype to be built for the specified parent at timestep t.

Definition at line 173 of file

void cyclus::Timer::SchedDecom ( Agent m,
int  time 

Schedules the given Agent to be decommissioned at the specified timestep t.

Definition at line 180 of file

void cyclus::Timer::Snapshot ( )

Schedules a snapshot of simulation state to output database to occur at the beginning of the next timestep.

Definition at line 57 of file timer.h.

int cyclus::Timer::time ( )

Returns the current time, in months since the simulation started.

the current time

Definition at line 211 of file

void cyclus::Timer::UnregisterTimeListener ( TimeListener tl)

Removes an agent from receiving tick/tock notifications.

Agents should unregister from their Decommission method.

Definition at line 169 of file

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