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

◆ Timer()

cyclus::Timer::Timer ( )

Definition at line 258 of file

Member Function Documentation

◆ dur()

int cyclus::Timer::dur ( )

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

the duration, in months

Definition at line 254 of file

◆ Initialize()

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

Sets intial time-related parameters for the simulation.

ctxsimulation context

Definition at line 239 of file

◆ KillSim()

void cyclus::Timer::KillSim ( )

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

Definition at line 60 of file timer.h.

◆ RegisterTimeListener()

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 182 of file

◆ Reset()

void cyclus::Timer::Reset ( )

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

Definition at line 232 of file

◆ RunSim()

void cyclus::Timer::RunSim ( )

Runs the simulation.

Definition at line 16 of file

◆ SchedBuild()

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 190 of file

◆ SchedDecom()

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

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

Definition at line 197 of file

◆ Snapshot()

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.

◆ time()

int cyclus::Timer::time ( )

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

the current time

Definition at line 228 of file

◆ UnregisterTimeListener()

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

Removes an agent from receiving tick/tock notifications.

Agents should unregister from their Decommission method.

Definition at line 186 of file

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