2#line 1 "/cycamore/src/sink.h"
3#ifndef CYCAMORE_SRC_SINK_H_
4#define CYCAMORE_SRC_SINK_H_
14#pragma cyclus exec from cyclus.system import CY_LARGE_DOUBLE, CY_LARGE_INT, CY_NEAR_ZERO
26 :
public cyclus::Facility,
27 public cyclus::toolkit::Position {
29 Sink(cyclus::Context* ctx);
35 #pragma cyclus note { "doc": " A sink facility that accepts materials and products with a fixed\n" " throughput (per time step) capacity and a lifetime capacity defined by\n" " a total inventory size. The inventory size and throughput capacity\n" " both default to infinite. If a recipe is provided, it will request\n" " material with that recipe. Requests are made for any number of\n" " specified commodities.\n" }
36#line 42 "/cycamore/src/sink.h"
40 virtual void InitFrom(cyclus::QueryableBackend* b);
42 virtual void InfileToDb(cyclus::InfileTree* tree, cyclus::DbInit di);
44 virtual cyclus::Agent*
Clone();
46 virtual std::string
schema();
50 virtual void InitInv(cyclus::Inventories& inv);
54 virtual void Snapshot(cyclus::DbInit di);
55#line 44 "/cycamore/src/sink.h"
57 virtual std::string
str();
67 virtual std::set<cyclus::RequestPortfolio<cyclus::Material>::Ptr>
73 virtual std::set<cyclus::RequestPortfolio<cyclus::Product>::Ptr>
78 const std::vector< std::pair<cyclus::Trade<cyclus::Material>,
79 cyclus::Material::Ptr> >& responses);
83 const std::vector< std::pair<cyclus::Trade<cyclus::Product>,
84 cyclus::Product::Ptr> >& responses);
122 inline const std::vector<std::string>&
126 inline const std::vector<double>&
133 #pragma cyclus var {"tooltip": "input commodities", "doc": "commodities that the sink facility accepts", "uilabel": "List of Input Commodities", "uitype": ["oneormore", "incommodity"]}
134#line 125 "/cycamore/src/sink.h"
137#line 126 "/cycamore/src/sink.h"
140 #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"]}
141#line 133 "/cycamore/src/sink.h"
144#line 134 "/cycamore/src/sink.h"
147 #pragma cyclus var {"default": "", "tooltip": "requested composition", "doc": "name of recipe to use for material requests, " "where the default (empty string) is to accept " "everything", "uilabel": "Input Recipe", "uitype": "inrecipe"}
148#line 142 "/cycamore/src/sink.h"
152#line 143 "/cycamore/src/sink.h"
155 #pragma cyclus var {"default": CY_LARGE_DOUBLE, "tooltip": "sink maximum inventory size", "uilabel": "Maximum Inventory", "uitype": "range", "range": [0.0, CY_LARGE_DOUBLE], "doc": "total maximum inventory size of sink facility"}
156#line 151 "/cycamore/src/sink.h"
160#line 152 "/cycamore/src/sink.h"
163 #pragma cyclus var {"default": CY_LARGE_DOUBLE, "tooltip": "sink capacity", "uilabel": "Maximum Throughput", "uitype": "range", "range": [0.0, CY_LARGE_DOUBLE], "doc": "capacity the sink facility can " "accept at each time step"}
164#line 161 "/cycamore/src/sink.h"
168#line 162 "/cycamore/src/sink.h"
171 #pragma cyclus var {'capacity': 'max_inv_size'}
175#line 166 "/cycamore/src/sink.h"
178 #pragma cyclus var {"default": "None", "tooltip": "type of random behavior when setting the " "size of the request", "uitype": "combobox", "uilabel": "Random Size", "categorical": ["None", "UniformReal", "UniformInt", "NormalReal", "NormalInt"], "doc": "type of random behavior to use. Default None, " "other options are 'UniformReal', 'UniformInt', " "'NormalReal', and 'NormalInt'"}
179#line 177 "/cycamore/src/sink.h"
183#line 178 "/cycamore/src/sink.h"
186 #pragma cyclus var {"default": 1.0, "tooltip": "fraction of available space to determine the mean", "uilabel": "Random Size Mean", "uitype": "range", "range": [0.0, CY_LARGE_DOUBLE], "doc": "When a normal distribution is used to determine the " "size of the request, this is the fraction of available " "space to use as the mean. Default 1.0. Note " "that values significantly above 1 without a " "correspondingly large std dev may result in " "inefficient use of the random number generator."}
187#line 191 "/cycamore/src/sink.h"
191#line 192 "/cycamore/src/sink.h"
194 #pragma cyclus var {"default": 0.1, "tooltip": "fraction of available space to determine the std dev", "uilabel": "Random Size Std Dev", "uitype": "range", "range": [0.0, CY_LARGE_DOUBLE], "doc": "When a normal distribution is used to determine the " "size of the request, this is the fraction of available " "space to use as the standard deviation. Default 0.1"}
195#line 202 "/cycamore/src/sink.h"
199#line 203 "/cycamore/src/sink.h"
202 #pragma cyclus var {"default": "None", "tooltip": "type of random behavior when setting the " "timing of the request", "uitype": "combobox", "uilabel": "Random Timing", "categorical": ["None", "UniformInt", "NormalInt"], "doc": "type of random behavior to use. Default None, " "other options are, 'UniformInt', and 'NormalInt'. " "When using 'UniformInt', also set " "'random_frequency_min' and 'random_frequency_max'. " "For 'NormalInt', set 'random_frequency_mean' and " "'random_fequency_stddev', min and max values are " "optional. "}
203#line 218 "/cycamore/src/sink.h"
207#line 219 "/cycamore/src/sink.h"
210 #pragma cyclus var {"default": 1, "tooltip": "mean of the random frequency", "uilabel": "Random Frequency Mean", "uitype": "range", "range": [0.0, CY_LARGE_DOUBLE], "doc": "When a normal distribution is used to determine the " "frequency of the request, this is the mean. Default 1"}
211#line 228 "/cycamore/src/sink.h"
215#line 229 "/cycamore/src/sink.h"
218 #pragma cyclus var {"default": 1, "tooltip": "std dev of the random frequency", "uilabel": "Random Frequency Std Dev", "uitype": "range", "range": [0.0, CY_LARGE_DOUBLE], "doc": "When a normal distribution is used to determine the " "frequency of the request, this is the standard deviation. Default 1"}
219#line 238 "/cycamore/src/sink.h"
223#line 239 "/cycamore/src/sink.h"
226 #pragma cyclus var {"default": 1, "tooltip": "lower bound of the random frequency", "uilabel": "Random Frequency Lower Bound", "uitype": "range", "range": [1, CY_LARGE_INT], "doc": "When a random distribution is used to determine the " "frequency of the request, this is the lower bound. Default 1"}
227#line 248 "/cycamore/src/sink.h"
231#line 249 "/cycamore/src/sink.h"
234 #pragma cyclus var {"default": CY_LARGE_INT, "tooltip": "upper bound of the random frequency", "uilabel": "Random Frequency Upper Bound", "uitype": "range", "range": [1, CY_LARGE_INT], "doc": "When a random distribution is used to determine the " f"frequency of the request, this is the upper bound. Default {CY_LARGE_INT} (CY_LARGE_INT)"}
235#line 258 "/cycamore/src/sink.h"
238#line 259 "/cycamore/src/sink.h"
241 #pragma cyclus var { "default": True, "tooltip": "Whether to persist packaging in the sink.", "doc": "Boolean value about whether to keep packaging. If true, " "packaging will not be stripped upon acceptance into the " "sink. If false, package type will be stripped immediately " "upon acceptance. Has no effect if the incoming material is not " "packaged.", "uilabel": "Keep Packaging", "uitype": "bool"}
242#line 270 "/cycamore/src/sink.h"
245#line 271 "/cycamore/src/sink.h"
248 #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." }
249#line 278 "/cycamore/src/sink.h"
252#line 279 "/cycamore/src/sink.h"
255 #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." }
256#line 286 "/cycamore/src/sink.h"
260#line 287 "/cycamore/src/sink.h"
This facility acts as a sink of materials and products with a fixed throughput (per time step) capaci...
cyclus::toolkit::ResBuf< cyclus::Resource > inventory
this facility holds material in storage.
std::vector< int > cycpp_shape_random_frequency_mean
virtual Json::Value annotations()
Sink(cyclus::Context *ctx)
virtual void SetRequestAmt()
SinkFacilities update request amount using random behavior.
virtual void InitFrom(cycamore::Sink *m)
virtual void EnterNotify()
std::vector< int > cycpp_shape_random_frequency_stddev
std::vector< int > cycpp_shape_random_frequency_max
std::vector< std::string > in_commods
all facilities must have at least one input commodity
virtual void AcceptMatlTrades(const std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &responses)
SinkFacilities place accepted trade Materials in their Inventory.
double random_size_stddev
std::vector< double > in_commod_prefs
std::string random_frequency_type
std::vector< int > cycpp_shape_random_frequency_type
double random_frequency_stddev
virtual void InitInv(cyclus::Inventories &inv)
std::vector< int > cycpp_shape_in_commod_prefs
const std::vector< double > & input_commodity_preferences() const
void SetMaxInventorySize(double size)
sets the size of the storage inventory for received material
std::vector< int > cycpp_shape_in_commods
std::vector< int > cycpp_shape_keep_packaging
virtual std::set< cyclus::RequestPortfolio< cyclus::Material >::Ptr > GetMatlRequests()
SinkFacilities request Materials of their given commodity.
std::vector< int > cycpp_shape_latitude
std::string random_size_type
random status (size of request)
double capacity
monthly acceptance capacity
std::vector< int > cycpp_shape_longitude
cyclus::toolkit::Position coordinates
double SpaceAvailable() const
determines the amount to request
std::vector< int > cycpp_shape_capacity
virtual std::string schema()
virtual cyclus::Inventories SnapshotInv()
double InventorySize() const
std::vector< int > cycpp_shape_random_size_mean
double max_inv_size
max inventory size
virtual std::set< cyclus::RequestPortfolio< cyclus::Product >::Ptr > GetGenRsrcRequests()
SinkFacilities request Products of their given commodity.
virtual void Snapshot(cyclus::DbInit di)
std::vector< int > cycpp_shape_random_size_type
virtual void SetNextBuyTime()
SinkFacilities update request time using random behavior.
virtual void AcceptGenRsrcTrades(const std::vector< std::pair< cyclus::Trade< cyclus::Product >, cyclus::Product::Ptr > > &responses)
SinkFacilities place accepted trade Materials in their Inventory.
virtual std::string version()
virtual std::string str()
double MaxInventorySize() const
const std::vector< std::string > & input_commodities() const
virtual void InfileToDb(cyclus::InfileTree *tree, cyclus::DbInit di)
std::vector< int > cycpp_shape_random_size_stddev
std::vector< int > cycpp_shape_inventory
std::vector< int > cycpp_shape_random_frequency_min
void AddCommodity(std::string name)
add a commodity to the set of input commodities
virtual cyclus::Agent * Clone()
void Capacity(double cap)
sets the capacity of a material generated at any given time step
double random_frequency_mean
std::vector< int > cycpp_shape_recipe_name
std::vector< int > cycpp_shape_max_inv_size