CYCLUS
Loading...
Searching...
No Matches
time_listener.h
Go to the documentation of this file.
1#ifndef CYCLUS_SRC_TIME_LISTENER_H_
2#define CYCLUS_SRC_TIME_LISTENER_H_
3
4#include <string>
5
6#include "context.h"
7#include "agent.h"
8
9namespace cyclus {
10
11/// The TimeListener class is an inheritable class for any Agent that
12/// requires knowlege of ticks and tocks. The agent should register as a
13/// TimeListener with its context from its Deploy method. For Example:
14///
15/// @code
16///
17/// MyFacility::Build(cyclus::Agent* parent) {
18/// cyclus::Facility::Build(parent);
19/// context()->RegisterTimeListener(this);
20/// }
21///
22/// @endcode
23class TimeListener: virtual public Ider {
24 public:
25 /// Simulation agents do their beginning-of-timestep activities in the Tick
26 /// method.
27 ///
28 /// @param time is the current simulation timestep
29 virtual void Tick() = 0;
30
31 /// Simulation agents do their end-of-timestep activities in the Tock
32 /// method.
33 ///
34 /// @param time is the current simulation timestep
35 virtual void Tock() = 0;
36
37 /// Simulation agents do their end-of-timestep decisions in the
38 /// Decision method. The decision method allows for agents to
39 /// make decision based on the operation of facilities during the
40 /// tick and tock of the current timestep. Facility operations
41 /// should not occur during this phase.
42 ///
43 /// @param time is the current simulation timestep
44 virtual void Decision(){};
45};
46
47} // namespace cyclus
48
49#endif // CYCLUS_SRC_TIME_LISTENER_H_
The TimeListener class is an inheritable class for any Agent that requires knowlege of ticks and tock...
virtual void Decision()
Simulation agents do their end-of-timestep decisions in the Decision method.
virtual void Tock()=0
Simulation agents do their end-of-timestep activities in the Tock method.
virtual void Tick()=0
Simulation agents do their beginning-of-timestep activities in the Tick method.
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
Definition agent.cc:14