2#line 1 "/cycamore/src/storage.h"
3#ifndef CYCLUS_STORAGES_STORAGE_H_
4#define CYCLUS_STORAGES_STORAGE_H_
13#include "boost/shared_ptr.hpp"
15#pragma cyclus exec from cyclus.system import CY_LARGE_DOUBLE, CY_LARGE_INT, CY_NEAR_ZERO
92 :
public cyclus::Facility,
93 public cyclus::toolkit::CommodityProducer,
94 public cyclus::toolkit::Position {
99#line 96 "/cycamore/src/storage.h"
101 virtual void InitFrom(cyclus::QueryableBackend* b);
102#line 98 "/cycamore/src/storage.h"
104 virtual void InfileToDb(cyclus::InfileTree* tree, cyclus::DbInit di);
106 virtual cyclus::Agent*
Clone();
108 virtual std::string
schema();
112 virtual void InitInv(cyclus::Inventories& inv);
116 virtual void Snapshot(cyclus::DbInit di);
118 #pragma cyclus note {"doc": "Storage is a simple facility which accepts any number of commodities " "and holds them for a user specified amount of time. The commodities accepted " "are chosen based on the specified preferences list. Once the desired amount of material " "has entered the facility it is passed into a 'processing' buffer where it is held until " "the residence time has passed. The material is then passed into a 'ready' buffer where it is " "queued for removal. Currently, all input commodities are lumped into a single output commodity. " "Storage also has the functionality to handle materials in discrete or continuous batches. Discrete " "mode, which is the default, does not split or combine material batches. Continuous mode, however, " "divides material batches if necessary in order to push materials through the facility as quickly " "as possible."}
119#line 109 "/cycamore/src/storage.h"
122 virtual std::string
str();
144 void AddMat_(cyclus::Material::Ptr mat);
156#line 147 "/cycamore/src/storage.h"
167#line 157 "/cycamore/src/storage.h"
169 #pragma cyclus var {"tooltip":"input commodity", "doc":"commodities accepted by this facility", "uilabel":"Input Commodities", "uitype":["oneormore","incommodity"]}
172#line 159 "/cycamore/src/storage.h"
174#line 165 "/cycamore/src/storage.h"
176 #pragma cyclus var {"default": [], "doc":"preferences for each of the given commodities, in the same order." "Defauts to 1 if unspecified", "uilabel":"In Commody Preferences", "range": [None, [CY_NEAR_ZERO, CY_LARGE_DOUBLE]], "uitype":["oneormore", "range"]}
177#line 172 "/cycamore/src/storage.h"
180#line 173 "/cycamore/src/storage.h"
183 #pragma cyclus var {"tooltip":"output commodity", "doc":"commodity produced by this facility. Multiple commodity tracking is" " currently not supported, one output commodity catches all input commodities.", "uilabel":"Output Commodities", "uitype":["oneormore","outcommodity"]}
184#line 179 "/cycamore/src/storage.h"
187#line 180 "/cycamore/src/storage.h"
190 #pragma cyclus var {"default":"", "tooltip":"input recipe", "doc":"recipe accepted by this facility, if unspecified a dummy recipe is used", "uilabel":"Input Recipe", "uitype":"inrecipe"}
191#line 186 "/cycamore/src/storage.h"
194#line 187 "/cycamore/src/storage.h"
197 #pragma cyclus var {"default": 0, "tooltip":"residence time (timesteps)", "doc":"the minimum holding time for a received commodity (timesteps).", "units":"time steps", "uilabel":"Residence Time", "uitype": "range", "range": [0, 12000]}
198#line 195 "/cycamore/src/storage.h"
201#line 196 "/cycamore/src/storage.h"
204 #pragma cyclus var {"default": 0, "tooltip":"sell quantity (kg)", "doc":"material will be sold in integer multiples of this quantity. If" " the buffer contains less than the sell quantity, no material will be" " offered", "uilabel":"Sell Quantity", "uitype": "range", "range": [0.0, CY_LARGE_DOUBLE], "units": "kg"}
205#line 206 "/cycamore/src/storage.h"
208#line 207 "/cycamore/src/storage.h"
211 #pragma cyclus var {"default": CY_LARGE_DOUBLE, "tooltip":"throughput per timestep (kg)", "doc":"the max amount that can be moved through the facility per timestep (kg)", "uilabel":"Throughput", "uitype": "range", "range": [0.0, CY_LARGE_DOUBLE], "units":"kg"}
212#line 215 "/cycamore/src/storage.h"
215#line 216 "/cycamore/src/storage.h"
218 #pragma cyclus var {"default": CY_LARGE_DOUBLE, "tooltip":"maximum inventory size (kg)", "doc":"the maximum amount of material that can be in all storage buffer stages", "uilabel":"Maximum Inventory Size", "uitype": "range", "range": [0.0, CY_LARGE_DOUBLE], "units":"kg"}
219#line 224 "/cycamore/src/storage.h"
222#line 225 "/cycamore/src/storage.h"
225 #pragma cyclus var {"default": False, "tooltip":"Bool to determine how Storage handles batches", "doc":"Determines if Storage will divide resource objects. Only controls material " "handling within this facility, has no effect on DRE material handling. " "If true, batches are handled as discrete quanta, neither split nor combined. " "Otherwise, batches may be divided during processing. Default to false (continuous))", "uilabel":"Batch Handling"}
226#line 233 "/cycamore/src/storage.h"
229#line 234 "/cycamore/src/storage.h"
232 #pragma cyclus var {"default": "Fixed", "tooltip": "Type of active buying frequency", "doc": "Options: Fixed, Uniform, Normal. Fixed requires active_buying_val. Uniform " "requires active_buying_min and active_buying_max. Normal " "requires active_buying_mean and active_buying_std, with optional " "active_buying_min and active_buying_max.", "uitype": "combobox", "categorical": ["Fixed", "Uniform", "Normal"], "uilabel": "Active Buying Frequency Type"}
233#line 244 "/cycamore/src/storage.h"
236#line 245 "/cycamore/src/storage.h"
239 #pragma cyclus var {"default": -1, "tooltip": "Fixed active buying frequency", "doc": "The length in time steps of the active buying period. Required for fixed " "active_buying_frequency_type. Must be greater than or equal to 1 (i.e., agent " "cannot always be dormant)", "uitype": "range", "range": [1, CY_LARGE_INT], "uilabel": "Active Buying Frequency Value"}
240#line 254 "/cycamore/src/storage.h"
243#line 255 "/cycamore/src/storage.h"
246 #pragma cyclus var {"default": -1, "tooltip": "Active buying distribution minimum", "doc": "The minimum length in time steps of the active buying period. Required for " "Uniform and optional for Normal active_buying_frequency_type. Must be greater than " "or equal to 1 ", "uitype": "range", "range": [1, CY_LARGE_INT], "uilabel": "Active Buying Frequency Minimum"}
247#line 264 "/cycamore/src/storage.h"
250#line 265 "/cycamore/src/storage.h"
253 #pragma cyclus var {"default": -1, "tooltip": "Active buying distribution maximum", "doc": "The maximum length in time steps of the active buying period. Required for " "Uniform active_buying_frequency_type, optional for Normal. Must be greater than or equal to active_buying_min ", "uitype": "range", "range": [1, CY_LARGE_INT], "uilabel": "Active Buying Frequency Maximum"}
254#line 273 "/cycamore/src/storage.h"
257#line 274 "/cycamore/src/storage.h"
260 #pragma cyclus var {"default": -1, "tooltip": "Active buying distribution mean", "doc": "The mean length in time steps of the active buying period. Required for " "Normal active_buying_frequency_type. Must be greater than or equal to 1 ", "uitype": "range", "range": [1.0, CY_LARGE_DOUBLE], "uilabel": "Active Buying Frequency Mean"}
261#line 282 "/cycamore/src/storage.h"
264#line 283 "/cycamore/src/storage.h"
267 #pragma cyclus var {"default": -1, "tooltip": "Active buying distribution standard deviation", "doc": "The standard deviation of the length in time steps of the active buying period. " "Required for Normal active_buying_frequency_type. Must be greater than or equal to 0 ", "uitype": "range", "range": [0.0, CY_LARGE_DOUBLE], "uilabel": "Active Buying Frequency Standard Deviation"}
268#line 291 "/cycamore/src/storage.h"
271#line 292 "/cycamore/src/storage.h"
274 #pragma cyclus var {"default": "Fixed", "tooltip": "Type of dormant buying frequency", "doc": "Options: Fixed, Uniform, Normal. Fixed requires dormant_buying_val. Uniform " "requires dormant_buying_min and dormant_buying_max. Normal requires " "dormant_buying_mean and dormant_buying_std, with optional dormant_buying_min " "and dormant_buying_max.", "uitype": "combobox", "categorical": ["Fixed", "Uniform", "Normal"], "uilabel": "Dormant Buying Frequency Type"}
275#line 302 "/cycamore/src/storage.h"
278#line 303 "/cycamore/src/storage.h"
281 #pragma cyclus var {"default": -1, "tooltip": "Fixed dormant buying frequency", "doc": "The length in time steps of the dormant buying period. Required for fixed " "dormant_buying_frequency_type. Default is -1, agent has no dormant period and stays active.", "uitype": "range", "range": [-1, CY_LARGE_INT], "uilabel": "Dormant Buying Frequency Value"}
282#line 311 "/cycamore/src/storage.h"
285#line 312 "/cycamore/src/storage.h"
288 #pragma cyclus var {"default": -1, "tooltip": "Dormant buying distribution minimum", "doc": "The minimum length in time steps of the dormant buying period. Required for Uniform and optional for " "Normal dormant_buying_frequency_type.", "uitype": "range", "range": [0, CY_LARGE_INT], "uilabel": "Dormant Buying Frequency Minimum"}
289#line 320 "/cycamore/src/storage.h"
292#line 321 "/cycamore/src/storage.h"
295 #pragma cyclus var {"default": -1, "tooltip": "Dormant buying distribution maximum", "doc": "The maximum length in time steps of the dormant buying period. Required for " "Uniform dormant_buying_frequency_type, optional for Normal. Must be greater than or equal to dormant_buying_min ", "uitype": "range", "range": [0, CY_LARGE_INT], "uilabel": "Dormant Buying Frequency Maximum"}
296#line 329 "/cycamore/src/storage.h"
299#line 330 "/cycamore/src/storage.h"
302 #pragma cyclus var {"default": -1, "tooltip": "Dormant buying distribution mean", "doc": "The mean length in time steps of the dormant buying period. Required for " "Normal dormant_buying_frequency_type. Must be greater than or equal to 0 ", "uitype": "range", "range": [0.0, CY_LARGE_DOUBLE], "uilabel": "Dormant Buying Frequency Mean"}
303#line 338 "/cycamore/src/storage.h"
306#line 339 "/cycamore/src/storage.h"
309 #pragma cyclus var {"default": -1, "tooltip": "Dormant buying distribution standard deviation", "doc": "The standard deviation of the length in time steps of the dormant buying period. " "Required for Normal dormant_buying_frequency_type. Must be greater than or equal to 0 ", "uitype": "range", "range": [0.0, CY_LARGE_DOUBLE], "uilabel": "Dormant Buying Frequency Standard Deviation"}
310#line 347 "/cycamore/src/storage.h"
313#line 348 "/cycamore/src/storage.h"
316 #pragma cyclus var {"default": "Fixed", "tooltip": "Type of behavior used to determine size of buy request", "doc": "Behavior function used to determine the size of requests made. All values are " "a fraction of maximum capacity, determined by the throughput and capacity remaining." " Options: Fixed, Uniform, Normal. Fixed is default behavior. Uniform requires " "buying_size_min and buying_size_max. Normal requires " "buying_size_mean and buying_size_stddev, optional buying_size_min and " "buying_size_max.", "uitype": "combobox", "categorical": ["Fixed", "Uniform", "Normal"], "uilabel": "Buying Size Type"}
317#line 360 "/cycamore/src/storage.h"
320#line 361 "/cycamore/src/storage.h"
323 #pragma cyclus var {"default": 1.0, "tooltip": "Fixed buying size", "doc": "The size of the buy request as a fraction of maximum capacity. Optional for Fixed " "buying_size_type. Must be greater than or equal to 0.0", "uitype": "range", "range": [0.0, 1.0], "uilabel": "Buying Size Value"}
324#line 369 "/cycamore/src/storage.h"
327#line 370 "/cycamore/src/storage.h"
330 #pragma cyclus var {"default": -1.0, "tooltip": "Buying size distribution minimum", "doc": "The minimum size of the buy request as a fraction of maximum capacity. " "Required for Uniform and optional for Normal buying_size_type. Must be greater than " "or equal to zero.", "uitype": "range", "range": [0.0, 1.0], "uilabel": "Buying Size Minimum"}
331#line 379 "/cycamore/src/storage.h"
334#line 380 "/cycamore/src/storage.h"
337 #pragma cyclus var {"default": -1.0, "tooltip": "Buying size distribution maximum", "doc": "The maximum size of the buy request as a fraction of maximum capacity. " "Required for Uniform buying_size_type, optional for Normal. Must be greater than " "or equal to buying_size_min ", "uitype": "range", "range": [0.0, 1.0], "uilabel": "Buying Size Maximum"}
338#line 389 "/cycamore/src/storage.h"
341#line 390 "/cycamore/src/storage.h"
344 #pragma cyclus var {"default": -1.0, "tooltip": "Buying size distribution mean", "doc": "The mean size of the buy request as a fraction of maximum capacity. " "Required for Normal buying_size_type.", "uitype": "range", "range": [0.0, 1.0], "uilabel": "Buying Size Mean"}
345#line 398 "/cycamore/src/storage.h"
348#line 399 "/cycamore/src/storage.h"
351 #pragma cyclus var {"default": -1.0, "tooltip": "Buying size distribution standard deviation", "doc": "The standard deviation of the size of the buy request as a fraction of " "maximum capacity. Required for Normal buying_size_type.", "uitype": "range", "range": [0.0, 1.0], "uilabel": "Buying Size Standard Deviation"}
352#line 407 "/cycamore/src/storage.h"
355#line 408 "/cycamore/src/storage.h"
358 #pragma cyclus var {"default": -1, "tooltip":"Reorder point", "doc":"The point at which the facility will request more material. " "Above this point, no request will be made. Must be less than max_inv_size." "If paired with reorder_quantity, this agent will have an (R,Q) inventory policy. " "If reorder_point is used alone, this agent will have an (s,S) inventory policy, " " with S (the maximum) being set at max_inv_size.", "uilabel":"Reorder Point"}
359#line 417 "/cycamore/src/storage.h"
362#line 418 "/cycamore/src/storage.h"
365 #pragma cyclus var {"default": -1, "tooltip":"Reorder amount (R,Q inventory policy)", "doc":"The amount of material that will be requested when the reorder point is reached. " "Exclusive request, so will demand exactly reorder_quantity." "Reorder_point + reorder_quantity must be less than max_inv_size.", "uilabel":"Reorder Quantity"}
366#line 425 "/cycamore/src/storage.h"
369#line 426 "/cycamore/src/storage.h"
372 #pragma cyclus var {"default": -1, "tooltip": "Total amount of material that can be recieved per cycle.", "doc": "After receiving this much material cumulatively, the agent will go dormant. " "Must be paired with dormant_buying_frequency_type and any other dormant parameters. " "The per-time step demand is unchanged except the cycle cap is almost reached.", "uilabel": "Cumulative Cap"}
373#line 433 "/cycamore/src/storage.h"
376#line 434 "/cycamore/src/storage.h"
379 #pragma cyclus var {"default": "unpackaged", "tooltip": "Output package", "doc": "Outgoing material will be packaged when trading.", "uitype": "package", "uilabel": "Package"}
380#line 440 "/cycamore/src/storage.h"
383#line 441 "/cycamore/src/storage.h"
386 #pragma cyclus var {"default": "unrestricted", "tooltip": "Output transport unit", "doc": "Outgoing material, after packaging, will be " "further restricted by transport unit when trading.", "uitype": "transportunit", "uilabel": "Transport Unit"}
387#line 448 "/cycamore/src/storage.h"
391#line 449 "/cycamore/src/storage.h"
393 #pragma cyclus var {"tooltip":"Incoming material buffer"}
397#line 452 "/cycamore/src/storage.h"
399 #pragma cyclus var {"tooltip":"Output material buffer"}
400 cyclus::toolkit::ResBuf<cyclus::Material>
stocks;
403#line 455 "/cycamore/src/storage.h"
405 #pragma cyclus var {"tooltip":"Buffer for material held for required residence_time"}
406 cyclus::toolkit::ResBuf<cyclus::Material>
ready;
409#line 458 "/cycamore/src/storage.h"
412 #pragma cyclus var{"default": [], "internal": True}
413#line 462 "/cycamore/src/storage.h"
416 #pragma cyclus var {"tooltip":"Buffer for material still waiting for required residence_time"}
420#line 466 "/cycamore/src/storage.h"
422 #pragma cyclus var {"tooltip": "Total Inventory Tracker to restrict maximum agent inventory"}
426#line 469 "/cycamore/src/storage.h"
434 #pragma cyclus var { "default": 0.0, "uilabel": "Geographical latitude in degrees as a double", "doc": "Latitude of the agent's geographical position. The value should " "be expressed in degrees as a double." }
435#line 482 "/cycamore/src/storage.h"
438#line 483 "/cycamore/src/storage.h"
441 #pragma cyclus var { "default": 0.0, "uilabel": "Geographical longitude in degrees as a double", "doc": "Longitude of the agent's geographical position. The value should " "be expressed in degrees as a double." }
442#line 490 "/cycamore/src/storage.h"
446#line 491 "/cycamore/src/storage.h"
This Facility is intended to hold materials for a user specified amount of time in order to model a s...
Storage(cyclus::Context *ctx)
void AddMat_(cyclus::Material::Ptr mat)
adds a material into the incoming commodity inventory
std::string transport_unit
std::vector< int > cycpp_shape_dormant_buying_min
virtual std::string str()
A verbose printer for the Storage Facility.
std::vector< int > cycpp_shape_inventory_tracker
double current_capacity()
current maximum amount that can be added to processing
std::vector< int > cycpp_shape_buying_size_stddev
cyclus::IntDistribution::Ptr active_dist_
cyclus::toolkit::MatlSellPolicy sell_policy
std::vector< int > cycpp_shape_buying_size_max
std::vector< int > cycpp_shape_active_buying_val
virtual std::string schema()
std::vector< int > cycpp_shape_processing
cyclus::toolkit::ResBuf< cyclus::Material > ready
cyclus::DoubleDistribution::Ptr size_dist_
std::vector< int > cycpp_shape_reorder_point
std::vector< int > cycpp_shape_cumulative_cap
std::vector< double > in_commod_prefs
double active_buying_stddev
std::vector< int > cycpp_shape_longitude
std::vector< int > cycpp_shape_dormant_buying_max
std::vector< int > cycpp_shape_dormant_buying_mean
std::vector< int > cycpp_shape_buying_size_type
cyclus::toolkit::ResBuf< cyclus::Material > processing
virtual void InitFrom(cycamore::Storage *m)
std::vector< int > cycpp_shape_residence_time
std::vector< int > cycpp_shape_out_commods
cyclus::toolkit::TotalInvTracker inventory_tracker
std::vector< int > cycpp_shape_dormant_buying_stddev
virtual cyclus::Agent * Clone()
std::vector< int > cycpp_shape_package
std::vector< int > cycpp_shape_in_commods
double dormant_buying_mean
virtual void InfileToDb(cyclus::InfileTree *tree, cyclus::DbInit di)
std::vector< std::string > in_commods
std::vector< int > cycpp_shape_active_buying_stddev
cyclus::IntDistribution::Ptr dormant_dist_
std::vector< int > cycpp_shape_buying_size_min
virtual void Tock()
The handleTick function specific to the Storage.
std::vector< int > cycpp_shape_max_inv_size
void InitBuyPolicyParameters()
sets up the distributions for the buy policy
std::vector< int > cycpp_shape_buying_size_mean
std::string active_buying_frequency_type
virtual std::string version()
std::string dormant_buying_frequency_type
cyclus::toolkit::ResBuf< cyclus::Material > inventory
int ready_time()
returns the time key for ready materials
std::vector< int > cycpp_shape_buying_size_val
std::vector< int > cycpp_shape_dormant_buying_val
void ProcessMat_(double cap)
Move as many ready resources as allowable into stocks.
std::vector< int > cycpp_shape_discrete_handling
std::vector< int > cycpp_shape_sell_quantity
std::vector< int > cycpp_shape_reorder_quantity
virtual void InitInv(cyclus::Inventories &inv)
std::vector< int > cycpp_shape_active_buying_min
std::vector< std::string > out_commods
std::list< int > entry_times
std::vector< int > cycpp_shape_dormant_buying_frequency_type
std::vector< int > cycpp_shape_latitude
std::vector< int > cycpp_shape_active_buying_max
double active_buying_mean
double dormant_buying_stddev
void ReadyMatl_(int time)
move ready resources from processing to ready at a certain time
std::string buying_size_type
std::vector< int > cycpp_shape_active_buying_mean
double buying_size_stddev
std::vector< int > cycpp_shape_active_buying_frequency_type
void BeginProcessing_()
Move all unprocessed inventory to processing.
std::vector< int > cycpp_shape_inventory
std::vector< int > cycpp_shape_transport_unit
cyclus::toolkit::ResBuf< cyclus::Material > stocks
cyclus::toolkit::Position coordinates
virtual void EnterNotify()
Sets up the Storage Facility's trade requests.
virtual Json::Value annotations()
double capacity()
returns total capacity
std::vector< int > cycpp_shape_in_commod_prefs
virtual cyclus::Inventories SnapshotInv()
std::vector< int > cycpp_shape_stocks
virtual void Snapshot(cyclus::DbInit di)
std::vector< int > cycpp_shape_throughput
cyclus::toolkit::MatlBuyPolicy buy_policy
std::vector< int > cycpp_shape_ready
virtual void Tick()
The handleTick function specific to the Storage.
std::vector< int > cycpp_shape_in_recipe