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
69 :
public cyclus::Facility,
70 public cyclus::toolkit::CommodityProducer {
76#line 73 "/cycamore/src/storage.h"
78 virtual void InitFrom(cyclus::QueryableBackend* b);
79#line 75 "/cycamore/src/storage.h"
81 virtual void InfileToDb(cyclus::InfileTree* tree, cyclus::DbInit di);
83 virtual cyclus::Agent*
Clone();
85 virtual std::string
schema();
89 virtual void InitInv(cyclus::Inventories& inv);
93 virtual void Snapshot(cyclus::DbInit di);
95 #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."}
96#line 86 "/cycamore/src/storage.h"
99 virtual std::string
str();
116 void AddMat_(cyclus::Material::Ptr mat);
143 #pragma cyclus var {"tooltip":"input commodity", "doc":"commodities accepted by this facility", "uilabel":"Input Commodities", "uitype":["oneormore","incommodity"]}
144#line 136 "/cycamore/src/storage.h"
147#line 137 "/cycamore/src/storage.h"
150 #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"]}
151#line 144 "/cycamore/src/storage.h"
154#line 145 "/cycamore/src/storage.h"
157 #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"]}
158#line 151 "/cycamore/src/storage.h"
161#line 152 "/cycamore/src/storage.h"
164 #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"}
165#line 158 "/cycamore/src/storage.h"
168#line 159 "/cycamore/src/storage.h"
171 #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]}
172#line 167 "/cycamore/src/storage.h"
175#line 168 "/cycamore/src/storage.h"
178 #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"}
179#line 176 "/cycamore/src/storage.h"
182#line 177 "/cycamore/src/storage.h"
185 #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"}
186#line 185 "/cycamore/src/storage.h"
189#line 186 "/cycamore/src/storage.h"
192 #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"}
193#line 194 "/cycamore/src/storage.h"
196#line 195 "/cycamore/src/storage.h"
199 #pragma cyclus var {"default": "unpackaged", "tooltip": "Output package", "doc": "Outgoing material will be packaged when trading.", "uitype": "package", "uilabel": "Package"}
200#line 201 "/cycamore/src/storage.h"
203#line 202 "/cycamore/src/storage.h"
206 #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"}
207#line 209 "/cycamore/src/storage.h"
211#line 210 "/cycamore/src/storage.h"
213 #pragma cyclus var {"tooltip":"Incoming material buffer"}
217#line 213 "/cycamore/src/storage.h"
219 #pragma cyclus var {"tooltip":"Output material buffer"}
220 cyclus::toolkit::ResBuf<cyclus::Material>
stocks;
223#line 216 "/cycamore/src/storage.h"
225 #pragma cyclus var {"tooltip":"Buffer for material held for required residence_time"}
226 cyclus::toolkit::ResBuf<cyclus::Material>
ready;
229#line 219 "/cycamore/src/storage.h"
232 #pragma cyclus var{"default": [], "internal": True}
233#line 223 "/cycamore/src/storage.h"
236 #pragma cyclus var {"tooltip":"Buffer for material still waiting for required residence_time"}
240#line 227 "/cycamore/src/storage.h"
242 #pragma cyclus var {"tooltip": "Total Inventory Tracker to restrict maximum agent inventory"}
246#line 230 "/cycamore/src/storage.h"
252 #include "toolkit/matl_buy_policy.cycpp.h"
253 #include "toolkit/matl_sell_policy.cycpp.h"
254 #include "toolkit/position.cycpp.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
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
virtual std::string schema()
std::vector< int > cycpp_shape_processing
cyclus::toolkit::ResBuf< cyclus::Material > ready
std::vector< double > in_commod_prefs
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
virtual cyclus::Agent * Clone()
std::vector< int > cycpp_shape_package
std::vector< int > cycpp_shape_in_commods
virtual void InfileToDb(cyclus::InfileTree *tree, cyclus::DbInit di)
std::vector< std::string > in_commods
virtual void Tock()
The handleTick function specific to the Storage.
std::vector< int > cycpp_shape_max_inv_size
virtual std::string version()
cyclus::toolkit::ResBuf< cyclus::Material > inventory
int ready_time()
returns the time key for ready materials
void ProcessMat_(double cap)
Move as many ready resources as allowable into stocks.
std::vector< int > cycpp_shape_discrete_handling
virtual void InitInv(cyclus::Inventories &inv)
std::vector< std::string > out_commods
std::list< int > entry_times
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< int > cycpp_shape_inventory
std::vector< int > cycpp_shape_transport_unit
cyclus::toolkit::ResBuf< cyclus::Material > stocks
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
std::vector< int > cycpp_shape_ready
virtual void Tick()
The handleTick function specific to the Storage.
std::vector< int > cycpp_shape_in_recipe