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. More... | |
virtual void | EnterNotify () |
Sets up the Storage Facility's trade requests. More... | |
virtual void | InfileToDb (cyclus::InfileTree *tree, cyclus::DbInit di) |
virtual void | InitFrom (storage::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. More... | |
virtual std::string | str () |
A verbose printer for the Storage Facility. More... | |
virtual void | Tick () |
The handleTick function specific to the Storage. More... | |
virtual void | Tick () |
The handleTick function specific to the Storage. More... | |
virtual void | Tock () |
The handleTick function specific to the Storage. More... | |
virtual void | Tock () |
The handleTick function specific to the Storage. More... | |
Protected Member Functions | |
void | AddMat_ (cyclus::Material::Ptr mat) |
adds a material into the incoming commodity inventory More... | |
void | AddMat_ (cyclus::Material::Ptr mat) |
adds a material into the incoming commodity inventory More... | |
void | BeginProcessing_ () |
Move all unprocessed inventory to processing. More... | |
void | BeginProcessing_ () |
Move all unprocessed inventory to processing. More... | |
double | current_capacity () const |
current maximum amount that can be added to processing More... | |
double | current_capacity () const |
current maximum amount that can be added to processing More... | |
void | ProcessMat_ (double cap) |
Move as many ready resources as allowable into stocks. More... | |
void | ProcessMat_ (double cap) |
Move as many ready resources as allowable into stocks. More... | |
int | ready_time () |
returns the time key for ready materials More... | |
int | ready_time () |
returns the time key for ready materials More... | |
void | ReadyMatl_ (int time) |
move ready resources from processing to ready at a certain time More... | |
void | ReadyMatl_ (int time) |
move ready resources from processing to ready at a certain time More... | |
void | RecordPosition () |
void | RecordPosition () |
Protected Attributes | |
cyclus::toolkit::MatlBuyPolicy | buy_policy |
cyclus::toolkit::Position | coordinates |
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_latitude |
std::vector< int > | cycpp_shape_longitude |
std::vector< int > | cycpp_shape_max_inv_size |
std::vector< int > | cycpp_shape_out_commods |
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 |
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 |
double | latitude |
double | longitude |
double | max_inv_size |
std::vector< std::string > | out_commods |
cyclus::toolkit::ResBuf< cyclus::Material > | processing |
cyclus::toolkit::ResBuf< cyclus::Material > | ready |
int | residence_time |
cyclus::toolkit::MatlSellPolicy | sell_policy |
cyclus::toolkit::ResBuf< cyclus::Material > | stocks |
double | throughput |
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
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 _tmp_build/cycamore/storage.h.
storage::Storage::Storage | ( | cyclus::Context * | ctx | ) |
ctx | the cyclus context for access to simulation-wide parameters |
Definition at line 9 of file _tmp_build/cycamore/storage.cc.
Referenced by storage::ConstructStorage().
storage::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. |
|
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 621 of file _tmp_build/cycamore/storage.cc.
References inventory.
Referenced by storage::StorageTest::TestAddMat().
|
virtual |
Definition at line 85 of file _tmp_build/cycamore/storage.cc.
|
protected |
Move all unprocessed inventory to processing.
|
protected |
Move all unprocessed inventory to processing.
Definition at line 639 of file _tmp_build/cycamore/storage.cc.
References entry_times, inventory, and processing.
Referenced by Tock().
|
virtual |
Definition at line 406 of file _tmp_build/cycamore/storage.cc.
References InitFrom().
Referenced by storage::TEST_F().
|
inlineprotected |
current maximum amount that can be added to processing
Definition at line 122 of file src/storage.h.
References max_inv_size, processing, and stocks.
|
inlineprotected |
current maximum amount that can be added to processing
Definition at line 132 of file _tmp_build/cycamore/storage.h.
References max_inv_size, processing, and stocks.
Referenced by storage::StorageTest::TestCurrentCap(), Tick(), and Tock().
|
virtual |
Sets up the Storage Facility's trade requests.
|
virtual |
Sets up the Storage Facility's trade requests.
Definition at line 515 of file _tmp_build/cycamore/storage.cc.
References buy_policy, in_commod_prefs, in_commods, in_recipe, inventory, out_commods, RecordPosition(), sell_policy, stocks, and cycamore::string.
|
virtual |
Definition at line 223 of file _tmp_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_latitude, cycpp_shape_longitude, cycpp_shape_max_inv_size, cycpp_shape_out_commods, cycpp_shape_processing, cycpp_shape_ready, cycpp_shape_residence_time, cycpp_shape_stocks, cycpp_shape_throughput, discrete_handling, in_commod_prefs, in_commods, in_recipe, latitude, longitude, max_inv_size, out_commods, residence_time, cycamore::string, and throughput.
|
virtual |
Definition at line 414 of file _tmp_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_latitude, cycpp_shape_longitude, cycpp_shape_max_inv_size, cycpp_shape_out_commods, cycpp_shape_processing, cycpp_shape_ready, cycpp_shape_residence_time, cycpp_shape_stocks, cycpp_shape_throughput, discrete_handling, in_commod_prefs, in_commods, in_recipe, inventory, latitude, longitude, max_inv_size, out_commods, processing, ready, residence_time, stocks, and throughput.
Referenced by Clone().
|
virtual |
Definition at line 462 of file _tmp_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_latitude, cycpp_shape_longitude, cycpp_shape_max_inv_size, cycpp_shape_out_commods, cycpp_shape_processing, cycpp_shape_ready, cycpp_shape_residence_time, cycpp_shape_stocks, cycpp_shape_throughput, discrete_handling, in_commod_prefs, in_commods, in_recipe, inventory, latitude, longitude, max_inv_size, out_commods, processing, ready, residence_time, stocks, cycamore::string, and throughput.
|
virtual |
Definition at line 200 of file _tmp_build/cycamore/storage.cc.
References inventory, processing, ready, and stocks.
|
protected |
Move as many ready resources as allowable into stocks.
cap | current throughput capacity |
|
protected |
Move as many ready resources as allowable into stocks.
cap | current throughput capacity |
Definition at line 656 of file _tmp_build/cycamore/storage.cc.
References discrete_handling, ready, and stocks.
Referenced by Tock().
|
inlineprotected |
returns the time key for ready materials
Definition at line 126 of file src/storage.h.
References buy_policy, coordinates, discrete_handling, entry_times, in_commod_prefs, in_commods, in_recipe, inventory, latitude, longitude, max_inv_size, out_commods, processing, ready, RecordPosition(), residence_time, sell_policy, stocks, cycamore::string, and throughput.
|
inlineprotected |
returns the time key for ready materials
Definition at line 136 of file _tmp_build/cycamore/storage.h.
References residence_time.
Referenced by storage::StorageTest::TestReadyTime(), and Tock().
|
protected |
move ready resources from processing to ready at a certain time
time | the time of interest |
|
protected |
move ready resources from processing to ready at a certain time
time | the time of interest |
Definition at line 692 of file _tmp_build/cycamore/storage.cc.
References entry_times, processing, and ready.
Referenced by Tock().
|
protected |
|
protected |
Definition at line 705 of file _tmp_build/cycamore/storage.cc.
References latitude, longitude, and cycamore::string.
Referenced by EnterNotify(), and ready_time().
|
virtual |
Definition at line 20 of file _tmp_build/cycamore/storage.cc.
|
virtual |
Definition at line 390 of file _tmp_build/cycamore/storage.cc.
References cycpp_shape_discrete_handling, cycpp_shape_in_commod_prefs, cycpp_shape_in_commods, cycpp_shape_in_recipe, cycpp_shape_latitude, cycpp_shape_longitude, cycpp_shape_max_inv_size, cycpp_shape_out_commods, cycpp_shape_residence_time, cycpp_shape_throughput, discrete_handling, in_commod_prefs, in_commods, in_recipe, latitude, longitude, max_inv_size, out_commods, residence_time, and throughput.
|
virtual |
Definition at line 209 of file _tmp_build/cycamore/storage.cc.
References inventory, processing, ready, and stocks.
|
virtual |
A verbose printer for the Storage Facility.
|
virtual |
A verbose printer for the Storage Facility.
Definition at line 555 of file _tmp_build/cycamore/storage.cc.
References out_commods, residence_time, cycamore::string, and throughput.
Referenced by storage::TEST_F().
|
virtual |
The handleTick function specific to the Storage.
|
virtual |
The handleTick function specific to the Storage.
Definition at line 581 of file _tmp_build/cycamore/storage.cc.
References current_capacity(), and inventory.
Referenced by storage::TEST_F().
|
virtual |
The handleTick function specific to the Storage.
|
virtual |
The handleTick function specific to the Storage.
Definition at line 595 of file _tmp_build/cycamore/storage.cc.
References BeginProcessing_(), current_capacity(), in_commod_prefs, in_commods, inventory, out_commods, ProcessMat_(), ready_time(), ReadyMatl_(), residence_time, stocks, and throughput.
Referenced by storage::TEST_F().
|
friend |
Definition at line 248 of file _tmp_build/cycamore/storage.h.
|
protected |
Definition at line 225 of file _tmp_build/cycamore/storage.h.
Referenced by EnterNotify(), and ready_time().
|
protected |
Definition at line 244 of file _tmp_build/cycamore/storage.h.
Referenced by ready_time().
|
protected |
Definition at line 191 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), and Snapshot().
|
protected |
Definition at line 149 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), and Snapshot().
|
protected |
Definition at line 141 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), and Snapshot().
|
protected |
Definition at line 163 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), and Snapshot().
|
protected |
Definition at line 197 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), and InitFrom().
|
protected |
Definition at line 233 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), and Snapshot().
|
protected |
Definition at line 240 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), and Snapshot().
|
protected |
Definition at line 184 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), and Snapshot().
|
protected |
Definition at line 156 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), and Snapshot().
|
protected |
Definition at line 220 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), and InitFrom().
|
protected |
Definition at line 209 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), and InitFrom().
|
protected |
Definition at line 170 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), and Snapshot().
|
protected |
Definition at line 203 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), and InitFrom().
|
protected |
Definition at line 177 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), and Snapshot().
|
protected |
Definition at line 190 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), ProcessMat_(), ready_time(), storage::StorageTest::SetUpStorage(), and Snapshot().
|
protected |
Definition at line 216 of file _tmp_build/cycamore/storage.h.
Referenced by BeginProcessing_(), ready_time(), and ReadyMatl_().
|
protected |
Definition at line 148 of file _tmp_build/cycamore/storage.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), ready_time(), Snapshot(), and Tock().
|
protected |
Definition at line 140 of file _tmp_build/cycamore/storage.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), ready_time(), storage::StorageTest::SetUpStorage(), Snapshot(), and Tock().
|
protected |
Definition at line 162 of file _tmp_build/cycamore/storage.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), ready_time(), storage::StorageTest::SetUpStorage(), Snapshot(), and storage::StorageTest::TestInitState().
|
protected |
Definition at line 196 of file _tmp_build/cycamore/storage.h.
Referenced by AddMat_(), BeginProcessing_(), EnterNotify(), InitFrom(), InitInv(), ready_time(), SnapshotInv(), storage::StorageTest::TestAddMat(), storage::StorageTest::TestBuffers(), Tick(), and Tock().
|
protected |
Definition at line 232 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), ready_time(), RecordPosition(), and Snapshot().
|
protected |
Definition at line 239 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), ready_time(), RecordPosition(), and Snapshot().
|
protected |
Definition at line 183 of file _tmp_build/cycamore/storage.h.
Referenced by current_capacity(), InfileToDb(), InitFrom(), ready_time(), storage::StorageTest::SetUpStorage(), Snapshot(), and storage::StorageTest::TestInitState().
|
protected |
Definition at line 155 of file _tmp_build/cycamore/storage.h.
Referenced by EnterNotify(), InfileToDb(), InitFrom(), ready_time(), storage::StorageTest::SetUpStorage(), Snapshot(), str(), and Tock().
|
protected |
Definition at line 219 of file _tmp_build/cycamore/storage.h.
Referenced by BeginProcessing_(), current_capacity(), InitFrom(), InitInv(), ready_time(), ReadyMatl_(), SnapshotInv(), and storage::StorageTest::TestBuffers().
|
protected |
Definition at line 208 of file _tmp_build/cycamore/storage.h.
Referenced by InitFrom(), InitInv(), ProcessMat_(), ready_time(), ReadyMatl_(), SnapshotInv(), and storage::StorageTest::TestBuffers().
|
protected |
Definition at line 169 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), ready_time(), storage::StorageTest::SetUpStorage(), Snapshot(), str(), storage::StorageTest::TestInitState(), and Tock().
|
protected |
Definition at line 228 of file _tmp_build/cycamore/storage.h.
Referenced by EnterNotify(), and ready_time().
|
protected |
Definition at line 202 of file _tmp_build/cycamore/storage.h.
Referenced by current_capacity(), EnterNotify(), InitFrom(), InitInv(), ProcessMat_(), ready_time(), SnapshotInv(), storage::StorageTest::TestBuffers(), storage::StorageTest::TestStocks(), and Tock().
|
protected |
Definition at line 176 of file _tmp_build/cycamore/storage.h.
Referenced by InfileToDb(), InitFrom(), ready_time(), storage::StorageTest::SetUpStorage(), Snapshot(), str(), storage::StorageTest::TestInitState(), and Tock().