![]() |
CYCAMORE
|
This Facility is intended to hold materials for a user specified amount of time in order to model a storage facility with a certain residence time or holdup time. More...
#include <storage.h>
Public Member Functions | |
virtual Json::Value | annotations () |
virtual cyclus::Agent * | Clone () |
virtual void | EnterNotify () |
Sets up the Storage Facility's trade requests. | |
virtual void | EnterNotify () |
Sets up the Storage Facility's trade requests. | |
virtual void | InfileToDb (cyclus::InfileTree *tree, cyclus::DbInit di) |
virtual void | InitFrom (cycamore::Storage *m) |
virtual void | InitFrom (cyclus::QueryableBackend *b) |
virtual void | InitInv (cyclus::Inventories &inv) |
virtual std::string | schema () |
virtual void | Snapshot (cyclus::DbInit di) |
virtual cyclus::Inventories | SnapshotInv () |
Storage (cyclus::Context *ctx) | |
Storage (cyclus::Context *ctx) | |
virtual std::string | str () |
A verbose printer for the Storage Facility. | |
virtual std::string | str () |
A verbose printer for the Storage Facility. | |
virtual void | Tick () |
The handleTick function specific to the Storage. | |
virtual void | Tick () |
The handleTick function specific to the Storage. | |
virtual void | Tock () |
The handleTick function specific to the Storage. | |
virtual void | Tock () |
The handleTick function specific to the Storage. | |
virtual std::string | version () |
virtual std::string | version () |
Protected Member Functions | |
void | AddMat_ (cyclus::Material::Ptr mat) |
adds a material into the incoming commodity inventory | |
void | AddMat_ (cyclus::Material::Ptr mat) |
adds a material into the incoming commodity inventory | |
void | BeginProcessing_ () |
Move all unprocessed inventory to processing. | |
void | BeginProcessing_ () |
Move all unprocessed inventory to processing. | |
double | capacity () |
returns total capacity | |
double | capacity () |
returns total capacity | |
double | current_capacity () |
current maximum amount that can be added to processing | |
double | current_capacity () |
current maximum amount that can be added to processing | |
void | ProcessMat_ (double cap) |
Move as many ready resources as allowable into stocks. | |
void | ProcessMat_ (double cap) |
Move as many ready resources as allowable into stocks. | |
int | ready_time () |
returns the time key for ready materials | |
int | ready_time () |
returns the time key for ready materials | |
void | ReadyMatl_ (int time) |
move ready resources from processing to ready at a certain time | |
void | ReadyMatl_ (int time) |
move ready resources from processing to ready at a certain time | |
Protected Attributes | |
std::vector< int > | cycpp_shape_discrete_handling |
std::vector< int > | cycpp_shape_in_commod_prefs |
std::vector< int > | cycpp_shape_in_commods |
std::vector< int > | cycpp_shape_in_recipe |
std::vector< int > | cycpp_shape_inventory |
std::vector< int > | cycpp_shape_inventory_tracker |
std::vector< int > | cycpp_shape_max_inv_size |
std::vector< int > | cycpp_shape_out_commods |
std::vector< int > | cycpp_shape_package |
std::vector< int > | cycpp_shape_processing |
std::vector< int > | cycpp_shape_ready |
std::vector< int > | cycpp_shape_residence_time |
std::vector< int > | cycpp_shape_stocks |
std::vector< int > | cycpp_shape_throughput |
std::vector< int > | cycpp_shape_transport_unit |
bool | discrete_handling |
std::list< int > | entry_times |
std::vector< double > | in_commod_prefs |
std::vector< std::string > | in_commods |
std::string | in_recipe |
cyclus::toolkit::ResBuf< cyclus::Material > | inventory |
cyclus::toolkit::TotalInvTracker | inventory_tracker |
double | max_inv_size |
std::vector< std::string > | out_commods |
std::string | package |
cyclus::toolkit::ResBuf< cyclus::Material > | processing |
cyclus::toolkit::ResBuf< cyclus::Material > | ready |
int | residence_time |
cyclus::toolkit::ResBuf< cyclus::Material > | stocks |
double | throughput |
std::string | transport_unit |
Friends | |
class | StorageTest |
This Facility is intended to hold materials for a user specified amount of time in order to model a storage facility with a certain residence time or holdup time.
The Storage class inherits from the Facility class and is dynamically loaded by the Agent class when requested.
This Agent was initially developed to support the fco code-to-code comparison. It's very similar to the "NullFacility" of years past. Its purpose is to hold materials and release them only after some period of delay time.
in_commods is a vector of strings naming the commodities that this facility receives out_commods is a string naming the commodity that in_commod is stocks into residence_time is the minimum number of timesteps between receiving and offering in_recipe (optional) describes the incoming resource by recipe
max_inv_size is the maximum capacity of the inventory storage throughput is the maximum processing capacity per timestep package is the name of the package type to ship
Tick: Nothing really happens on the tick.
Tock: On the tock, any material that has been waiting for long enough (delay time) is placed in the stocks buffer.
Any brand new inventory that was received in this timestep is placed into the processing queue to begin waiting.
Making Requests: This facility requests all of the in_commod that it can.
Receiving Resources: Anything of the in_commod that is received by this facility goes into the inventory.
Making Offers: Any stocks material in the stocks buffer is offered to the market.
Sending Resources: Matched resources are sent immediately.
Definition at line 68 of file build/cycamore/storage.h.
cycamore::Storage::Storage | ( | cyclus::Context * | ctx | ) |
ctx | the cyclus context for access to simulation-wide parameters |
Definition at line 9 of file build/cycamore/storage.cc.
References inventory, inventory_tracker, processing, ready, and stocks.
Referenced by cycamore::ConstructStorage(), and InitFrom().
cycamore::Storage::Storage | ( | cyclus::Context * | ctx | ) |
ctx | the cyclus context for access to simulation-wide parameters |
|
protected |
adds a material into the incoming commodity inventory
mat | the material to add to the incoming inventory. |
if | there is trouble with pushing to the inventory buffer. |
Definition at line 1740 of file build/cycamore/storage.cc.
References inventory.
Referenced by cycamore::StorageTest::TestAddMat().
|
protected |
adds a material into the incoming commodity inventory
mat | the material to add to the incoming inventory. |
if | there is trouble with pushing to the inventory buffer. |
|
virtual |
Definition at line 270 of file build/cycamore/storage.cc.
|
protected |
Move all unprocessed inventory to processing.
Definition at line 1758 of file build/cycamore/storage.cc.
References entry_times, inventory, and processing.
Referenced by Tock().
|
protected |
Move all unprocessed inventory to processing.
|
inlineprotected |
returns total capacity
Definition at line 136 of file build/cycamore/storage.h.
References inventory_tracker.
|
inlineprotected |
|
virtual |
Definition at line 1293 of file build/cycamore/storage.cc.
References InitFrom().
Referenced by cycamore::TEST_F().
|
inlineprotected |
current maximum amount that can be added to processing
Definition at line 132 of file build/cycamore/storage.h.
References inventory_tracker.
Referenced by cycamore::StorageTest::TestCurrentCap(), Tick(), and Tock().
|
inlineprotected |
current maximum amount that can be added to processing
Definition at line 121 of file src/storage.h.
References inventory_tracker.
|
virtual |
Sets up the Storage Facility's trade requests.
Definition at line 1587 of file build/cycamore/storage.cc.
References in_commod_prefs, in_commods, in_recipe, inventory, inventory_tracker, max_inv_size, out_commods, package, stocks, throughput, and transport_unit.
|
virtual |
Sets up the Storage Facility's trade requests.
|
virtual |
Definition at line 718 of file build/cycamore/storage.cc.
References cycpp_shape_discrete_handling, cycpp_shape_in_commod_prefs, cycpp_shape_in_commods, cycpp_shape_in_recipe, cycpp_shape_inventory, cycpp_shape_inventory_tracker, cycpp_shape_max_inv_size, cycpp_shape_out_commods, cycpp_shape_package, cycpp_shape_processing, cycpp_shape_ready, cycpp_shape_residence_time, cycpp_shape_stocks, cycpp_shape_throughput, cycpp_shape_transport_unit, discrete_handling, in_commod_prefs, in_commods, in_recipe, max_inv_size, out_commods, package, residence_time, throughput, and transport_unit.
|
virtual |
Definition at line 1301 of file build/cycamore/storage.cc.
References cycpp_shape_discrete_handling, cycpp_shape_in_commod_prefs, cycpp_shape_in_commods, cycpp_shape_in_recipe, cycpp_shape_inventory, cycpp_shape_inventory_tracker, cycpp_shape_max_inv_size, cycpp_shape_out_commods, cycpp_shape_package, cycpp_shape_processing, cycpp_shape_ready, cycpp_shape_residence_time, cycpp_shape_stocks, cycpp_shape_throughput, cycpp_shape_transport_unit, discrete_handling, in_commod_prefs, in_commods, in_recipe, inventory, inventory_tracker, max_inv_size, out_commods, processing, ready, residence_time, stocks, Storage(), throughput, and transport_unit.
Referenced by Clone().
|
virtual |
Definition at line 1442 of file build/cycamore/storage.cc.
References cycpp_shape_discrete_handling, cycpp_shape_in_commod_prefs, cycpp_shape_in_commods, cycpp_shape_in_recipe, cycpp_shape_inventory, cycpp_shape_inventory_tracker, cycpp_shape_max_inv_size, cycpp_shape_out_commods, cycpp_shape_package, cycpp_shape_processing, cycpp_shape_ready, cycpp_shape_residence_time, cycpp_shape_stocks, cycpp_shape_throughput, cycpp_shape_transport_unit, discrete_handling, in_commod_prefs, in_commods, in_recipe, inventory, inventory_tracker, max_inv_size, out_commods, processing, ready, residence_time, stocks, throughput, and transport_unit.
|
virtual |
Definition at line 693 of file build/cycamore/storage.cc.
References inventory, processing, ready, and stocks.
|
protected |
Move as many ready resources as allowable into stocks.
cap | current throughput capacity |
Definition at line 1775 of file build/cycamore/storage.cc.
References discrete_handling, ready, and stocks.
Referenced by Tock().
|
protected |
Move as many ready resources as allowable into stocks.
cap | current throughput capacity |
|
inlineprotected |
returns the time key for ready materials
Definition at line 139 of file build/cycamore/storage.h.
References residence_time.
Referenced by cycamore::StorageTest::TestReadyTime(), and Tock().
|
inlineprotected |
returns the time key for ready materials
Definition at line 128 of file src/storage.h.
References residence_time.
|
protected |
move ready resources from processing to ready at a certain time
time | the time of interest |
Definition at line 1806 of file build/cycamore/storage.cc.
References entry_times, processing, and ready.
Referenced by Tock().
|
protected |
move ready resources from processing to ready at a certain time
time | the time of interest |
|
virtual |
Definition at line 18 of file build/cycamore/storage.cc.
|
virtual |
Definition at line 1247 of file build/cycamore/storage.cc.
References cycpp_shape_discrete_handling, cycpp_shape_in_commod_prefs, cycpp_shape_in_commods, cycpp_shape_in_recipe, cycpp_shape_max_inv_size, cycpp_shape_out_commods, cycpp_shape_package, cycpp_shape_residence_time, cycpp_shape_throughput, cycpp_shape_transport_unit, discrete_handling, in_commod_prefs, in_commods, in_recipe, max_inv_size, out_commods, package, residence_time, throughput, and transport_unit.
|
virtual |
Definition at line 703 of file build/cycamore/storage.cc.
References inventory, processing, ready, and stocks.
|
virtual |
A verbose printer for the Storage Facility.
Definition at line 1659 of file build/cycamore/storage.cc.
References out_commods, residence_time, and throughput.
Referenced by cycamore::TEST_F().
|
virtual |
A verbose printer for the Storage Facility.
|
virtual |
The handleTick function specific to the Storage.
Definition at line 1685 of file build/cycamore/storage.cc.
References current_capacity(), max_inv_size, processing, ready, and stocks.
Referenced by cycamore::TEST_F().
|
virtual |
The handleTick function specific to the Storage.
|
virtual |
The handleTick function specific to the Storage.
Definition at line 1702 of file build/cycamore/storage.cc.
References BeginProcessing_(), current_capacity(), in_commod_prefs, in_commods, inventory, out_commods, processing, ProcessMat_(), ready, ready_time(), ReadyMatl_(), residence_time, stocks, and throughput.
Referenced by cycamore::TEST_F(), cycamore::TEST_F(), cycamore::TEST_F(), cycamore::TEST_F(), cycamore::TEST_F(), cycamore::TEST_F(), cycamore::TEST_F(), and cycamore::TEST_F().
|
virtual |
The handleTick function specific to the Storage.
|
inlinevirtual |
Definition at line 110 of file build/cycamore/storage.h.
References CYCAMORE_VERSION.
|
inlinevirtual |
Definition at line 99 of file src/storage.h.
References CYCAMORE_VERSION.
|
friend |
Definition at line 248 of file build/cycamore/storage.h.
References StorageTest.
Referenced by StorageTest.
|
protected |
Definition at line 195 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
protected |
Definition at line 153 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
protected |
Definition at line 146 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
protected |
Definition at line 167 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
protected |
Definition at line 215 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), and InitFrom().
|
protected |
Definition at line 244 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), and InitFrom().
|
protected |
Definition at line 188 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
protected |
Definition at line 160 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
protected |
Definition at line 202 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
protected |
Definition at line 238 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), and InitFrom().
|
protected |
Definition at line 227 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), and InitFrom().
|
protected |
Definition at line 174 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
protected |
Definition at line 221 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), and InitFrom().
|
protected |
Definition at line 181 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
protected |
Definition at line 209 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
protected |
Definition at line 194 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), ProcessMat_(), and Snapshot().
|
protected |
Definition at line 234 of file build/cycamore/storage.h.
Referenced by BeginProcessing_(), and ReadyMatl_().
|
protected |
Definition at line 152 of file build/cycamore/storage.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), InitFrom(), Snapshot(), and Tock().
|
protected |
Definition at line 145 of file build/cycamore/storage.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), InitFrom(), Snapshot(), and Tock().
|
protected |
Definition at line 166 of file build/cycamore/storage.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), InitFrom(), Snapshot(), and cycamore::StorageTest::TestInitState().
|
protected |
Definition at line 214 of file build/cycamore/storage.h.
Referenced by AddMat_(), BeginProcessing_(), EnterNotify(), InitFrom(), InitFrom(), InitInv(), SnapshotInv(), Storage(), cycamore::StorageTest::TestAddMat(), cycamore::StorageTest::TestBuffers(), and Tock().
|
protected |
Definition at line 243 of file build/cycamore/storage.h.
Referenced by capacity(), current_capacity(), EnterNotify(), InitFrom(), InitFrom(), and Storage().
|
protected |
Definition at line 187 of file build/cycamore/storage.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), InitFrom(), Snapshot(), cycamore::StorageTest::TestInitState(), and Tick().
|
protected |
Definition at line 159 of file build/cycamore/storage.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), InitFrom(), Snapshot(), str(), and Tock().
|
protected |
Definition at line 201 of file build/cycamore/storage.h.
Referenced by EnterNotify(), InfileToDb(), Snapshot(), and cycamore::StorageTest::TestInitState().
|
protected |
Definition at line 237 of file build/cycamore/storage.h.
Referenced by BeginProcessing_(), InitFrom(), InitFrom(), InitInv(), ReadyMatl_(), SnapshotInv(), Storage(), cycamore::StorageTest::TestBuffers(), Tick(), and Tock().
|
protected |
Definition at line 226 of file build/cycamore/storage.h.
Referenced by InitFrom(), InitFrom(), InitInv(), ProcessMat_(), ReadyMatl_(), SnapshotInv(), Storage(), cycamore::StorageTest::TestBuffers(), Tick(), and Tock().
|
protected |
Definition at line 173 of file build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), ready_time(), Snapshot(), str(), cycamore::StorageTest::TestInitState(), and Tock().
|
protected |
Definition at line 220 of file build/cycamore/storage.h.
Referenced by EnterNotify(), InitFrom(), InitFrom(), InitInv(), ProcessMat_(), SnapshotInv(), Storage(), cycamore::StorageTest::TestBuffers(), cycamore::StorageTest::TestStocks(), Tick(), and Tock().
|
protected |
Definition at line 180 of file build/cycamore/storage.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), InitFrom(), Snapshot(), str(), cycamore::StorageTest::TestInitState(), and Tock().
|
protected |
Definition at line 208 of file build/cycamore/storage.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), InitFrom(), and Snapshot().