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 () |
Private Member Functions | |
void | RecordPosition () |
void | RecordPosition () |
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 SetMaxInventorySize().
|
virtual |
Definition at line 23 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 786 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 775 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 SinkTest::SetUpSink().
|
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 117 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 SinkTest::SetUpSink().
|
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 534 of file build/cycamore/sink.cc.
|
virtual |
Create first requestAmt. Only used in testing, as a simulation will overwrite this on Tick()
Create first requestAmt. Only used in testing, as a simulation will overwrite this on Tick()
Definition at line 655 of file build/cycamore/sink.cc.
References in_commod_prefs, in_commods, inventory, keep_packaging, random_frequency_type, random_size_type, RecordPosition(), SetNextBuyTime(), and SetRequestAmt().
|
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 749 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
for testing
Definition at line 713 of file build/cycamore/sink.cc.
References in_commod_prefs, in_commods, recipe_name, requestAmt, SetRequestAmt(), and SpaceAvailable().
|
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 272 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_latitude, cycpp_shape_longitude, 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, latitude, longitude, 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 598 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_latitude, cycpp_shape_longitude, 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, latitude, longitude, 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 541 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_latitude, cycpp_shape_longitude, 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, latitude, longitude, 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 528 of file build/cycamore/sink.cc.
References inventory.
|
inline |
Definition at line 123 of file build/cycamore/sink.h.
References in_commods.
|
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.
|
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.
|
inline |
Definition at line 92 of file src/sink.h.
References inventory.
|
private |
Definition at line 848 of file build/cycamore/sink.cc.
References latitude, and longitude.
Referenced by EnterNotify().
|
private |
|
virtual |
Definition at line 24 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 SinkTest::SetUpSink(), and 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 883 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 860 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 498 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_latitude, cycpp_shape_longitude, 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, latitude, longitude, 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 520 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(), and SetRequestAmt().
|
inline |
determines the amount to request
Definition at line 98 of file src/sink.h.
|
virtual |
Definition at line 692 of file build/cycamore/sink.cc.
References in_commods, and inventory.
|
virtual |
|
virtual |
Definition at line 797 of file build/cycamore/sink.cc.
References in_commods, nextBuyTime, requestAmt, SetNextBuyTime(), and SetRequestAmt().
|
virtual |
|
virtual |
Definition at line 835 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 165 of file build/cycamore/sink.h.
Referenced by Capacity(), Capacity(), InfileToDb(), InitFrom(), InitFrom(), Snapshot(), and SpaceAvailable().
|
private |
Definition at line 262 of file build/cycamore/sink.h.
|
private |
Definition at line 166 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 143 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 136 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 173 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), and InitFrom().
|
private |
Definition at line 244 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 251 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 258 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 158 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 237 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 213 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 229 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 221 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 205 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 189 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 197 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 181 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 150 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 142 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 135 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 172 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 243 of file build/cycamore/sink.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 250 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), RecordPosition(), and Snapshot().
|
private |
Definition at line 257 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), RecordPosition(), and Snapshot().
|
private |
max inventory size
Definition at line 157 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), SetMaxInventorySize(), and Snapshot().
|
private |
Definition at line 131 of file build/cycamore/sink.h.
Referenced by SetNextBuyTime(), and Tick().
|
private |
Definition at line 236 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), SetNextBuyTime(), and Snapshot().
|
private |
Definition at line 212 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), SetNextBuyTime(), and Snapshot().
|
private |
Definition at line 228 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), SetNextBuyTime(), and Snapshot().
|
private |
Definition at line 220 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), SetNextBuyTime(), and Snapshot().
|
private |
Definition at line 204 of file build/cycamore/sink.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), InitFrom(), SetNextBuyTime(), and Snapshot().
|
private |
Definition at line 188 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), SetRequestAmt(), and Snapshot().
|
private |
Definition at line 196 of file build/cycamore/sink.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), SetRequestAmt(), and Snapshot().
|
private |
random status (size of request)
Definition at line 180 of file build/cycamore/sink.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), InitFrom(), SetRequestAmt(), and Snapshot().
|
private |
Definition at line 149 of file build/cycamore/sink.h.
Referenced by GetMatlRequests(), InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 130 of file build/cycamore/sink.h.
Referenced by GetGenRsrcRequests(), GetMatlRequests(), SetRequestAmt(), and Tick().