CYCLUS
|
Handles initialization of a simulation from the output database.
After calling Init, Restart, or Branch, the initialized Context, Timer, and Recorder can be retrieved.
Definition at line 24 of file sim_init.h.
#include <sim_init.h>
Public Member Functions | |
void | Branch (QueryableBackend *b, boost::uuids::uuid prev_sim_id, int t, boost::uuids::uuid new_sim_id) |
Context * | context () |
void | Init (Recorder *r, QueryableBackend *b) |
Recorder * | recorder () |
void | Restart (QueryableBackend *b, boost::uuids::uuid sim_id, int t) |
SimInit () | |
Timer * | timer () |
~SimInit () | |
Static Public Member Functions | |
static Material::Ptr | BuildMaterial (QueryableBackend *b, int resid) |
static Product::Ptr | BuildProduct (QueryableBackend *b, int resid) |
static void | SnapAgent (Agent *m) |
static void | Snapshot (Context *ctx) |
cyclus::SimInit::SimInit | ( | ) |
Definition at line 17 of file sim_init.cc.
cyclus::SimInit::~SimInit | ( | ) |
Definition at line 19 of file sim_init.cc.
void cyclus::SimInit::Branch | ( | QueryableBackend * | b, |
boost::uuids::uuid | prev_sim_id, | ||
int | t, | ||
boost::uuids::uuid | new_sim_id ) |
NOT IMPLEMENTED.
Initializes a simulation branched from prev_sim_id at time t with diverging state described in new_sim_id.
TODO(rwcarlsen): implement
Definition at line 44 of file sim_init.cc.
|
static |
Convenience function for reconstructing an untracked material object with the given resource state id from a database backend b.
Particularly useful for running mock simulations/tests.
Definition at line 542 of file sim_init.cc.
|
static |
Convenience function for reconstructing an untracked product object with the given resource state id from a database backend b.
Particularly useful for running mock simulations/tests.
Definition at line 556 of file sim_init.cc.
|
inline |
Returns the initialized context.
Note that either Init, Restart, or Branch must be called first.
Definition at line 58 of file sim_init.h.
void cyclus::SimInit::Init | ( | Recorder * | r, |
QueryableBackend * | b ) |
Initialize a simulation with data from b for simulation id in r.
SimInit does not take ownership of the recorder or backend. the configured context's recorder is set to r.
Definition at line 25 of file sim_init.cc.
|
inline |
Returns the initialized recorder with registered backends.
Note that either Init, Restart, or Branch must be called first.
Definition at line 62 of file sim_init.h.
void cyclus::SimInit::Restart | ( | QueryableBackend * | b, |
boost::uuids::uuid | sim_id, | ||
int | t ) |
EXPERIMENTAL (might not work properly).
Restarts a simulation from time t with data from b identified by simid. The newly configured simulation will run with a new simulation id.
Definition at line 32 of file sim_init.cc.
Records a snapshot of the agent's current internal state into the simulation's output database.
Note that this should generally not be called directly.
Definition at line 124 of file sim_init.cc.
Records a snapshot of the current state of the simulation being managed by ctx into the simulation's output database.
Definition at line 76 of file sim_init.cc.
|
inline |
Returns the initialized timer.
Note that either Init, Restart, or Branch must be called first.
Definition at line 66 of file sim_init.h.