CYCAMORE
Public Member Functions | Private Attributes | List of all members
cycamore::Sink Class Reference

This facility acts as a sink of materials and products with a fixed throughput (per time step) capacity and a lifetime capacity defined by a total inventory size. More...

#include <sink.h>

Inheritance diagram for cycamore::Sink:

Public Member Functions

virtual void AcceptGenRsrcTrades (const std::vector< std::pair< cyclus::Trade< cyclus::Product >, cyclus::Product::Ptr > > &responses)
 SinkFacilities place accepted trade Materials in their Inventory. More...
 
virtual void AcceptGenRsrcTrades (const std::vector< std::pair< cyclus::Trade< cyclus::Product >, cyclus::Product::Ptr > > &responses)
 SinkFacilities place accepted trade Materials in their Inventory. More...
 
virtual void AcceptMatlTrades (const std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &responses)
 SinkFacilities place accepted trade Materials in their Inventory. More...
 
virtual void AcceptMatlTrades (const std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &responses)
 SinkFacilities place accepted trade Materials in their Inventory. More...
 
void AddCommodity (std::string name)
 add a commodity to the set of input commodities More...
 
void AddCommodity (std::string name)
 add a commodity to the set of input commodities More...
 
virtual Json::Value annotations ()
 
void Capacity (double cap)
 sets the capacity of a material generated at any given time step More...
 
double Capacity () const
 
void Capacity (double cap)
 sets the capacity of a material generated at any given time step More...
 
double Capacity () const
 
virtual cyclus::Agent * Clone ()
 
virtual void EnterNotify ()
 
virtual void EnterNotify ()
 
virtual std::set< cyclus::RequestPortfolio< cyclus::Product >::Ptr > GetGenRsrcRequests ()
 SinkFacilities request Products of their given commodity. More...
 
virtual std::set< cyclus::RequestPortfolio< cyclus::Product >::Ptr > GetGenRsrcRequests ()
 SinkFacilities request Products of their given commodity. More...
 
virtual std::set< cyclus::RequestPortfolio< cyclus::Material >::Ptr > GetMatlRequests ()
 SinkFacilities request Materials of their given commodity. More...
 
virtual std::set< cyclus::RequestPortfolio< cyclus::Material >::Ptr > GetMatlRequests ()
 SinkFacilities request Materials of their given commodity. More...
 
virtual void InfileToDb (cyclus::InfileTree *tree, cyclus::DbInit di)
 
virtual void InitFrom (cycamore::Sink *m)
 
virtual void InitFrom (cyclus::QueryableBackend *b)
 
virtual void InitInv (cyclus::Inventories &inv)
 
const std::vector< std::string > & input_commodities () const
 
const std::vector< std::string > & input_commodities () const
 
const std::vector< double > & input_commodity_preferences () const
 
const std::vector< double > & input_commodity_preferences () const
 
double InventorySize () const
 
double InventorySize () const
 
double MaxInventorySize () const
 
double MaxInventorySize () const
 
double RequestAmt () const
 determines the amount to request More...
 
double RequestAmt () const
 determines the amount to request More...
 
virtual std::string schema ()
 
void SetMaxInventorySize (double size)
 sets the size of the storage inventory for received material More...
 
void SetMaxInventorySize (double size)
 sets the size of the storage inventory for received material More...
 
 Sink (cyclus::Context *ctx)
 
 Sink (cyclus::Context *ctx)
 
virtual void Snapshot (cyclus::DbInit di)
 
virtual cyclus::Inventories SnapshotInv ()
 
virtual std::string str ()
 
virtual std::string str ()
 
virtual void Tick ()
 
virtual void Tick ()
 
virtual void Tock ()
 
virtual void Tock ()
 
virtual std::string version ()
 
virtual std::string version ()
 
virtual ~Sink ()
 
virtual ~Sink ()
 

Private Attributes

double capacity
 monthly acceptance capacity More...
 
std::vector< intcycpp_shape_capacity
 
std::vector< intcycpp_shape_in_commod_prefs
 
std::vector< intcycpp_shape_in_commods
 
std::vector< intcycpp_shape_inventory
 
std::vector< intcycpp_shape_max_inv_size
 
std::vector< intcycpp_shape_recipe_name
 
