1#ifndef CYCLUS_SRC_MOCK_SIM_H_
2#define CYCLUS_SRC_MOCK_SIM_H_
205 void DummyProto(std::string name, std::string commod,
double capacity);
The abstract base class used by all types of agents that live and interact in a simulation.
boost::shared_ptr< Composition > Ptr
A simulation context provides access to necessary simulation-global functions and state.
boost::shared_ptr< Material > Ptr
MockAgent is a template for accumulating configuration information used to generate a source or sink ...
MockAgent recipe(std::string recipe)
Sets the recipe to be offered/requested by the source/sink.
MockAgent lifetime(int duration)
Sets the lifetime in time steps of the source/sink before it is decommissioned.
MockAgent commod(std::string commod)
Sets the commodity to be offered/requested by the source/sink.
MockAgent start(int timestep)
Sets the time step in the simulation that the source/sink should be deployed.
MockAgent capacity(double cap)
Sets the per time step capacity/throughput limit for provided/received material in kg for the source/...
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 ...
std::string Finalize()
Finalize MUST be called after configuration is complete to actually create the source/sink agent (or ...
MockSim is a helper for running full simulations entirely in-code to test archetypes/agents without h...
MockSim(int duration)
Creates and initializes a new empty mock simulation environment where duration is the length of the s...
Product::Ptr GetProduct(int resid)
Reconstructs a product object from the simulation results database with the given resource state id.
MockAgent AddSink(std::string commod)
AddSink adds a sink facility that can request+receive material from the archetype being tested.
void AddRecipe(std::string name, Composition::Ptr c)
AddRecipe adds a recipe to the mock simulation environment (i.e.
Agent * agent
the agent being tested by the mock simulation environment.
void DummyProto(std::string name)
Adds a dummy prototype to the simulation that can be used by institutions and other agents for deploy...
Material::Ptr GetMaterial(int resid)
Reconstructs a material object from the simulation results database with the given resource state id.
SqliteBack & db()
Returns the underlying in-memory database containing results for the simulation.
Context * context()
Returns the context for the mock simulation environment.
int Run()
Runs the simulation.
MockAgent AddSource(std::string commod)
AddSource adds a source facility that can offer/provide material to the archetype being tested.
boost::shared_ptr< Product > Ptr
Collects and manages output data generation for the cyclus core and agents during a simulation.
An Recorder backend that writes data to an sqlite database.
Controls simulation timestepping and inter-timestep phases.
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters