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

Detailed Description

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)
 

Constructor & Destructor Documentation

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 39 of file mock_sim.cc.

Member Function Documentation

MockAgent cyclus::MockAgent::capacity ( double  cap)

Sets the per time step capacity/throughput limit for provided/received material in kg for the source/sink.

Definition at line 65 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 57 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 78 of file mock_sim.cc.

MockAgent cyclus::MockAgent::lifetime ( int  duration)

Sets the lifetime in time steps of the source/sink before it is decommissioned.

Definition at line 73 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 61 of file mock_sim.cc.

MockAgent cyclus::MockAgent::start ( int  timestep)

Sets the time step in the simulation that the source/sink should be deployed.

Definition at line 69 of file mock_sim.cc.


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