std::vector< double > in_commod_prefs
 
std::vector< std::string > in_commods
 all facilities must have at least one input commodity More...
 
cyclus::toolkit::ResBuf< cyclus::Resource > inventory
 this facility holds material in storage. More...
 
double max_inv_size
 max inventory size More...
 
std::string recipe_name
 

Detailed Description

This facility acts as a sink of materials and products with a fixed throughput (per time step) capacity and a lifetime capacity defined by a total inventory size.

The inventory size and throughput capacity both default to infinite. If a recipe is provided, it will request material with that recipe. Requests are made for any number of specified commodities.

Definition at line 23 of file _tmp_build/cycamore/sink.h.

Constructor & Destructor Documentation

cycamore::Sink::Sink ( cyclus::Context *  ctx)

Definition at line 13 of file _tmp_build/cycamore/sink.cc.

References SetMaxInventorySize().

Referenced by cycamore::ConstructSink().

cycamore::Sink::~Sink ( )
virtual

Definition at line 20 of file _tmp_build/cycamore/sink.cc.

cycamore::Sink::Sink ( cyclus::Context *  ctx)
virtual cycamore::Sink::~Sink ( )
virtual

Member Function Documentation

virtual void cycamore::Sink::AcceptGenRsrcTrades ( const std::vector< std::pair< cyclus::Trade< cyclus::Product >, cyclus::Product::Ptr > > &  responses)
virtual

SinkFacilities place accepted trade Materials in their Inventory.

void cycamore::Sink::AcceptGenRsrcTrades ( const std::vector< std::pair< cyclus::Trade< cyclus::Product >, cyclus::Product::Ptr > > &  responses)
virtual

SinkFacilities place accepted trade Materials in their Inventory.

Definition at line 400 of file _tmp_build/cycamore/sink.cc.

References inventory.

Referenced by version().

virtual void cycamore::Sink::AcceptMatlTrades ( const std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &  responses)
virtual

SinkFacilities place accepted trade Materials in their Inventory.

void cycamore::Sink::AcceptMatlTrades ( const std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &  responses)
virtual

SinkFacilities place accepted trade Materials in their Inventory.

Definition at line 389 of file _tmp_build/cycamore/sink.cc.

References inventory.

Referenced by TEST_F(), and version().

void cycamore::Sink::AddCommodity ( std::string  name)
inline

add a commodity to the set of input commodities

Parameters
namethe commodity name

Definition at line 72 of file src/sink.h.

References in_commods.

void cycamore::Sink::AddCommodity ( std::string  name)
inline

add a commodity to the set of input commodities

Parameters
namethe commodity name

Definition at line 84 of file _tmp_build/cycamore/sink.h.

References in_commods.

Referenced by SinkTest::SetUpSink(), and TEST_F().

Json::Value cycamore::Sink::annotations ( )
virtual

Definition at line 59 of file _tmp_build/cycamore/sink.cc.

Referenced by version().

void cycamore::Sink::Capacity ( double  cap)
inline

sets the capacity of a material generated at any given time step

Parameters
capacitythe reception capacity

Definition at line 94 of file src/sink.h.

References capacity.

double cycamore::Sink::Capacity ( ) const
inline
Returns
the reception capacity at any given time step

Definition at line 97 of file src/sink.h.

References capacity.

void cycamore::Sink::Capacity ( double  cap)
inline

sets the capacity of a material generated at any given time step

Parameters
capacitythe reception capacity

Definition at line 106 of file _tmp_build/cycamore/sink.h.

References capacity.

Referenced by SinkTest::SetUpSink(), and TEST_F().

double cycamore::Sink::Capacity ( ) const
inline
Returns
the reception capacity at any given time step

Definition at line 109 of file _tmp_build/cycamore/sink.h.

References capacity.

cyclus::Agent * cycamore::Sink::Clone ( )
virtual

Definition at line 235 of file _tmp_build/cycamore/sink.cc.

References InitFrom(), and m.

Referenced by TEST_F(), and version().

virtual void cycamore::Sink::EnterNotify ( )
virtual
void cycamore::Sink::EnterNotify ( )
virtual

Definition at line 290 of file _tmp_build/cycamore/sink.cc.

