1 #ifndef CYCLUS_STORAGES_STORAGE_H_ 2 #define CYCLUS_STORAGES_STORAGE_H_ 67 :
public cyclus::Facility,
68 public cyclus::toolkit::CommodityProducer,
69 public cyclus::toolkit::Position {
76 #pragma cyclus note {"doc": "Storage is a simple facility which accepts any number of commodities " \ 77 "and holds them for a user specified amount of time. The commodities accepted "\ 78 "are chosen based on the specified preferences list. Once the desired amount of material "\ 79 "has entered the facility it is passed into a 'processing' buffer where it is held until "\ 80 "the residence time has passed. The material is then passed into a 'ready' buffer where it is "\ 81 "queued for removal. Currently, all input commodities are lumped into a single output commodity. "\ 82 "Storage also has the functionality to handle materials in discrete or continuous batches. Discrete "\ 83 "mode, which is the default, does not split or combine material batches. Continuous mode, however, "\ 84 "divides material batches if necessary in order to push materials through the facility as quickly "\ 106 void AddMat_(cyclus::Material::Ptr mat);
130 #pragma cyclus var {"tooltip":"input commodity",\ 131 "doc":"commodities accepted by this facility",\ 132 "uilabel":"Input Commodities",\ 133 "uitype":["oneormore","incommodity"]} 136 #pragma cyclus var {"default": [],\ 137 "doc":"preferences for each of the given commodities, in the same order."\ 138 "Defauts to 1 if unspecified",\ 139 "uilabel":"In Commody Preferences", \ 140 "range": [None, [1e-299, 1e299]], \ 141 "uitype":["oneormore", "range"]} 144 #pragma cyclus var {"tooltip":"output commodity",\ 145 "doc":"commodity produced by this facility. Multiple commodity tracking is"\ 146 " currently not supported, one output commodity catches all input commodities.",\ 147 "uilabel":"Output Commodities",\ 148 "uitype":["oneormore","outcommodity"]} 151 #pragma cyclus var {"default":"",\ 152 "tooltip":"input recipe",\ 153 "doc":"recipe accepted by this facility, if unspecified a dummy recipe is used",\ 154 "uilabel":"Input Recipe",\ 158 #pragma cyclus var {"default": 0,\ 159 "tooltip":"residence time (timesteps)",\ 160 "doc":"the minimum holding time for a received commodity (timesteps).",\ 161 "units":"time steps",\ 162 "uilabel":"Residence Time", \ 167 #pragma cyclus var {"default": 1e299,\ 168 "tooltip":"throughput per timestep (kg)",\ 169 "doc":"the max amount that can be moved through the facility per timestep (kg)",\ 170 "uilabel":"Throughput",\ 172 "range": [0.0, 1e299], \ 176 #pragma cyclus var {"default": 1e299,\ 177 "tooltip":"maximum inventory size (kg)",\ 178 "doc":"the maximum amount of material that can be in all storage buffer stages",\ 179 "uilabel":"Maximum Inventory Size",\ 181 "range": [0.0, 1e299], \ 185 #pragma cyclus var {"default": False,\ 186 "tooltip":"Bool to determine how Storage handles batches",\ 187 "doc":"Determines if Storage will divide resource objects. Only controls material "\ 188 "handling within this facility, has no effect on DRE material handling. "\ 189 "If true, batches are handled as discrete quanta, neither split nor combined. "\ 190 "Otherwise, batches may be divided during processing. Default to false (continuous))",\ 191 "uilabel":"Batch Handling"} 194 #pragma cyclus var {"tooltip":"Incoming material buffer"} 195 cyclus::toolkit::ResBuf<cyclus::Material>
inventory;
197 #pragma cyclus var {"tooltip":"Output material buffer"} 198 cyclus::toolkit::ResBuf<cyclus::Material>
stocks;
200 #pragma cyclus var {"tooltip":"Buffer for material held for required residence_time"} 201 cyclus::toolkit::ResBuf<cyclus::Material>
ready;
204 #pragma cyclus var{"default": [],\ 208 #pragma cyclus var {"tooltip":"Buffer for material still waiting for required residence_time"} 209 cyclus::toolkit::ResBuf<cyclus::Material>
processing;
217 #pragma cyclus var { \ 219 "uilabel": "Geographical latitude in degrees as a double", \ 220 "doc": "Latitude of the agent's geographical position. The value should " \ 221 "be expressed in degrees as a double." \ 225 #pragma cyclus var { \ 227 "uilabel": "Geographical longitude in degrees as a double", \ 228 "doc": "Longitude of the agent's geographical position. The value should " \ 229 "be expressed in degrees as a double." \ 242 #endif // CYCLUS_STORAGES_STORAGE_H_ void AddMat_(cyclus::Material::Ptr mat)
adds a material into the incoming commodity inventory
virtual std::string str()
A verbose printer for the Storage Facility.
cyclus::toolkit::ResBuf< cyclus::Material > ready
virtual void Tock()
The handleTick function specific to the Storage.
virtual void EnterNotify()
Sets up the Storage Facility's trade requests.
cyclus::toolkit::MatlBuyPolicy buy_policy
double current_capacity() const
current maximum amount that can be added to processing
virtual void Tick()
The handleTick function specific to the Storage.
std::vector< double > in_commod_prefs
cycamore::GrowthRegion string
int ready_time()
returns the time key for ready materials
cyclus::toolkit::ResBuf< cyclus::Material > stocks
cyclus::toolkit::MatlSellPolicy sell_policy
cyclus::toolkit::Position coordinates
cyclus::toolkit::ResBuf< cyclus::Material > processing
cyclus::toolkit::ResBuf< cyclus::Material > inventory
std::vector< std::string > in_commods
void ReadyMatl_(int time)
move ready resources from processing to ready at a certain time
void BeginProcessing_()
Move all unprocessed inventory to processing.
std::vector< std::string > out_commods
std::list< int > entry_times
void ProcessMat_(double cap)
Move as many ready resources as allowable into stocks.
Storage(cyclus::Context *ctx)