CYCLUS
|
MockAgent is a template for accumulating configuration information used to generate a source or sink facility in a MockSimulation.
All parameters other than commod have defaults. After all desired configuration is completed, the Finalize function MUST be called. All configure functions return the MockAgent itself to enable chaining. Default configuration is:
For examples on how to use MockAgent, see the MockSim API documentation.
Definition at line 25 of file mock_sim.h.
#include <mock_sim.h>
Public Member Functions | |
MockAgent | capacity (double cap) |
MockAgent | commod (std::string commod) |
std::string | Finalize () |
MockAgent | lifetime (int duration) |
MockAgent (Context *ctx, Recorder *rec, SqliteBack *b, bool is_source) | |
MockAgent | recipe (std::string recipe) |
MockAgent | start (int timestep) |
cyclus::MockAgent::MockAgent | ( | Context * | ctx, |
Recorder * | rec, | ||
SqliteBack * | b, | ||
bool | is_source ) |
Initializes a MockAgent to create a source (is_source == true) or a sink (is_source == false) in the provided simulation context.
rec must be the recorder used to initialize ctx and b must be a backend registered with rec.
Definition at line 40 of file mock_sim.cc.
Sets the per time step capacity/throughput limit for provided/received material in kg for the source/sink.
Definition at line 66 of file mock_sim.cc.
MockAgent cyclus::MockAgent::commod | ( | std::string | commod | ) |
Sets the commodity to be offered/requested by the source/sink.
Definition at line 58 of file mock_sim.cc.
std::string cyclus::MockAgent::Finalize | ( | ) |
Finalize MUST be called after configuration is complete to actually create the source/sink agent (or schedule it to be built).
The auto-generated prototype name of the created prototype is returned to support querying based on specific sources/sinks.
Definition at line 79 of file mock_sim.cc.
Sets the lifetime in time steps of the source/sink before it is decommissioned.
Definition at line 74 of file mock_sim.cc.
MockAgent cyclus::MockAgent::recipe | ( | std::string | recipe | ) |
Sets the recipe to be offered/requested by the source/sink.
Definition at line 62 of file mock_sim.cc.
Sets the time step in the simulation that the source/sink should be deployed.
Definition at line 70 of file mock_sim.cc.