References in_commod_prefs, and in_commods.

Referenced by TEST_F(), and version().

virtual std::set<cyclus::RequestPortfolio<cyclus::Product>::Ptr> cycamore::Sink::GetGenRsrcRequests ( )
virtual

SinkFacilities request Products of their given commodity.

Note that it is assumed the Sink operates on a single resource type!

std::set< cyclus::RequestPortfolio< cyclus::Product >::Ptr > cycamore::Sink::GetGenRsrcRequests ( )
virtual

SinkFacilities request Products of their given commodity.

Note that it is assumed the Sink operates on a single resource type!

Definition at line 360 of file _tmp_build/cycamore/sink.cc.

References cc, in_commods, RequestAmt(), and cycamore::string.

Referenced by version().

virtual std::set<cyclus::RequestPortfolio<cyclus::Material>::Ptr> cycamore::Sink::GetMatlRequests ( )
virtual

SinkFacilities request Materials of their given commodity.

Note that it is assumed the Sink operates on a single resource type!

std::set< cyclus::RequestPortfolio< cyclus::Material >::Ptr > cycamore::Sink::GetMatlRequests ( )
virtual

SinkFacilities request Materials of their given commodity.

Note that it is assumed the Sink operates on a single resource type!

Definition at line 328 of file _tmp_build/cycamore/sink.cc.

References in_commod_prefs, in_commods, recipe_name, and RequestAmt().

Referenced by TEST_F(), and version().

void cycamore::Sink::InfileToDb ( cyclus::InfileTree *  tree,
cyclus::DbInit  di 
)
virtual
void cycamore::Sink::InitFrom ( cycamore::Sink m)
virtual
void cycamore::Sink::InitFrom ( cyclus::QueryableBackend *  b)
virtual
void cycamore::Sink::InitInv ( cyclus::Inventories &  inv)
virtual

Definition at line 229 of file _tmp_build/cycamore/sink.cc.

References inventory.

Referenced by version().

const std::vector<std::string>& cycamore::Sink::input_commodities ( ) const
inline
Returns
the input commodities

Definition at line 101 of file src/sink.h.

References in_commods.

const std::vector<std::string>& cycamore::Sink::input_commodities ( ) const
inline
Returns
the input commodities

Definition at line 113 of file _tmp_build/cycamore/sink.h.

References in_commods.

Referenced by TEST_F().

const std::vector<double>& cycamore::Sink::input_commodity_preferences ( ) const
inline
Returns
the input commodities preferences

Definition at line 105 of file src/sink.h.

References capacity, in_commod_prefs, in_commods, inventory, max_inv_size, recipe_name, and cycamore::string.

const std::vector<double>& cycamore::Sink::input_commodity_preferences ( ) const
inline
Returns
the input commodities preferences

Definition at line 117 of file _tmp_build/cycamore/sink.h.

References in_commod_prefs.

Referenced by TEST_F().

double cycamore::Sink::InventorySize ( ) const
inline
Returns
the current inventory storage size

Definition at line 85 of file src/sink.h.

References inventory.

double cycamore::Sink::InventorySize ( ) const
inline
Returns
the current inventory storage size

Definition at line 97 of file _tmp_build/cycamore/sink.h.

References inventory.

Referenced by TEST_F().

double cycamore::Sink::MaxInventorySize ( ) const
inline
Returns
the maximum inventory storage size

Definition at line 82 of file src/sink.h.

References inventory.

double cycamore::Sink::MaxInventorySize ( ) const
inline
Returns
the maximum inventory storage size

Definition at line 94 of file _tmp_build/cycamore/sink.h.

References inventory.

Referenced by TEST_F().

double cycamore::Sink::RequestAmt ( ) const
inline

determines the amount to request

Definition at line 88 of file src/sink.h.

References capacity, and inventory.

double cycamore::Sink::RequestAmt ( ) const
inline

determines the amount to request

Definition at line 100 of file _tmp_build/cycamore/sink.h.

References capacity, and inventory.

Referenced by GetGenRsrcRequests(), GetMatlRequests(), TEST_F(), and Tick().

std::string cycamore::Sink::schema ( )
virtual

Definition at line 21 of file _tmp_build/cycamore/sink.cc.

Referenced by version().

