![]() |
CYCAMORE
|
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>
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. | |
virtual void | AcceptGenRsrcTrades (const std::vector< std::pair< cyclus::Trade< cyclus::Product >, cyclus::Product::Ptr > > &responses) |
SinkFacilities place accepted trade Materials in their Inventory. | |
virtual void | AcceptMatlTrades (const std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &responses) |
SinkFacilities place accepted trade Materials in their Inventory. | |
virtual void | AcceptMatlTrades (const std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &responses) |
SinkFacilities place accepted trade Materials in their Inventory. | |
void | AddCommodity (std::string name) |
add a commodity to the set of input commodities | |
void | AddCommodity (std::string name) |
add a commodity to the set of input commodities | |
virtual Json::Value | annotations () |
double | Capacity () const |
double | Capacity () const |
void | Capacity (double cap) |
sets the capacity of a material generated at any given time step | |
void | Capacity (double cap) |
sets the capacity of a material generated at any given time step | |
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. | |
virtual std::set< cyclus::RequestPortfolio< cyclus::Product >::Ptr > | GetGenRsrcRequests () |
SinkFacilities request Products of their given commodity. | |
virtual std::set< cyclus::RequestPortfolio< cyclus::Material >::Ptr > | GetMatlRequests () |
SinkFacilities request Materials of their given commodity. | |
virtual std::set< cyclus::RequestPortfolio< cyclus::Material >::Ptr > | GetMatlRequests () |
SinkFacilities request Materials of their given commodity. | |
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 |
virtual std::string | schema () |
void | SetMaxInventorySize (double size) |
sets the size of the storage inventory for received material | |
void | SetMaxInventorySize (double size) |
sets the size of the storage inventory for received material | |
virtual void | SetNextBuyTime () |
SinkFacilities update request time using random behavior. | |
virtual void | SetNextBuyTime () |
SinkFacilities update request time using random behavior. | |
virtual void | SetRequestAmt () |
SinkFacilities update request amount using random behavior. | |
virtual void | SetRequestAmt () |
SinkFacilities update request amount using random behavior. | |
Sink (cyclus::Context *ctx) | |
Sink (cyclus::Context *ctx) | |
virtual void | Snapshot (cyclus::DbInit di) |
virtual cyclus::Inventories | SnapshotInv () |
double | SpaceAvailable () const |
determines the amount to request | |
double | SpaceAvailable () const |
determines the amount to request | |
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 () |
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 25 of file build/cycamore/sink.h.
cycamore::Sink::Sink | ( | cyclus::Context * | ctx | ) |
Definition at line 13 of file build/cycamore/sink.cc.
References capacity, keep_packaging, and SetMaxInventorySize().
|
virtual |
Definition at line 20 of file build/cycamore/sink.cc.
cycamore::Sink::Sink | ( | cyclus::Context * | ctx | ) |
|
virtual |
|
virtual |
SinkFacilities place accepted trade Materials in their Inventory.
Definition at line 799 of file build/cycamore/sink.cc.
References inventory.
|
virtual |
SinkFacilities place accepted trade Materials in their Inventory.
|
virtual |
SinkFacilities place accepted trade Materials in their Inventory.
Definition at line 788 of file build/cycamore/sink.cc.
References inventory.
|
virtual |
SinkFacilities place accepted trade Materials in their Inventory.
|
inline |
add a commodity to the set of input commodities
name | the commodity name |
Definition at line 94 of file build/cycamore/sink.h.
References in_commods.
Referenced by TEST_F().
|
inline |
add a commodity to the set of input commodities
name | the commodity name |
Definition at line 82 of file src/sink.h.
References in_commods.
|
virtual |
Definition at line 128 of file build/cycamore/sink.cc.
|
inline |
Definition at line 119 of file build/cycamore/sink.h.
References capacity.
|
inline |
Definition at line 107 of file src/sink.h.
References capacity.
|
inline |
sets the capacity of a material generated at any given time step
capacity | the reception capacity |
Definition at line 116 of file build/cycamore/sink.h.
References capacity.
Referenced by TEST_F().
|
inline |
sets the capacity of a material generated at any given time step
capacity | the reception capacity |
Definition at line 104 of file src/sink.h.
References capacity.
|
virtual |
Definition at line 546 of file build/cycamore/sink.cc.
References InitFrom().
|
virtual |
Create first requestAmt. Only used in testing, as a simulation will overwrite this on Tick()
Definition at line 667 of file build/cycamore/sink.cc.
References in_commod_prefs, in_commods, inventory, keep_packaging, random_frequency_type, random_size_type, SetNextBuyTime(), and SetRequestAmt().
Referenced by TEST_F().
|
virtual |
|
virtual |
SinkFacilities request Products of their given commodity.
Note that it is assumed the Sink operates on a single resource type!
Definition at line 762 of file build/cycamore/sink.cc.
References in_commods, and requestAmt.
|
virtual |
SinkFacilities request Products of their given commodity.
Note that it is assumed the Sink operates on a single resource type!
|
virtual |
SinkFacilities request Materials of their given commodity.
Note that it is assumed the Sink operates on a single resource type!
for testing
Definition at line 726 of file build/cycamore/sink.cc.
References in_commod_prefs, in_commods, recipe_name, requestAmt, SetRequestAmt(), and SpaceAvailable().
Referenced by TEST_F().
|
virtual |
SinkFacilities request Materials of their given commodity.
Note that it is assumed the Sink operates on a single resource type!
|
virtual |
Definition at line 284 of file build/cycamore/sink.cc.
References capacity, cycpp_shape_capacity, cycpp_shape_in_commod_prefs, cycpp_shape_in_commods, cycpp_shape_inventory, cycpp_shape_keep_packaging, cycpp_shape_max_inv_size, cycpp_shape_random_frequency_max, cycpp_shape_random_frequency_mean, cycpp_shape_random_frequency_min, cycpp_shape_random_frequency_stddev, cycpp_shape_random_frequency_type, cycpp_shape_random_size_mean, cycpp_shape_random_size_stddev, cycpp_shape_random_size_type, cycpp_shape_recipe_name, in_commod_prefs, in_commods, keep_packaging, max_inv_size, random_frequency_max, random_frequency_mean, random_frequency_min, random_frequency_stddev, random_frequency_type, random_size_mean, random_size_stddev, random_size_type, and recipe_name.
|
virtual |
Definition at line 610 of file build/cycamore/sink.cc.
References capacity, cycpp_shape_capacity, cycpp_shape_in_commod_prefs, cycpp_shape_in_commods, cycpp_shape_inventory, cycpp_shape_keep_packaging, cycpp_shape_max_inv_size, cycpp_shape_random_frequency_max, cycpp_shape_random_frequency_mean, cycpp_shape_random_frequency_min, cycpp_shape_random_frequency_stddev, cycpp_shape_random_frequency_type, cycpp_shape_random_size_mean, cycpp_shape_random_size_stddev, cycpp_shape_random_size_type, cycpp_shape_recipe_name, in_commod_prefs, in_commods, inventory, keep_packaging, max_inv_size, random_frequency_max, random_frequency_mean, random_frequency_min, random_frequency_stddev, random_frequency_type, random_size_mean, random_size_stddev, random_size_type, and recipe_name.
Referenced by Clone().
|
virtual |
Definition at line 553 of file build/cycamore/sink.cc.
References capacity, cycpp_shape_capacity, cycpp_shape_in_commod_prefs, cycpp_shape_in_commods, cycpp_shape_inventory, cycpp_shape_keep_packaging, cycpp_shape_max_inv_size, cycpp_shape_random_frequency_max, cycpp_shape_random_frequency_mean, cycpp_shape_random_frequency_min, cycpp_shape_random_frequency_stddev, cycpp_shape_random_frequency_type, cycpp_shape_random_size_mean, cycpp_shape_random_size_stddev, cycpp_shape_random_size_type, cycpp_shape_recipe_name, in_commod_prefs, in_commods, inventory, keep_packaging, max_inv_size, random_frequency_max, random_frequency_mean, random_frequency_min, random_frequency_stddev, random_frequency_type, random_size_mean, random_size_stddev, random_size_type, and recipe_name.
|
virtual |
Definition at line 540 of file build/cycamore/sink.cc.
References inventory.
|
inline |
Definition at line 123 of file build/cycamore/sink.h.
References in_commods.
Referenced by TEST_F().
|
inline |
|
inline |
Definition at line 127 of file build/cycamore/sink.h.
References in_commod_prefs.
|
inline |
Definition at line 115 of file src/sink.h.
References in_commod_prefs.
|
inline |
Definition at line 107 of file build/cycamore/sink.h.
References inventory.
Referenced by TEST_F().
|
inline |
Definition at line 95 of file src/sink.h.
References inventory.
|
inline |
Definition at line 104 of file build/cycamore/sink.h.
References inventory.
Referenced by TEST_F().
|
inline |
Definition at line 92 of file src/sink.h.
References inventory.
|
virtual |
Definition at line 21 of file build/cycamore/sink.cc.
|
inline |
sets the size of the storage inventory for received material
size | the storage size |
Definition at line 98 of file build/cycamore/sink.h.
References inventory, and max_inv_size.
Referenced by Sink().
|
inline |
sets the size of the storage inventory for received material
size | the storage size |
Definition at line 86 of file src/sink.h.
References inventory, and max_inv_size.
|
virtual |
SinkFacilities update request time using random behavior.
Definition at line 884 of file build/cycamore/sink.cc.
References nextBuyTime, random_frequency_max, random_frequency_mean, random_frequency_min, random_frequency_stddev, and random_frequency_type.
Referenced by EnterNotify(), and Tick().
|
virtual |
SinkFacilities update request time using random behavior.
|
virtual |
SinkFacilities update request amount using random behavior.
Definition at line 861 of file build/cycamore/sink.cc.
References random_size_mean, random_size_stddev, random_size_type, requestAmt, and SpaceAvailable().
Referenced by EnterNotify(), GetMatlRequests(), and Tick().
|
virtual |
SinkFacilities update request amount using random behavior.
|
virtual |
Definition at line 510 of file build/cycamore/sink.cc.
References capacity, cycpp_shape_capacity, cycpp_shape_in_commod_prefs, cycpp_shape_in_commods, cycpp_shape_keep_packaging, cycpp_shape_max_inv_size, cycpp_shape_random_frequency_max, cycpp_shape_random_frequency_mean, cycpp_shape_random_frequency_min, cycpp_shape_random_frequency_stddev, cycpp_shape_random_frequency_type, cycpp_shape_random_size_mean, cycpp_shape_random_size_stddev, cycpp_shape_random_size_type, cycpp_shape_recipe_name, in_commod_prefs, in_commods, keep_packaging, max_inv_size, random_frequency_max, random_frequency_mean, random_frequency_min, random_frequency_stddev, random_frequency_type, random_size_mean, random_size_stddev, random_size_type, and recipe_name.
|
virtual |
Definition at line 532 of file build/cycamore/sink.cc.
References inventory.
|
inline |
determines the amount to request
Definition at line 110 of file build/cycamore/sink.h.
References capacity, and inventory.
Referenced by GetMatlRequests(), SetRequestAmt(), and TEST_F().
|
inline |
determines the amount to request
Definition at line 98 of file src/sink.h.
|
virtual |
Definition at line 705 of file build/cycamore/sink.cc.
References in_commods, and inventory.
|
virtual |
|
virtual |
Definition at line 810 of file build/cycamore/sink.cc.
References in_commods, nextBuyTime, requestAmt, SetNextBuyTime(), and SetRequestAmt().
|
virtual |
|
virtual |
Definition at line 848 of file build/cycamore/sink.cc.
References inventory.
|
virtual |
|
inlinevirtual |
Definition at line 33 of file build/cycamore/sink.h.
References CYCAMORE_VERSION.
|
inlinevirtual |
Definition at line 31 of file src/sink.h.
References CYCAMORE_VERSION.
|
private |
monthly acceptance capacity
Definition at line 168 of file build/cycamore/sink.h.
Referenced by Capacity(), Capacity(), InfileToDb(), InitFrom(), InitFrom(), Sink(), Snapshot(), and SpaceAvailable().
|
private |
Definition at line 169 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 146 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 139 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 176 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), and InitFrom().
|
private |
Definition at line 247 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 161 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 240 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 216 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 232 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 224 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 208 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 192 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 200 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 184 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 153 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 145 of file build/cycamore/sink.h.
Referenced by EnterNotify(), GetMatlRequests(), InfileToDb(), InitFrom(), InitFrom(), input_commodity_preferences(), and Snapshot().
|
private |
all facilities must have at least one input commodity
Definition at line 138 of file build/cycamore/sink.h.
Referenced by AddCommodity(), EnterNotify(), GetGenRsrcRequests(), GetMatlRequests(), InfileToDb(), InitFrom(), InitFrom(), input_commodities(), Snapshot(), str(), and Tick().
|
private |
this facility holds material in storage.
Definition at line 175 of file build/cycamore/sink.h.
Referenced by AcceptGenRsrcTrades(), AcceptMatlTrades(), EnterNotify(), InitFrom(), InitFrom(), InitInv(), InventorySize(), MaxInventorySize(), SetMaxInventorySize(), SnapshotInv(), SpaceAvailable(), str(), and Tock().
|
private |
Definition at line 246 of file build/cycamore/sink.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), InitFrom(), Sink(), and Snapshot().
|
private |
max inventory size
Definition at line 160 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), SetMaxInventorySize(), and Snapshot().
|
private |
Definition at line 134 of file build/cycamore/sink.h.
Referenced by SetNextBuyTime(), and Tick().
|
private |
Definition at line 239 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), SetNextBuyTime(), and Snapshot().
|
private |
Definition at line 215 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), SetNextBuyTime(), and Snapshot().
|
private |
Definition at line 231 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), SetNextBuyTime(), and Snapshot().
|
private |
Definition at line 223 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), SetNextBuyTime(), and Snapshot().
|
private |
Definition at line 207 of file build/cycamore/sink.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), InitFrom(), SetNextBuyTime(), and Snapshot().
|
private |
Definition at line 191 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), SetRequestAmt(), and Snapshot().
|
private |
Definition at line 199 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), SetRequestAmt(), and Snapshot().
|
private |
random status (size of request)
Definition at line 183 of file build/cycamore/sink.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), InitFrom(), SetRequestAmt(), and Snapshot().
|
private |
Definition at line 152 of file build/cycamore/sink.h.
Referenced by GetMatlRequests(), InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 133 of file build/cycamore/sink.h.
Referenced by GetGenRsrcRequests(), GetMatlRequests(), SetRequestAmt(), and Tick().