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

◆ MockAgent()

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

Member Function Documentation

◆ capacity()

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

◆ commod()

MockAgent cyclus::MockAgent::commod ( std::string  commod)

Sets the commodity to be offered/requested by the source/sink.

Definition at line 58 of file

◆ Finalize()

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

◆ lifetime()

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

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

Definition at line 74 of file

◆ recipe()

MockAgent cyclus::MockAgent::recipe ( std::string  recipe)

Sets the recipe to be offered/requested by the source/sink.

Definition at line 62 of file

◆ start()

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

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

Definition at line 70 of file

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