void cycamore::Sink::SetMaxInventorySize ( double  size)
inline

sets the size of the storage inventory for received material

Parameters
sizethe storage size

Definition at line 76 of file src/sink.h.

References inventory, and max_inv_size.

void cycamore::Sink::SetMaxInventorySize ( double  size)
inline

sets the size of the storage inventory for received material

Parameters
sizethe storage size

Definition at line 88 of file _tmp_build/cycamore/sink.h.

References inventory, and max_inv_size.

Referenced by SinkTest::SetUpSink(), and Sink().

void cycamore::Sink::Snapshot ( cyclus::DbInit  di)
virtual
cyclus::Inventories cycamore::Sink::SnapshotInv ( )
virtual

Definition at line 221 of file _tmp_build/cycamore/sink.cc.

References inventory.

Referenced by version().

virtual std::string cycamore::Sink::str ( )
virtual
std::string cycamore::Sink::str ( )
virtual

Definition at line 307 of file _tmp_build/cycamore/sink.cc.

References in_commods, inventory, and cycamore::string.

Referenced by TEST_F(), and version().

virtual void cycamore::Sink::Tick ( )
virtual
void cycamore::Sink::Tick ( )
virtual

Definition at line 411 of file _tmp_build/cycamore/sink.cc.

References in_commods, RequestAmt(), and cycamore::string.

Referenced by version().

virtual void cycamore::Sink::Tock ( )
virtual
void cycamore::Sink::Tock ( )
virtual

Definition at line 430 of file _tmp_build/cycamore/sink.cc.

References inventory.

Referenced by version().

virtual std::string cycamore::Sink::version ( )
inlinevirtual
virtual std::string cycamore::Sink::version ( )
inlinevirtual

Member Data Documentation

double cycamore::Sink::capacity
private

monthly acceptance capacity

Definition at line 153 of file _tmp_build/cycamore/sink.h.

Referenced by Capacity(), InfileToDb(), InitFrom(), input_commodity_preferences(), RequestAmt(), and Snapshot().

std::vector<int> cycamore::Sink::cycpp_shape_capacity
private

Definition at line 154 of file _tmp_build/cycamore/sink.h.

Referenced by InfileToDb(), InitFrom(), and Snapshot().

std::vector<int> cycamore::Sink::cycpp_shape_in_commod_prefs
private

Definition at line 131 of file _tmp_build/cycamore/sink.h.

Referenced by InfileToDb(), InitFrom(), and Snapshot().

std::vector<int> cycamore::Sink::cycpp_shape_in_commods
private

Definition at line 124 of file _tmp_build/cycamore/sink.h.

Referenced by InfileToDb(), InitFrom(), and Snapshot().

std::vector<int> cycamore::Sink::cycpp_shape_inventory
private

Definition at line 161 of file _tmp_build/cycamore/sink.h.

Referenced by InfileToDb(), and InitFrom().

std::vector<int> cycamore::Sink::cycpp_shape_max_inv_size
private

Definition at line 146 of file _tmp_build/cycamore/sink.h.

Referenced by InfileToDb(), InitFrom(), and Snapshot().

std::vector<int> cycamore::Sink::cycpp_shape_recipe_name
private

Definition at line 138 of file _tmp_build/cycamore/sink.h.

Referenced by InfileToDb(), InitFrom(), and Snapshot().

std::vector< double > cycamore::Sink::in_commod_prefs
private
std::vector< std::string > cycamore::Sink::in_commods
private

all facilities must have at least one input commodity

Definition at line 123 of file _tmp_build/cycamore/sink.h.

Referenced by AddCommodity(), EnterNotify(), GetGenRsrcRequests(), GetMatlRequests(), InfileToDb(), InitFrom(), input_commodities(), input_commodity_preferences(), Snapshot(), str(), and Tick().

cyclus::toolkit::ResBuf< cyclus::Resource > cycamore::Sink::inventory
private
double cycamore::Sink::max_inv_size
private

max inventory size

Definition at line 145 of file _tmp_build/cycamore/sink.h.

Referenced by InfileToDb(), InitFrom(), input_commodity_preferences(), SetMaxInventorySize(), and Snapshot().

std::string cycamore::Sink::recipe_name
private

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