CYCAMORE
Loading...
Searching...
No Matches
build/cycamore/storage.cc
Go to the documentation of this file.
1#line 1 "/cycamore/src/storage.cc"
2// storage.cc
3// Implements the Storage class
4#include "storage.h"
5
6namespace cycamore {
7
8// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9Storage::Storage(cyclus::Context* ctx)
10 : cyclus::Facility(ctx),
11 latitude(0.0),
12 longitude(0.0),
14 inventory_tracker.Init({&inventory, &stocks, &ready, &processing}, cyclus::CY_LARGE_DOUBLE);
15 cyclus::Warn<cyclus::EXPERIMENTAL_WARNING>(
16 "The Storage Facility is experimental.");};
17
18// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
19// pragmas
20
21std::string Storage::schema() {
22 return ""
23 "<interleave>\n"
24 " <element name=\"in_commods\">\n"
25 " <oneOrMore>\n"
26 " <element name=\"val\">\n"
27 " <data type=\"string\"/>\n"
28 " </element>\n"
29 " </oneOrMore>\n"
30 " </element>\n"
31 " <optional>\n"
32 " <element name=\"in_commod_prefs\">\n"
33 " <oneOrMore>\n"
34 " <element name=\"val\">\n"
35 " <data type=\"double\"/>\n"
36 " </element>\n"
37 " </oneOrMore>\n"
38 " </element>\n"
39 " </optional>\n"
40 " <element name=\"out_commods\">\n"
41 " <oneOrMore>\n"
42 " <element name=\"val\">\n"
43 " <data type=\"string\"/>\n"
44 " </element>\n"
45 " </oneOrMore>\n"
46 " </element>\n"
47 " <optional>\n"
48 " <element name=\"in_recipe\">\n"
49 " <a:documentation>recipe accepted by this facility, if unspecified a dummy recipe is used</a:documentation>\n"
50 " <data type=\"string\"/>\n"
51 " </element>\n"
52 " </optional>\n"
53 " <optional>\n"
54 " <element name=\"residence_time\">\n"
55 " <a:documentation>the minimum holding time for a received commodity (timesteps).</a:documentation>\n"
56 " <data type=\"int\"/>\n"
57 " </element>\n"
58 " </optional>\n"
59 " <optional>\n"
60 " <element name=\"sell_quantity\">\n"
61 " <a:documentation>material will be sold in integer multiples of this quantity. If the buffer contains less than the sell quantity, no material will be offered</a:documentation>\n"
62 " <data type=\"double\"/>\n"
63 " </element>\n"
64 " </optional>\n"
65 " <optional>\n"
66 " <element name=\"throughput\">\n"
67 " <a:documentation>the max amount that can be moved through the facility per timestep (kg)</a:documentation>\n"
68 " <data type=\"double\"/>\n"
69 " </element>\n"
70 " </optional>\n"
71 " <optional>\n"
72 " <element name=\"max_inv_size\">\n"
73 " <a:documentation>the maximum amount of material that can be in all storage buffer stages</a:documentation>\n"
74 " <data type=\"double\"/>\n"
75 " </element>\n"
76 " </optional>\n"
77 " <optional>\n"
78 " <element name=\"discrete_handling\">\n"
79 " <a:documentation>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))</a:documentation>\n"
80 " <data type=\"boolean\"/>\n"
81 " </element>\n"
82 " </optional>\n"
83 " <optional>\n"
84 " <element name=\"active_buying_frequency_type\">\n"
85 " <a:documentation>Options: Fixed, Uniform, Normal, Binomial, FixedWithDisruption. 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. Binomial requires active_buying_end_probability.FixedWithDisruption has a probability that any given cycle will have a disrupted, active length. Once per cycle, a Bernoulli distribution (Binomial dist with N=1) will be sampled to determine if typical or disrupted cycle. If typical, active_buying_val is cycle length. If disrupted, active_buying_disruption.</a:documentation>\n"
86 " <data type=\"string\"/>\n"
87 " </element>\n"
88 " </optional>\n"
89 " <optional>\n"
90 " <element name=\"active_buying_val\">\n"
91 " <a:documentation>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)</a:documentation>\n"
92 " <data type=\"int\"/>\n"
93 " </element>\n"
94 " </optional>\n"
95 " <optional>\n"
96 " <element name=\"active_buying_min\">\n"
97 " <a:documentation>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 </a:documentation>\n"
98 " <data type=\"int\"/>\n"
99 " </element>\n"
100 " </optional>\n"
101 " <optional>\n"
102 " <element name=\"active_buying_max\">\n"
103 " <a:documentation>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 </a:documentation>\n"
104 " <data type=\"int\"/>\n"
105 " </element>\n"
106 " </optional>\n"
107 " <optional>\n"
108 " <element name=\"active_buying_mean\">\n"
109 " <a:documentation>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 </a:documentation>\n"
110 " <data type=\"double\"/>\n"
111 " </element>\n"
112 " </optional>\n"
113 " <optional>\n"
114 " <element name=\"active_buying_stddev\">\n"
115 " <a:documentation>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 </a:documentation>\n"
116 " <data type=\"double\"/>\n"
117 " </element>\n"
118 " </optional>\n"
119 " <optional>\n"
120 " <element name=\"active_buying_end_probability\">\n"
121 " <a:documentation>Binomial distribution has a fixed probability of going dormant at any given timestep, like a weighted coin flip. Required for Binomial active_buying_frequency_type. Must be between 0 and 1</a:documentation>\n"
122 " <data type=\"double\"/>\n"
123 " </element>\n"
124 " </optional>\n"
125 " <optional>\n"
126 " <element name=\"active_buying_disruption_probability\">\n"
127 " <a:documentation>Probability that the agent undergoes a disruption (disrupted active period) during any given cycle. Required for FixedWithDisruption active_buying_frequency_type.</a:documentation>\n"
128 " <data type=\"double\"/>\n"
129 " </element>\n"
130 " </optional>\n"
131 " <optional>\n"
132 " <element name=\"active_buying_disruption\">\n"
133 " <a:documentation>When a active cycle is disrupted, this is length of the active period instead of active_buying_val. Required for FixedWithDisruption active_buying_frequency_type</a:documentation>\n"
134 " <data type=\"int\"/>\n"
135 " </element>\n"
136 " </optional>\n"
137 " <optional>\n"
138 " <element name=\"dormant_buying_frequency_type\">\n"
139 " <a:documentation>Options: Fixed, Uniform, Normal, Binomial, FixedWithDisruption. 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. Binomial requires dormant_buying_end_probability. FixedWithDisruption has a probability that any given cycle will have a disrupted, or long, outage. Once per cycle, a Bernoulli distribution (Binomial dist with N=1) will be sampled to determine if typical or disrupted cycle. If typical, dormant_buying_val is cycle length. If disrupted, dormant_buying_disruption.</a:documentation>\n"
140 " <data type=\"string\"/>\n"
141 " </element>\n"
142 " </optional>\n"
143 " <optional>\n"
144 " <element name=\"dormant_buying_val\">\n"
145 " <a:documentation>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.</a:documentation>\n"
146 " <data type=\"int\"/>\n"
147 " </element>\n"
148 " </optional>\n"
149 " <optional>\n"
150 " <element name=\"dormant_buying_min\">\n"
151 " <a:documentation>The minimum length in time steps of the dormant buying period. Required for Uniform and optional for Normal dormant_buying_frequency_type.</a:documentation>\n"
152 " <data type=\"int\"/>\n"
153 " </element>\n"
154 " </optional>\n"
155 " <optional>\n"
156 " <element name=\"dormant_buying_max\">\n"
157 " <a:documentation>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 </a:documentation>\n"
158 " <data type=\"int\"/>\n"
159 " </element>\n"
160 " </optional>\n"
161 " <optional>\n"
162 " <element name=\"dormant_buying_mean\">\n"
163 " <a:documentation>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 </a:documentation>\n"
164 " <data type=\"double\"/>\n"
165 " </element>\n"
166 " </optional>\n"
167 " <optional>\n"
168 " <element name=\"dormant_buying_stddev\">\n"
169 " <a:documentation>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 </a:documentation>\n"
170 " <data type=\"double\"/>\n"
171 " </element>\n"
172 " </optional>\n"
173 " <optional>\n"
174 " <element name=\"dormant_buying_end_probability\">\n"
175 " <a:documentation>Binomial distribution has a fixed probability of going active at any given timestep, like a weighted coin flip. Required for Binomial dormant_buying_frequency_type. Must be between 0 and 1</a:documentation>\n"
176 " <data type=\"double\"/>\n"
177 " </element>\n"
178 " </optional>\n"
179 " <optional>\n"
180 " <element name=\"dormant_buying_disruption_probability\">\n"
181 " <a:documentation>Probability that the agent undergoes a disruption (longer offline period) during any given cycle. Required for FixedWithDisruption dormant_buying_frequency_type.</a:documentation>\n"
182 " <data type=\"double\"/>\n"
183 " </element>\n"
184 " </optional>\n"
185 " <optional>\n"
186 " <element name=\"dormant_buying_disruption\">\n"
187 " <a:documentation>When a dormant cycle is disrupted, this is length of the offline period instead of dormant_buying_val. Required for FixedWithDisruption dormant_buying_frequency_type</a:documentation>\n"
188 " <data type=\"int\"/>\n"
189 " </element>\n"
190 " </optional>\n"
191 " <optional>\n"
192 " <element name=\"buying_size_type\">\n"
193 " <a:documentation>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.</a:documentation>\n"
194 " <data type=\"string\"/>\n"
195 " </element>\n"
196 " </optional>\n"
197 " <optional>\n"
198 " <element name=\"buying_size_val\">\n"
199 " <a:documentation>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</a:documentation>\n"
200 " <data type=\"double\"/>\n"
201 " </element>\n"
202 " </optional>\n"
203 " <optional>\n"
204 " <element name=\"buying_size_min\">\n"
205 " <a:documentation>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.</a:documentation>\n"
206 " <data type=\"double\"/>\n"
207 " </element>\n"
208 " </optional>\n"
209 " <optional>\n"
210 " <element name=\"buying_size_max\">\n"
211 " <a:documentation>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 </a:documentation>\n"
212 " <data type=\"double\"/>\n"
213 " </element>\n"
214 " </optional>\n"
215 " <optional>\n"
216 " <element name=\"buying_size_mean\">\n"
217 " <a:documentation>The mean size of the buy request as a fraction of maximum capacity. Required for Normal buying_size_type.</a:documentation>\n"
218 " <data type=\"double\"/>\n"
219 " </element>\n"
220 " </optional>\n"
221 " <optional>\n"
222 " <element name=\"buying_size_stddev\">\n"
223 " <a:documentation>The standard deviation of the size of the buy request as a fraction of maximum capacity. Required for Normal buying_size_type.</a:documentation>\n"
224 " <data type=\"double\"/>\n"
225 " </element>\n"
226 " </optional>\n"
227 " <optional>\n"
228 " <element name=\"reorder_point\">\n"
229 " <a:documentation>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.</a:documentation>\n"
230 " <data type=\"double\"/>\n"
231 " </element>\n"
232 " </optional>\n"
233 " <optional>\n"
234 " <element name=\"reorder_quantity\">\n"
235 " <a:documentation>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.</a:documentation>\n"
236 " <data type=\"double\"/>\n"
237 " </element>\n"
238 " </optional>\n"
239 " <optional>\n"
240 " <element name=\"cumulative_cap\">\n"
241 " <a:documentation>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.</a:documentation>\n"
242 " <data type=\"double\"/>\n"
243 " </element>\n"
244 " </optional>\n"
245 " <optional>\n"
246 " <element name=\"package\">\n"
247 " <a:documentation>Outgoing material will be packaged when trading.</a:documentation>\n"
248 " <data type=\"string\"/>\n"
249 " </element>\n"
250 " </optional>\n"
251 " <optional>\n"
252 " <element name=\"transport_unit\">\n"
253 " <a:documentation>Outgoing material, after packaging, will be further restricted by transport unit when trading.</a:documentation>\n"
254 " <data type=\"string\"/>\n"
255 " </element>\n"
256 " </optional>\n"
257 " <optional>\n"
258 " <element name=\"latitude\">\n"
259 " <a:documentation>Latitude of the agent's geographical position. The value should be expressed in degrees as a double.</a:documentation>\n"
260 " <data type=\"double\"/>\n"
261 " </element>\n"
262 " </optional>\n"
263 " <optional>\n"
264 " <element name=\"longitude\">\n"
265 " <a:documentation>Longitude of the agent's geographical position. The value should be expressed in degrees as a double.</a:documentation>\n"
266 " <data type=\"double\"/>\n"
267 " </element>\n"
268 " </optional>\n"
269 "</interleave>\n";
270};
271#line 21 "/cycamore/src/storage.cc"
272
273Json::Value Storage::annotations() {
274 Json::Value root;
275 Json::Reader reader;
276 bool parsed_ok = reader.parse(
277 "{\"name\":\"cycamore::Storage\",\"entity\":\"facility\",\"p"
278 "arents\":[\"cyclus::Facility\",\"cyclus::toolkit::Comm"
279 "odityProducer\",\"cyclus::toolkit::Position\"],\"all_p"
280 "arents\":[\"EconomicEntity\",\"cyclus::Agent\",\"cyclus:"
281 ":Facility\",\"cyclus::Ider\",\"cyclus::StateWrangler\","
282 "\"cyclus::TimeListener\",\"cyclus::Trader\",\"cyclus::t"
283 "oolkit::AgentManaged\",\"cyclus::toolkit::CommodityP"
284 "roducer\",\"cyclus::toolkit::Position\"],\"vars\":{\"in_"
285 "commods\":{\"tooltip\":[\"input "
286 "commodity\",\"\"],\"doc\":\"commodities accepted by this"
287 " facility\",\"uilabel\":[\"Input Commodities\",\"\"],\"uit"
288 "ype\":[\"oneormore\",\"incommodity\"],\"type\":[\"std::vec"
289 "tor\",\"std::string\"],\"index\":0,\"shape\":[-1,-"
290 "1],\"alias\":[\"in_commods\",\"val\"]},\"in_commod_prefs\""
291 ":{\"default\":[],\"doc\":\"preferences for each of the "
292 "given commodities, in the same order.Defauts to 1 "
293 "if unspecified\",\"uilabel\":[\"In Commody Preferences"
294 "\",\"\"],\"range\":[null,[1e-"
295 "08,1e+299]],\"uitype\":[\"oneormore\",\"range\"],\"type\":"
296 "[\"std::vector\",\"double\"],\"index\":1,\"shape\":[-1,-"
297 "1],\"alias\":[\"in_commod_prefs\",\"val\"],\"tooltip\":[\"i"
298 "n_commod_prefs\",\"\"]},\"out_commods\":{\"tooltip\":[\"ou"
299 "tput commodity\",\"\"],\"doc\":\"commodity produced by "
300 "this facility. Multiple commodity tracking is "
301 "currently not supported, one output commodity "
302 "catches all input commodities.\",\"uilabel\":[\"Output"
303 " Commodities\",\"\"],\"uitype\":[\"oneormore\",\"outcommod"
304 "ity\"],\"type\":[\"std::vector\",\"std::string\"],\"index\""
305 ":2,\"shape\":[-1,-"
306 "1],\"alias\":[\"out_commods\",\"val\"]},\"in_recipe\":{\"de"
307 "fault\":\"\",\"tooltip\":\"input recipe\",\"doc\":\"recipe "
308 "accepted by this facility, if unspecified a dummy "
309 "recipe is used\",\"uilabel\":\"Input Recipe\",\"uitype\":"
310 "\"inrecipe\",\"type\":\"std::string\",\"index\":3,\"shape\":"
311 "[-"
312 "1],\"alias\":\"in_recipe\"},\"residence_time\":{\"default"
313 "\":0,\"tooltip\":\"residence time "
314 "(timesteps)\",\"doc\":\"the minimum holding time for a"
315 " received commodity (timesteps).\",\"units\":\"time "
316 "steps\",\"uilabel\":\"Residence Time\",\"uitype\":\"range\""
317 ",\"range\":[0,12000],\"type\":\"int\",\"index\":4,\"shape\":"
318 "[-"
319 "1],\"alias\":\"residence_time\"},\"sell_quantity\":{\"def"
320 "ault\":0,\"tooltip\":\"sell quantity "
321 "(kg)\",\"doc\":\"material will be sold in integer "
322 "multiples of this quantity. If the buffer contains"
323 " less than the sell quantity, no material will be "
324 "offered\",\"uilabel\":\"Sell Quantity\",\"uitype\":\"range"
325 "\",\"range\":[0.0,1e+299],\"units\":\"kg\",\"type\":\"double"
326 "\",\"index\":5,\"shape\":[-"
327 "1],\"alias\":\"sell_quantity\"},\"throughput\":{\"default"
328 "\":1e+299,\"tooltip\":\"throughput per timestep "
329 "(kg)\",\"doc\":\"the max amount that can be moved "
330 "through the facility per timestep (kg)\",\"uilabel\":"
331 "\"Throughput\",\"uitype\":\"range\",\"range\":[0.0,1e+299]"
332 ",\"units\":\"kg\",\"type\":\"double\",\"index\":6,\"shape\":[-"
333 "1],\"alias\":\"throughput\"},\"max_inv_size\":{\"default\""
334 ":1e+299,\"tooltip\":\"maximum inventory size "
335 "(kg)\",\"doc\":\"the maximum amount of material that "
336 "can be in all storage buffer "
337 "stages\",\"uilabel\":\"Maximum Inventory Size\",\"uitype"
338 "\":\"range\",\"range\":[0.0,1e+299],\"units\":\"kg\",\"type\""
339 ":\"double\",\"index\":7,\"shape\":[-"
340 "1],\"alias\":\"max_inv_size\"},\"discrete_handling\":{\"d"
341 "efault\":false,\"tooltip\":\"Bool to determine how "
342 "Storage handles batches\",\"doc\":\"Determines if "
343 "Storage will divide resource objects. Only "
344 "controls material handling within this facility, "
345 "has no effect on DRE material handling. If true, "
346 "batches are handled as discrete quanta, neither "
347 "split nor combined. Otherwise, batches may be "
348 "divided during processing. Default to false "
349 "(continuous))\",\"uilabel\":\"Batch Handling\",\"type\":\""
350 "bool\",\"index\":8,\"shape\":[-"
351 "1],\"alias\":\"discrete_handling\"},\"active_buying_fre"
352 "quency_type\":{\"default\":\"Fixed\",\"tooltip\":\"Type of"
353 " active buying frequency\",\"doc\":\"Options: Fixed, "
354 "Uniform, Normal, Binomial, FixedWithDisruption. "
355 "Fixed requires active_buying_val. Uniform requires"
356 " active_buying_min and active_buying_max. Normal "
357 "requires active_buying_mean and active_buying_std,"
358 " with optional active_buying_min and "
359 "active_buying_max. Binomial requires "
360 "active_buying_end_probability.FixedWithDisruption "
361 "has a probability that any given cycle will have a"
362 " disrupted, active length. Once per cycle, a "
363 "Bernoulli distribution (Binomial dist with N=1) "
364 "will be sampled to determine if typical or "
365 "disrupted cycle. If typical, active_buying_val is "
366 "cycle length. If disrupted, active_buying_disrupti"
367 "on.\",\"uitype\":\"combobox\",\"categorical\":[\"Fixed\",\"U"
368 "niform\",\"Normal\",\"Binomial\",\"FixedWithDisruption\"]"
369 ",\"uilabel\":\"Active Buying Frequency Type\",\"type\":\""
370 "std::string\",\"index\":9,\"shape\":[-"
371 "1],\"alias\":\"active_buying_frequency_type\"},\"active"
372 "_buying_val\":{\"default\":-1,\"tooltip\":\"Fixed active"
373 " buying frequency\",\"doc\":\"The length in time steps"
374 " of the active buying period. Required for fixed "
375 "active_buying_frequency_type. Must be greater than"
376 " or equal to 1 (i.e., agent cannot always be dorma"
377 "nt)\",\"uitype\":\"range\",\"range\":[1,2147483647],\"uila"
378 "bel\":\"Active Buying Frequency Value\",\"type\":\"int\","
379 "\"index\":10,\"shape\":[-"
380 "1],\"alias\":\"active_buying_val\"},\"active_buying_min"
381 "\":{\"default\":-1,\"tooltip\":\"Active buying "
382 "distribution minimum\",\"doc\":\"The minimum length in"
383 " time steps of the active buying period. Required "
384 "for Uniform and optional for Normal "
385 "active_buying_frequency_type. Must be greater than"
386 " or equal to 1 \",\"uitype\":\"range\",\"range\":[1,21474"
387 "83647],\"uilabel\":\"Active Buying Frequency Minimum\""
388 ",\"type\":\"int\",\"index\":11,\"shape\":[-"
389 "1],\"alias\":\"active_buying_min\"},\"active_buying_max"
390 "\":{\"default\":-1,\"tooltip\":\"Active buying "
391 "distribution maximum\",\"doc\":\"The maximum length in"
392 " time steps of the active buying period. Required "
393 "for Uniform active_buying_frequency_type, optional"
394 " for Normal. Must be greater than or equal to "
395 "active_buying_min \",\"uitype\":\"range\",\"range\":[1,21"
396 "47483647],\"uilabel\":\"Active Buying Frequency Maxim"
397 "um\",\"type\":\"int\",\"index\":12,\"shape\":[-"
398 "1],\"alias\":\"active_buying_max\"},\"active_buying_mea"
399 "n\":{\"default\":-1,\"tooltip\":\"Active buying "
400 "distribution mean\",\"doc\":\"The mean length in time "
401 "steps of the active buying period. Required for "
402 "Normal active_buying_frequency_type. Must be "
403 "greater than or equal to 1 \",\"uitype\":\"range\",\"ran"
404 "ge\":[1.0,1e+299],\"uilabel\":\"Active Buying "
405 "Frequency Mean\",\"type\":\"double\",\"index\":13,\"shape\""
406 ":[-"
407 "1],\"alias\":\"active_buying_mean\"},\"active_buying_st"
408 "ddev\":{\"default\":-1,\"tooltip\":\"Active buying "
409 "distribution standard deviation\",\"doc\":\"The "
410 "standard deviation of the length in time steps of "
411 "the active buying period. Required for Normal "
412 "active_buying_frequency_type. Must be greater than"
413 " or equal to 0 \",\"uitype\":\"range\",\"range\":[0.0,1e+"
414 "299],\"uilabel\":\"Active Buying Frequency Standard D"
415 "eviation\",\"type\":\"double\",\"index\":14,\"shape\":[-"
416 "1],\"alias\":\"active_buying_stddev\"},\"active_buying_"
417 "end_probability\":{\"default\":0,\"tooltip\":\"Probabili"
418 "ty that agent will go offline during the next time"
419 " step\",\"doc\":\"Binomial distribution has a fixed "
420 "probability of going dormant at any given "
421 "timestep, like a weighted coin flip. Required for "
422 "Binomial active_buying_frequency_type. Must be "
423 "between 0 and 1\",\"uitype\":\"range\",\"range\":[0.0,1.0"
424 "],\"uilabel\":\"Active Buying Offline Probability\",\"t"
425 "ype\":\"double\",\"index\":15,\"shape\":[-"
426 "1],\"alias\":\"active_buying_end_probability\"},\"activ"
427 "e_buying_disruption_probability\":{\"default\":0,\"too"
428 "ltip\":\"Probability that a cycle contains a "
429 "disruption\",\"doc\":\"Probability that the agent "
430 "undergoes a disruption (disrupted active period) "
431 "during any given cycle. Required for "
432 "FixedWithDisruption active_buying_frequency_type.\""
433 ",\"uitype\":\"range\",\"range\":[0.0,1.0],\"uilabel\":\"Act"
434 "ive Buying Disruption Probability\",\"type\":\"double\""
435 ",\"index\":16,\"shape\":[-"
436 "1],\"alias\":\"active_buying_disruption_probability\"}"
437 ",\"active_buying_disruption\":{\"default\":-"
438 "1,\"tooltip\":\"Fixed length of disrupted active "
439 "cycle\",\"doc\":\"When a active cycle is disrupted, "
440 "this is length of the active period instead of "
441 "active_buying_val. Required for "
442 "FixedWithDisruption active_buying_frequency_type\","
443 "\"uitype\":\"range\",\"range\":[0,2147483647],\"type\":\"in"
444 "t\",\"index\":17,\"shape\":[-"
445 "1],\"alias\":\"active_buying_disruption\",\"uilabel\":\"a"
446 "ctive_buying_disruption\"},\"dormant_buying_frequenc"
447 "y_type\":{\"default\":\"Fixed\",\"tooltip\":\"Type of "
448 "dormant buying frequency\",\"doc\":\"Options: Fixed, "
449 "Uniform, Normal, Binomial, FixedWithDisruption. "
450 "Fixed requires dormant_buying_val. Uniform "
451 "requires dormant_buying_min and "
452 "dormant_buying_max. Normal requires "
453 "dormant_buying_mean and dormant_buying_std, with "
454 "optional dormant_buying_min and "
455 "dormant_buying_max. Binomial requires "
456 "dormant_buying_end_probability. "
457 "FixedWithDisruption has a probability that any "
458 "given cycle will have a disrupted, or long, "
459 "outage. Once per cycle, a Bernoulli distribution "
460 "(Binomial dist with N=1) will be sampled to "
461 "determine if typical or disrupted cycle. If "
462 "typical, dormant_buying_val is cycle length. If "
463 "disrupted, dormant_buying_disruption.\",\"uitype\":\"c"
464 "ombobox\",\"categorical\":[\"Fixed\",\"Uniform\",\"Normal\""
465 ",\"Binomial\",\"FixedWithDisruption\"],\"uilabel\":\"Dorm"
466 "ant Buying Frequency Type\",\"type\":\"std::string\",\"i"
467 "ndex\":18,\"shape\":[-"
468 "1],\"alias\":\"dormant_buying_frequency_type\"},\"dorma"
469 "nt_buying_val\":{\"default\":-1,\"tooltip\":\"Fixed "
470 "dormant buying frequency\",\"doc\":\"The length in "
471 "time steps of the dormant buying period. Required "
472 "for fixed dormant_buying_frequency_type. Default "
473 "is -1, agent has no dormant period and stays activ"
474 "e.\",\"uitype\":\"range\",\"range\":[-"
475 "1,2147483647],\"uilabel\":\"Dormant Buying Frequency "
476 "Value\",\"type\":\"int\",\"index\":19,\"shape\":[-"
477 "1],\"alias\":\"dormant_buying_val\"},\"dormant_buying_m"
478 "in\":{\"default\":-1,\"tooltip\":\"Dormant buying "
479 "distribution minimum\",\"doc\":\"The minimum length in"
480 " time steps of the dormant buying period. Required"
481 " for Uniform and optional for Normal dormant_buyin"
482 "g_frequency_type.\",\"uitype\":\"range\",\"range\":[0,214"
483 "7483647],\"uilabel\":\"Dormant Buying Frequency Minim"
484 "um\",\"type\":\"int\",\"index\":20,\"shape\":[-"
485 "1],\"alias\":\"dormant_buying_min\"},\"dormant_buying_m"
486 "ax\":{\"default\":-1,\"tooltip\":\"Dormant buying "
487 "distribution maximum\",\"doc\":\"The maximum length in"
488 " time steps of the dormant buying period. Required"
489 " for Uniform dormant_buying_frequency_type, "
490 "optional for Normal. Must be greater than or equal"
491 " to dormant_buying_min \",\"uitype\":\"range\",\"range\":"
492 "[0,2147483647],\"uilabel\":\"Dormant Buying Frequency"
493 " Maximum\",\"type\":\"int\",\"index\":21,\"shape\":[-"
494 "1],\"alias\":\"dormant_buying_max\"},\"dormant_buying_m"
495 "ean\":{\"default\":-1,\"tooltip\":\"Dormant buying "
496 "distribution mean\",\"doc\":\"The mean length in time "
497 "steps of the dormant buying period. Required for "
498 "Normal dormant_buying_frequency_type. Must be "
499 "greater than or equal to 0 \",\"uitype\":\"range\",\"ran"
500 "ge\":[0.0,1e+299],\"uilabel\":\"Dormant Buying "
501 "Frequency Mean\",\"type\":\"double\",\"index\":22,\"shape\""
502 ":[-"
503 "1],\"alias\":\"dormant_buying_mean\"},\"dormant_buying_"
504 "stddev\":{\"default\":-1,\"tooltip\":\"Dormant buying "
505 "distribution standard deviation\",\"doc\":\"The "
506 "standard deviation of the length in time steps of "
507 "the dormant buying period. Required for Normal "
508 "dormant_buying_frequency_type. Must be greater "
509 "than or equal to 0 \",\"uitype\":\"range\",\"range\":[0.0"
510 ",1e+299],\"uilabel\":\"Dormant Buying Frequency "
511 "Standard Deviation\",\"type\":\"double\",\"index\":23,\"sh"
512 "ape\":[-"
513 "1],\"alias\":\"dormant_buying_stddev\"},\"dormant_buyin"
514 "g_end_probability\":{\"default\":0,\"tooltip\":\"Probabi"
515 "lity that agent will return to active during the "
516 "next time step\",\"doc\":\"Binomial distribution has a"
517 " fixed probability of going active at any given "
518 "timestep, like a weighted coin flip. Required for "
519 "Binomial dormant_buying_frequency_type. Must be "
520 "between 0 and 1\",\"uitype\":\"range\",\"range\":[0.0,1.0"
521 "],\"uilabel\":\"Dormant Buying Binomial Offline Proba"
522 "bility\",\"type\":\"double\",\"index\":24,\"shape\":[-"
523 "1],\"alias\":\"dormant_buying_end_probability\"},\"dorm"
524 "ant_buying_disruption_probability\":{\"default\":0,\"t"
525 "ooltip\":\"Probability that a cycle contains a "
526 "disruption\",\"doc\":\"Probability that the agent "
527 "undergoes a disruption (longer offline period) "
528 "during any given cycle. Required for "
529 "FixedWithDisruption dormant_buying_frequency_type."
530 "\",\"uitype\":\"range\",\"range\":[0.0,1.0],\"uilabel\":\"Do"
531 "rmant Buying Disruption Probability\",\"type\":\"doubl"
532 "e\",\"index\":25,\"shape\":[-"
533 "1],\"alias\":\"dormant_buying_disruption_probability\""
534 "},\"dormant_buying_disruption\":{\"default\":-"
535 "1,\"tooltip\":\"Fixed length of disrupted "
536 "cycle\",\"doc\":\"When a dormant cycle is disrupted, "
537 "this is length of the offline period instead of "
538 "dormant_buying_val. Required for "
539 "FixedWithDisruption dormant_buying_frequency_type\""
540 ",\"uitype\":\"range\",\"range\":[0,2147483647],\"type\":\"i"
541 "nt\",\"index\":26,\"shape\":[-"
542 "1],\"alias\":\"dormant_buying_disruption\",\"uilabel\":\""
543 "dormant_buying_disruption\"},\"buying_size_type\":{\"d"
544 "efault\":\"Fixed\",\"tooltip\":\"Type of behavior used "
545 "to determine size of buy request\",\"doc\":\"Behavior "
546 "function used to determine the size of requests "
547 "made. All values are a fraction of maximum "
548 "capacity, determined by the throughput and "
549 "capacity remaining. Options: Fixed, Uniform, "
550 "Normal. Fixed is default behavior. Uniform "
551 "requires buying_size_min and buying_size_max. "
552 "Normal requires buying_size_mean and "
553 "buying_size_stddev, optional buying_size_min and b"
554 "uying_size_max.\",\"uitype\":\"combobox\",\"categorical\""
555 ":[\"Fixed\",\"Uniform\",\"Normal\"],\"uilabel\":\"Buying "
556 "Size Type\",\"type\":\"std::string\",\"index\":27,\"shape\""
557 ":[-"
558 "1],\"alias\":\"buying_size_type\"},\"buying_size_val\":{"
559 "\"default\":1.0,\"tooltip\":\"Fixed buying "
560 "size\",\"doc\":\"The size of the buy request as a "
561 "fraction of maximum capacity. Optional for Fixed "
562 "buying_size_type. Must be greater than or equal to"
563 " 0.0\",\"uitype\":\"range\",\"range\":[0.0,1.0],\"uilabel\""
564 ":\"Buying Size Value\",\"type\":\"double\",\"index\":28,\"s"
565 "hape\":[-"
566 "1],\"alias\":\"buying_size_val\"},\"buying_size_min\":{\""
567 "default\":-1.0,\"tooltip\":\"Buying size distribution "
568 "minimum\",\"doc\":\"The minimum size of the buy "
569 "request as a fraction of maximum capacity. "
570 "Required for Uniform and optional for Normal "
571 "buying_size_type. Must be greater than or equal to"
572 " zero.\",\"uitype\":\"range\",\"range\":[0.0,1.0],\"uilabe"
573 "l\":\"Buying Size Minimum\",\"type\":\"double\",\"index\":2"
574 "9,\"shape\":[-"
575 "1],\"alias\":\"buying_size_min\"},\"buying_size_max\":{\""
576 "default\":-1.0,\"tooltip\":\"Buying size distribution "
577 "maximum\",\"doc\":\"The maximum size of the buy "
578 "request as a fraction of maximum capacity. "
579 "Required for Uniform buying_size_type, optional "
580 "for Normal. Must be greater than or equal to "
581 "buying_size_min \",\"uitype\":\"range\",\"range\":[0.0,1."
582 "0],\"uilabel\":\"Buying Size Maximum\",\"type\":\"double\""
583 ",\"index\":30,\"shape\":[-"
584 "1],\"alias\":\"buying_size_max\"},\"buying_size_mean\":{"
585 "\"default\":-1.0,\"tooltip\":\"Buying size distribution"
586 " mean\",\"doc\":\"The mean size of the buy request as "
587 "a fraction of maximum capacity. Required for "
588 "Normal buying_size_type.\",\"uitype\":\"range\",\"range\""
589 ":[0.0,1.0],\"uilabel\":\"Buying Size Mean\",\"type\":\"do"
590 "uble\",\"index\":31,\"shape\":[-"
591 "1],\"alias\":\"buying_size_mean\"},\"buying_size_stddev"
592 "\":{\"default\":-1.0,\"tooltip\":\"Buying size "
593 "distribution standard deviation\",\"doc\":\"The "
594 "standard deviation of the size of the buy request "
595 "as a fraction of maximum capacity. Required for "
596 "Normal buying_size_type.\",\"uitype\":\"range\",\"range\""
597 ":[0.0,1.0],\"uilabel\":\"Buying Size Standard Deviati"
598 "on\",\"type\":\"double\",\"index\":32,\"shape\":[-"
599 "1],\"alias\":\"buying_size_stddev\"},\"reorder_point\":{"
600 "\"default\":-1,\"tooltip\":\"Reorder point\",\"doc\":\"The "
601 "point at which the facility will request more "
602 "material. Above this point, no request will be "
603 "made. Must be less than max_inv_size.If paired "
604 "with reorder_quantity, this agent will have an "
605 "(R,Q) inventory policy. If reorder_point is used "
606 "alone, this agent will have an (s,S) inventory "
607 "policy, with S (the maximum) being set at "
608 "max_inv_size.\",\"uilabel\":\"Reorder Point\",\"type\":\"d"
609 "ouble\",\"index\":33,\"shape\":[-"
610 "1],\"alias\":\"reorder_point\"},\"reorder_quantity\":{\"d"
611 "efault\":-1,\"tooltip\":\"Reorder amount (R,Q "
612 "inventory policy)\",\"doc\":\"The amount of material "
613 "that will be requested when the reorder point is "
614 "reached. Exclusive request, so will demand exactly"
615 " reorder_quantity.Reorder_point + reorder_quantity"
616 " must be less than "
617 "max_inv_size.\",\"uilabel\":\"Reorder Quantity\",\"type\""
618 ":\"double\",\"index\":34,\"shape\":[-"
619 "1],\"alias\":\"reorder_quantity\"},\"cumulative_cap\":{\""
620 "default\":-1,\"tooltip\":\"Total amount of material "
621 "that can be recieved per cycle.\",\"doc\":\"After "
622 "receiving this much material cumulatively, the "
623 "agent will go dormant. Must be paired with "
624 "dormant_buying_frequency_type and any other "
625 "dormant parameters. The per-time step demand is "
626 "unchanged except the cycle cap is almost "
627 "reached.\",\"uilabel\":\"Cumulative Cap\",\"type\":\"doubl"
628 "e\",\"index\":35,\"shape\":[-"
629 "1],\"alias\":\"cumulative_cap\"},\"package\":{\"default\":"
630 "\"unpackaged\",\"tooltip\":\"Output "
631 "package\",\"doc\":\"Outgoing material will be packaged"
632 " when trading.\",\"uitype\":\"package\",\"uilabel\":\"Pack"
633 "age\",\"type\":\"std::string\",\"index\":36,\"shape\":[-"
634 "1],\"alias\":\"package\"},\"transport_unit\":{\"default\":"
635 "\"unrestricted\",\"tooltip\":\"Output transport "
636 "unit\",\"doc\":\"Outgoing material, after packaging, "
637 "will be further restricted by transport unit when "
638 "trading.\",\"uitype\":\"transportunit\",\"uilabel\":\"Tran"
639 "sport Unit\",\"type\":\"std::string\",\"index\":37,\"shape"
640 "\":[-"
641 "1],\"alias\":\"transport_unit\"},\"inventory\":{\"tooltip"
642 "\":\"Incoming material buffer\",\"type\":[\"cyclus::tool"
643 "kit::ResBuf\",\"cyclus::Material\"],\"index\":38,\"shape"
644 "\":[-1,-1]},\"stocks\":{\"tooltip\":\"Output material bu"
645 "ffer\",\"type\":[\"cyclus::toolkit::ResBuf\",\"cyclus::M"
646 "aterial\"],\"index\":39,\"shape\":[-1,-"
647 "1]},\"ready\":{\"tooltip\":\"Buffer for material held "
648 "for required residence_time\",\"type\":[\"cyclus::tool"
649 "kit::ResBuf\",\"cyclus::Material\"],\"index\":40,\"shape"
650 "\":[-1,-1]},\"processing\":{\"tooltip\":\"Buffer for "
651 "material still waiting for required residence_time"
652 "\",\"type\":[\"cyclus::toolkit::ResBuf\",\"cyclus::Mater"
653 "ial\"],\"index\":41,\"shape\":[-1,-"
654 "1]},\"inventory_tracker\":{\"tooltip\":\"Total "
655 "Inventory Tracker to restrict maximum agent invent"
656 "ory\",\"type\":\"cyclus::toolkit::TotalInvTracker\",\"in"
657 "dex\":42,\"shape\":[-"
658 "1],\"alias\":\"inventory_tracker\",\"uilabel\":\"inventor"
659 "y_tracker\"},\"latitude\":{\"default\":0.0,\"uilabel\":\"G"
660 "eographical latitude in degrees as a "
661 "double\",\"doc\":\"Latitude of the agent's "
662 "geographical position. The value should be "
663 "expressed in degrees as a double.\",\"type\":\"double\""
664 ",\"index\":43,\"shape\":[-"
665 "1],\"alias\":\"latitude\",\"tooltip\":\"latitude\"},\"longi"
666 "tude\":{\"default\":0.0,\"uilabel\":\"Geographical "
667 "longitude in degrees as a double\",\"doc\":\"Longitude"
668 " of the agent's geographical position. The value "
669 "should be expressed in degrees as a double.\",\"type"
670 "\":\"double\",\"index\":44,\"shape\":[-"
671 "1],\"alias\":\"longitude\",\"tooltip\":\"longitude\"}},\"do"
672 "c\":\"Storage is a simple facility which accepts any"
673 " number of commodities and holds them for a user "
674 "specified amount of time. The commodities accepted"
675 " are chosen based on the specified preferences "
676 "list. Once the desired amount of material has "
677 "entered the facility it is passed into a "
678 "'processing' buffer where it is held until the "
679 "residence time has passed. The material is then "
680 "passed into a 'ready' buffer where it is queued "
681 "for removal. Currently, all input commodities are "
682 "lumped into a single output commodity. Storage "
683 "also has the functionality to handle materials in "
684 "discrete or continuous batches. Discrete mode, "
685 "which is the default, does not split or combine "
686 "material batches. Continuous mode, however, "
687 "divides material batches if necessary in order to "
688 "push materials through the facility as quickly as "
689 "possible.\"}", root);
690 if (!parsed_ok) {
691 throw cyclus::ValueError("failed to parse annotations for cycamore::Storage.");
692 }
693 return root;
694};
695#line 23 "/cycamore/src/storage.cc"
696
697void Storage::InitInv(cyclus::Inventories& inv) {
698 inventory.Push(inv["inventory"]);
699 stocks.Push(inv["stocks"]);
700 ready.Push(inv["ready"]);
701 processing.Push(inv["processing"]);
702 ;
703
704};
705#line 25 "/cycamore/src/storage.cc"
706
707cyclus::Inventories Storage::SnapshotInv() {
708 cyclus::Inventories invs;
709 invs["inventory"] = inventory.PopNRes(inventory.count());
710 inventory.Push(invs["inventory"]);
711 invs["stocks"] = stocks.PopNRes(stocks.count());
712 stocks.Push(invs["stocks"]);
713 invs["ready"] = ready.PopNRes(ready.count());
714 ready.Push(invs["ready"]);
715 invs["processing"] = processing.PopNRes(processing.count());
716 processing.Push(invs["processing"]);
717 ;
718 return invs;
719};
720#line 27 "/cycamore/src/storage.cc"
721
722void Storage::InfileToDb(cyclus::InfileTree* tree, cyclus::DbInit di) {
723 cyclus::Facility::InfileToDb(tree, di);
724 int rawcycpp_shape_in_commods[2] = {-1, -1};
725 cycpp_shape_in_commods = std::vector<int>(rawcycpp_shape_in_commods, rawcycpp_shape_in_commods + 2);
726 int rawcycpp_shape_in_commod_prefs[2] = {-1, -1};
727 cycpp_shape_in_commod_prefs = std::vector<int>(rawcycpp_shape_in_commod_prefs, rawcycpp_shape_in_commod_prefs + 2);
728 int rawcycpp_shape_out_commods[2] = {-1, -1};
729 cycpp_shape_out_commods = std::vector<int>(rawcycpp_shape_out_commods, rawcycpp_shape_out_commods + 2);
730 int rawcycpp_shape_in_recipe[1] = {-1};
731 cycpp_shape_in_recipe = std::vector<int>(rawcycpp_shape_in_recipe, rawcycpp_shape_in_recipe + 1);
732 int rawcycpp_shape_residence_time[1] = {-1};
733 cycpp_shape_residence_time = std::vector<int>(rawcycpp_shape_residence_time, rawcycpp_shape_residence_time + 1);
734 int rawcycpp_shape_sell_quantity[1] = {-1};
735 cycpp_shape_sell_quantity = std::vector<int>(rawcycpp_shape_sell_quantity, rawcycpp_shape_sell_quantity + 1);
736 int rawcycpp_shape_throughput[1] = {-1};
737 cycpp_shape_throughput = std::vector<int>(rawcycpp_shape_throughput, rawcycpp_shape_throughput + 1);
738 int rawcycpp_shape_max_inv_size[1] = {-1};
739 cycpp_shape_max_inv_size = std::vector<int>(rawcycpp_shape_max_inv_size, rawcycpp_shape_max_inv_size + 1);
740 int rawcycpp_shape_discrete_handling[1] = {-1};
741 cycpp_shape_discrete_handling = std::vector<int>(rawcycpp_shape_discrete_handling, rawcycpp_shape_discrete_handling + 1);
742 int rawcycpp_shape_active_buying_frequency_type[1] = {-1};
743 cycpp_shape_active_buying_frequency_type = std::vector<int>(rawcycpp_shape_active_buying_frequency_type, rawcycpp_shape_active_buying_frequency_type + 1);
744 int rawcycpp_shape_active_buying_val[1] = {-1};
745 cycpp_shape_active_buying_val = std::vector<int>(rawcycpp_shape_active_buying_val, rawcycpp_shape_active_buying_val + 1);
746 int rawcycpp_shape_active_buying_min[1] = {-1};
747 cycpp_shape_active_buying_min = std::vector<int>(rawcycpp_shape_active_buying_min, rawcycpp_shape_active_buying_min + 1);
748 int rawcycpp_shape_active_buying_max[1] = {-1};
749 cycpp_shape_active_buying_max = std::vector<int>(rawcycpp_shape_active_buying_max, rawcycpp_shape_active_buying_max + 1);
750 int rawcycpp_shape_active_buying_mean[1] = {-1};
751 cycpp_shape_active_buying_mean = std::vector<int>(rawcycpp_shape_active_buying_mean, rawcycpp_shape_active_buying_mean + 1);
752 int rawcycpp_shape_active_buying_stddev[1] = {-1};
753 cycpp_shape_active_buying_stddev = std::vector<int>(rawcycpp_shape_active_buying_stddev, rawcycpp_shape_active_buying_stddev + 1);
754 int rawcycpp_shape_active_buying_end_probability[1] = {-1};
755 cycpp_shape_active_buying_end_probability = std::vector<int>(rawcycpp_shape_active_buying_end_probability, rawcycpp_shape_active_buying_end_probability + 1);
756 int rawcycpp_shape_active_buying_disruption_probability[1] = {-1};
757 cycpp_shape_active_buying_disruption_probability = std::vector<int>(rawcycpp_shape_active_buying_disruption_probability, rawcycpp_shape_active_buying_disruption_probability + 1);
758 int rawcycpp_shape_active_buying_disruption[1] = {-1};
759 cycpp_shape_active_buying_disruption = std::vector<int>(rawcycpp_shape_active_buying_disruption, rawcycpp_shape_active_buying_disruption + 1);
760 int rawcycpp_shape_dormant_buying_frequency_type[1] = {-1};
761 cycpp_shape_dormant_buying_frequency_type = std::vector<int>(rawcycpp_shape_dormant_buying_frequency_type, rawcycpp_shape_dormant_buying_frequency_type + 1);
762 int rawcycpp_shape_dormant_buying_val[1] = {-1};
763 cycpp_shape_dormant_buying_val = std::vector<int>(rawcycpp_shape_dormant_buying_val, rawcycpp_shape_dormant_buying_val + 1);
764 int rawcycpp_shape_dormant_buying_min[1] = {-1};
765 cycpp_shape_dormant_buying_min = std::vector<int>(rawcycpp_shape_dormant_buying_min, rawcycpp_shape_dormant_buying_min + 1);
766 int rawcycpp_shape_dormant_buying_max[1] = {-1};
767 cycpp_shape_dormant_buying_max = std::vector<int>(rawcycpp_shape_dormant_buying_max, rawcycpp_shape_dormant_buying_max + 1);
768 int rawcycpp_shape_dormant_buying_mean[1] = {-1};
769 cycpp_shape_dormant_buying_mean = std::vector<int>(rawcycpp_shape_dormant_buying_mean, rawcycpp_shape_dormant_buying_mean + 1);
770 int rawcycpp_shape_dormant_buying_stddev[1] = {-1};
771 cycpp_shape_dormant_buying_stddev = std::vector<int>(rawcycpp_shape_dormant_buying_stddev, rawcycpp_shape_dormant_buying_stddev + 1);
772 int rawcycpp_shape_dormant_buying_end_probability[1] = {-1};
773 cycpp_shape_dormant_buying_end_probability = std::vector<int>(rawcycpp_shape_dormant_buying_end_probability, rawcycpp_shape_dormant_buying_end_probability + 1);
774 int rawcycpp_shape_dormant_buying_disruption_probability[1] = {-1};
775 cycpp_shape_dormant_buying_disruption_probability = std::vector<int>(rawcycpp_shape_dormant_buying_disruption_probability, rawcycpp_shape_dormant_buying_disruption_probability + 1);
776 int rawcycpp_shape_dormant_buying_disruption[1] = {-1};
777 cycpp_shape_dormant_buying_disruption = std::vector<int>(rawcycpp_shape_dormant_buying_disruption, rawcycpp_shape_dormant_buying_disruption + 1);
778 int rawcycpp_shape_buying_size_type[1] = {-1};
779 cycpp_shape_buying_size_type = std::vector<int>(rawcycpp_shape_buying_size_type, rawcycpp_shape_buying_size_type + 1);
780 int rawcycpp_shape_buying_size_val[1] = {-1};
781 cycpp_shape_buying_size_val = std::vector<int>(rawcycpp_shape_buying_size_val, rawcycpp_shape_buying_size_val + 1);
782 int rawcycpp_shape_buying_size_min[1] = {-1};
783 cycpp_shape_buying_size_min = std::vector<int>(rawcycpp_shape_buying_size_min, rawcycpp_shape_buying_size_min + 1);
784 int rawcycpp_shape_buying_size_max[1] = {-1};
785 cycpp_shape_buying_size_max = std::vector<int>(rawcycpp_shape_buying_size_max, rawcycpp_shape_buying_size_max + 1);
786 int rawcycpp_shape_buying_size_mean[1] = {-1};
787 cycpp_shape_buying_size_mean = std::vector<int>(rawcycpp_shape_buying_size_mean, rawcycpp_shape_buying_size_mean + 1);
788 int rawcycpp_shape_buying_size_stddev[1] = {-1};
789 cycpp_shape_buying_size_stddev = std::vector<int>(rawcycpp_shape_buying_size_stddev, rawcycpp_shape_buying_size_stddev + 1);
790 int rawcycpp_shape_reorder_point[1] = {-1};
791 cycpp_shape_reorder_point = std::vector<int>(rawcycpp_shape_reorder_point, rawcycpp_shape_reorder_point + 1);
792 int rawcycpp_shape_reorder_quantity[1] = {-1};
793 cycpp_shape_reorder_quantity = std::vector<int>(rawcycpp_shape_reorder_quantity, rawcycpp_shape_reorder_quantity + 1);
794 int rawcycpp_shape_cumulative_cap[1] = {-1};
795 cycpp_shape_cumulative_cap = std::vector<int>(rawcycpp_shape_cumulative_cap, rawcycpp_shape_cumulative_cap + 1);
796 int rawcycpp_shape_package[1] = {-1};
797 cycpp_shape_package = std::vector<int>(rawcycpp_shape_package, rawcycpp_shape_package + 1);
798 int rawcycpp_shape_transport_unit[1] = {-1};
799 cycpp_shape_transport_unit = std::vector<int>(rawcycpp_shape_transport_unit, rawcycpp_shape_transport_unit + 1);
800 int rawcycpp_shape_inventory[2] = {-1, -1};
801 cycpp_shape_inventory = std::vector<int>(rawcycpp_shape_inventory, rawcycpp_shape_inventory + 2);
802 int rawcycpp_shape_stocks[2] = {-1, -1};
803 cycpp_shape_stocks = std::vector<int>(rawcycpp_shape_stocks, rawcycpp_shape_stocks + 2);
804 int rawcycpp_shape_ready[2] = {-1, -1};
805 cycpp_shape_ready = std::vector<int>(rawcycpp_shape_ready, rawcycpp_shape_ready + 2);
806 int rawcycpp_shape_processing[2] = {-1, -1};
807 cycpp_shape_processing = std::vector<int>(rawcycpp_shape_processing, rawcycpp_shape_processing + 2);
808 int rawcycpp_shape_inventory_tracker[1] = {-1};
809 cycpp_shape_inventory_tracker = std::vector<int>(rawcycpp_shape_inventory_tracker, rawcycpp_shape_inventory_tracker + 1);
810 int rawcycpp_shape_latitude[1] = {-1};
811 cycpp_shape_latitude = std::vector<int>(rawcycpp_shape_latitude, rawcycpp_shape_latitude + 1);
812 int rawcycpp_shape_longitude[1] = {-1};
813 cycpp_shape_longitude = std::vector<int>(rawcycpp_shape_longitude, rawcycpp_shape_longitude + 1);
814 cyclus::InfileTree* sub = tree->SubTree("config/*");
815 int i;
816 int n;
817 {
818 cyclus::InfileTree* bub = sub->SubTree("in_commods", 0);
819 cyclus::InfileTree* sub = bub;
820 int n1 = sub->NMatches("val");
821 std::vector< std::string > in_commods_val;
822 in_commods_val.resize(n1);
823 for (int i1 = 0; i1 < n1; ++i1) {
824 std::string elem;
825 {
826 std::string elem_in = cyclus::Query<std::string>(sub, "val", i1);
827 elem = elem_in;
828 }
829 in_commods_val[i1] = elem;
830 }
831 in_commods = in_commods_val;
832 }
833 if (sub->NMatches("in_commod_prefs") > 0) {
834 {
835 cyclus::InfileTree* bub = sub->SubTree("in_commod_prefs", 0);
836 cyclus::InfileTree* sub = bub;
837 int n1 = sub->NMatches("val");
838 std::vector< double > in_commod_prefs_val;
839 in_commod_prefs_val.resize(n1);
840 for (int i1 = 0; i1 < n1; ++i1) {
841 double elem;
842 {
843 double elem_in = cyclus::Query<double>(sub, "val", i1);
844 elem = elem_in;
845 }
846 in_commod_prefs_val[i1] = elem;
847 }
848 in_commod_prefs = in_commod_prefs_val;
849 }
850 } else {
851 std::vector< double > in_commod_prefs_tmp;
852 in_commod_prefs_tmp.resize(0);
853 {
854 }
855 in_commod_prefs = in_commod_prefs_tmp;
856 }
857 {
858 cyclus::InfileTree* bub = sub->SubTree("out_commods", 0);
859 cyclus::InfileTree* sub = bub;
860 int n1 = sub->NMatches("val");
861 std::vector< std::string > out_commods_val;
862 out_commods_val.resize(n1);
863 for (int i1 = 0; i1 < n1; ++i1) {
864 std::string elem;
865 {
866 std::string elem_in = cyclus::Query<std::string>(sub, "val", i1);
867 elem = elem_in;
868 }
869 out_commods_val[i1] = elem;
870 }
871 out_commods = out_commods_val;
872 }
873 if (sub->NMatches("in_recipe") > 0) {
874 {
875 std::string in_recipe_val = cyclus::Query<std::string>(sub, "in_recipe");
876 in_recipe = in_recipe_val;
877 }
878 } else {
879 std::string in_recipe_tmp("");
880 in_recipe = in_recipe_tmp;
881 }
882 if (sub->NMatches("residence_time") > 0) {
883 {
884 int residence_time_val = cyclus::Query<int>(sub, "residence_time");
885 residence_time = residence_time_val;
886 }
887 } else {
888 int residence_time_tmp = 0;
889 residence_time = residence_time_tmp;
890 }
891 if (sub->NMatches("sell_quantity") > 0) {
892 {
893 double sell_quantity_val = cyclus::Query<double>(sub, "sell_quantity");
894 sell_quantity = sell_quantity_val;
895 }
896 } else {
897 double sell_quantity_tmp = 0;
898 sell_quantity = sell_quantity_tmp;
899 }
900 if (sub->NMatches("throughput") > 0) {
901 {
902 double throughput_val = cyclus::Query<double>(sub, "throughput");
903 throughput = throughput_val;
904 }
905 } else {
906 double throughput_tmp = 1e+299;
907 throughput = throughput_tmp;
908 }
909 if (sub->NMatches("max_inv_size") > 0) {
910 {
911 double max_inv_size_val = cyclus::Query<double>(sub, "max_inv_size");
912 max_inv_size = max_inv_size_val;
913 }
914 } else {
915 double max_inv_size_tmp = 1e+299;
916 max_inv_size = max_inv_size_tmp;
917 }
918 if (sub->NMatches("discrete_handling") > 0) {
919 {
920 bool discrete_handling_val = cyclus::Query<bool>(sub, "discrete_handling");
921 discrete_handling = discrete_handling_val;
922 }
923 } else {
924 bool discrete_handling_tmp = false;
925 discrete_handling = discrete_handling_tmp;
926 }
927 if (sub->NMatches("active_buying_frequency_type") > 0) {
928 {
929 std::string active_buying_frequency_type_val = cyclus::Query<std::string>(sub, "active_buying_frequency_type");
930 active_buying_frequency_type = active_buying_frequency_type_val;
931 }
932 } else {
933 std::string active_buying_frequency_type_tmp("Fixed");
934 active_buying_frequency_type = active_buying_frequency_type_tmp;
935 }
936 if (sub->NMatches("active_buying_val") > 0) {
937 {
938 int active_buying_val_val = cyclus::Query<int>(sub, "active_buying_val");
939 active_buying_val = active_buying_val_val;
940 }
941 } else {
942 int active_buying_val_tmp = -1;
943 active_buying_val = active_buying_val_tmp;
944 }
945 if (sub->NMatches("active_buying_min") > 0) {
946 {
947 int active_buying_min_val = cyclus::Query<int>(sub, "active_buying_min");
948 active_buying_min = active_buying_min_val;
949 }
950 } else {
951 int active_buying_min_tmp = -1;
952 active_buying_min = active_buying_min_tmp;
953 }
954 if (sub->NMatches("active_buying_max") > 0) {
955 {
956 int active_buying_max_val = cyclus::Query<int>(sub, "active_buying_max");
957 active_buying_max = active_buying_max_val;
958 }
959 } else {
960 int active_buying_max_tmp = -1;
961 active_buying_max = active_buying_max_tmp;
962 }
963 if (sub->NMatches("active_buying_mean") > 0) {
964 {
965 double active_buying_mean_val = cyclus::Query<double>(sub, "active_buying_mean");
966 active_buying_mean = active_buying_mean_val;
967 }
968 } else {
969 double active_buying_mean_tmp = -1;
970 active_buying_mean = active_buying_mean_tmp;
971 }
972 if (sub->NMatches("active_buying_stddev") > 0) {
973 {
974 double active_buying_stddev_val = cyclus::Query<double>(sub, "active_buying_stddev");
975 active_buying_stddev = active_buying_stddev_val;
976 }
977 } else {
978 double active_buying_stddev_tmp = -1;
979 active_buying_stddev = active_buying_stddev_tmp;
980 }
981 if (sub->NMatches("active_buying_end_probability") > 0) {
982 {
983 double active_buying_end_probability_val = cyclus::Query<double>(sub, "active_buying_end_probability");
984 active_buying_end_probability = active_buying_end_probability_val;
985 }
986 } else {
987 double active_buying_end_probability_tmp = 0;
988 active_buying_end_probability = active_buying_end_probability_tmp;
989 }
990 if (sub->NMatches("active_buying_disruption_probability") > 0) {
991 {
992 double active_buying_disruption_probability_val = cyclus::Query<double>(sub, "active_buying_disruption_probability");
993 active_buying_disruption_probability = active_buying_disruption_probability_val;
994 }
995 } else {
996 double active_buying_disruption_probability_tmp = 0;
997 active_buying_disruption_probability = active_buying_disruption_probability_tmp;
998 }
999 if (sub->NMatches("active_buying_disruption") > 0) {
1000 {
1001 int active_buying_disruption_val = cyclus::Query<int>(sub, "active_buying_disruption");
1002 active_buying_disruption = active_buying_disruption_val;
1003 }
1004 } else {
1005 int active_buying_disruption_tmp = -1;
1006 active_buying_disruption = active_buying_disruption_tmp;
1007 }
1008 if (sub->NMatches("dormant_buying_frequency_type") > 0) {
1009 {
1010 std::string dormant_buying_frequency_type_val = cyclus::Query<std::string>(sub, "dormant_buying_frequency_type");
1011 dormant_buying_frequency_type = dormant_buying_frequency_type_val;
1012 }
1013 } else {
1014 std::string dormant_buying_frequency_type_tmp("Fixed");
1015 dormant_buying_frequency_type = dormant_buying_frequency_type_tmp;
1016 }
1017 if (sub->NMatches("dormant_buying_val") > 0) {
1018 {
1019 int dormant_buying_val_val = cyclus::Query<int>(sub, "dormant_buying_val");
1020 dormant_buying_val = dormant_buying_val_val;
1021 }
1022 } else {
1023 int dormant_buying_val_tmp = -1;
1024 dormant_buying_val = dormant_buying_val_tmp;
1025 }
1026 if (sub->NMatches("dormant_buying_min") > 0) {
1027 {
1028 int dormant_buying_min_val = cyclus::Query<int>(sub, "dormant_buying_min");
1029 dormant_buying_min = dormant_buying_min_val;
1030 }
1031 } else {
1032 int dormant_buying_min_tmp = -1;
1033 dormant_buying_min = dormant_buying_min_tmp;
1034 }
1035 if (sub->NMatches("dormant_buying_max") > 0) {
1036 {
1037 int dormant_buying_max_val = cyclus::Query<int>(sub, "dormant_buying_max");
1038 dormant_buying_max = dormant_buying_max_val;
1039 }
1040 } else {
1041 int dormant_buying_max_tmp = -1;
1042 dormant_buying_max = dormant_buying_max_tmp;
1043 }
1044 if (sub->NMatches("dormant_buying_mean") > 0) {
1045 {
1046 double dormant_buying_mean_val = cyclus::Query<double>(sub, "dormant_buying_mean");
1047 dormant_buying_mean = dormant_buying_mean_val;
1048 }
1049 } else {
1050 double dormant_buying_mean_tmp = -1;
1051 dormant_buying_mean = dormant_buying_mean_tmp;
1052 }
1053 if (sub->NMatches("dormant_buying_stddev") > 0) {
1054 {
1055 double dormant_buying_stddev_val = cyclus::Query<double>(sub, "dormant_buying_stddev");
1056 dormant_buying_stddev = dormant_buying_stddev_val;
1057 }
1058 } else {
1059 double dormant_buying_stddev_tmp = -1;
1060 dormant_buying_stddev = dormant_buying_stddev_tmp;
1061 }
1062 if (sub->NMatches("dormant_buying_end_probability") > 0) {
1063 {
1064 double dormant_buying_end_probability_val = cyclus::Query<double>(sub, "dormant_buying_end_probability");
1065 dormant_buying_end_probability = dormant_buying_end_probability_val;
1066 }
1067 } else {
1068 double dormant_buying_end_probability_tmp = 0;
1069 dormant_buying_end_probability = dormant_buying_end_probability_tmp;
1070 }
1071 if (sub->NMatches("dormant_buying_disruption_probability") > 0) {
1072 {
1073 double dormant_buying_disruption_probability_val = cyclus::Query<double>(sub, "dormant_buying_disruption_probability");
1074 dormant_buying_disruption_probability = dormant_buying_disruption_probability_val;
1075 }
1076 } else {
1077 double dormant_buying_disruption_probability_tmp = 0;
1078 dormant_buying_disruption_probability = dormant_buying_disruption_probability_tmp;
1079 }
1080 if (sub->NMatches("dormant_buying_disruption") > 0) {
1081 {
1082 int dormant_buying_disruption_val = cyclus::Query<int>(sub, "dormant_buying_disruption");
1083 dormant_buying_disruption = dormant_buying_disruption_val;
1084 }
1085 } else {
1086 int dormant_buying_disruption_tmp = -1;
1087 dormant_buying_disruption = dormant_buying_disruption_tmp;
1088 }
1089 if (sub->NMatches("buying_size_type") > 0) {
1090 {
1091 std::string buying_size_type_val = cyclus::Query<std::string>(sub, "buying_size_type");
1092 buying_size_type = buying_size_type_val;
1093 }
1094 } else {
1095 std::string buying_size_type_tmp("Fixed");
1096 buying_size_type = buying_size_type_tmp;
1097 }
1098 if (sub->NMatches("buying_size_val") > 0) {
1099 {
1100 double buying_size_val_val = cyclus::Query<double>(sub, "buying_size_val");
1101 buying_size_val = buying_size_val_val;
1102 }
1103 } else {
1104 double buying_size_val_tmp = 1.0;
1105 buying_size_val = buying_size_val_tmp;
1106 }
1107 if (sub->NMatches("buying_size_min") > 0) {
1108 {
1109 double buying_size_min_val = cyclus::Query<double>(sub, "buying_size_min");
1110 buying_size_min = buying_size_min_val;
1111 }
1112 } else {
1113 double buying_size_min_tmp = -1.0;
1114 buying_size_min = buying_size_min_tmp;
1115 }
1116 if (sub->NMatches("buying_size_max") > 0) {
1117 {
1118 double buying_size_max_val = cyclus::Query<double>(sub, "buying_size_max");
1119 buying_size_max = buying_size_max_val;
1120 }
1121 } else {
1122 double buying_size_max_tmp = -1.0;
1123 buying_size_max = buying_size_max_tmp;
1124 }
1125 if (sub->NMatches("buying_size_mean") > 0) {
1126 {
1127 double buying_size_mean_val = cyclus::Query<double>(sub, "buying_size_mean");
1128 buying_size_mean = buying_size_mean_val;
1129 }
1130 } else {
1131 double buying_size_mean_tmp = -1.0;
1132 buying_size_mean = buying_size_mean_tmp;
1133 }
1134 if (sub->NMatches("buying_size_stddev") > 0) {
1135 {
1136 double buying_size_stddev_val = cyclus::Query<double>(sub, "buying_size_stddev");
1137 buying_size_stddev = buying_size_stddev_val;
1138 }
1139 } else {
1140 double buying_size_stddev_tmp = -1.0;
1141 buying_size_stddev = buying_size_stddev_tmp;
1142 }
1143 if (sub->NMatches("reorder_point") > 0) {
1144 {
1145 double reorder_point_val = cyclus::Query<double>(sub, "reorder_point");
1146 reorder_point = reorder_point_val;
1147 }
1148 } else {
1149 double reorder_point_tmp = -1;
1150 reorder_point = reorder_point_tmp;
1151 }
1152 if (sub->NMatches("reorder_quantity") > 0) {
1153 {
1154 double reorder_quantity_val = cyclus::Query<double>(sub, "reorder_quantity");
1155 reorder_quantity = reorder_quantity_val;
1156 }
1157 } else {
1158 double reorder_quantity_tmp = -1;
1159 reorder_quantity = reorder_quantity_tmp;
1160 }
1161 if (sub->NMatches("cumulative_cap") > 0) {
1162 {
1163 double cumulative_cap_val = cyclus::Query<double>(sub, "cumulative_cap");
1164 cumulative_cap = cumulative_cap_val;
1165 }
1166 } else {
1167 double cumulative_cap_tmp = -1;
1168 cumulative_cap = cumulative_cap_tmp;
1169 }
1170 if (sub->NMatches("package") > 0) {
1171 {
1172 std::string package_val = cyclus::Query<std::string>(sub, "package");
1173 package = package_val;
1174 }
1175 } else {
1176 std::string package_tmp("unpackaged");
1177 package = package_tmp;
1178 }
1179 if (sub->NMatches("transport_unit") > 0) {
1180 {
1181 std::string transport_unit_val = cyclus::Query<std::string>(sub, "transport_unit");
1182 transport_unit = transport_unit_val;
1183 }
1184 } else {
1185 std::string transport_unit_tmp("unrestricted");
1186 transport_unit = transport_unit_tmp;
1187 }
1188 if (sub->NMatches("latitude") > 0) {
1189 {
1190 double latitude_val = cyclus::Query<double>(sub, "latitude");
1191 latitude = latitude_val;
1192 }
1193 } else {
1194 double latitude_tmp = 0.0;
1195 latitude = latitude_tmp;
1196 }
1197 if (sub->NMatches("longitude") > 0) {
1198 {
1199 double longitude_val = cyclus::Query<double>(sub, "longitude");
1200 longitude = longitude_val;
1201 }
1202 } else {
1203 double longitude_tmp = 0.0;
1204 longitude = longitude_tmp;
1205 }
1206 di.NewDatum("Info")
1207 ->AddVal("in_commods", in_commods, &cycpp_shape_in_commods)
1208 ->AddVal("in_commod_prefs", in_commod_prefs, &cycpp_shape_in_commod_prefs)
1209 ->AddVal("out_commods", out_commods, &cycpp_shape_out_commods)
1210 ->AddVal("in_recipe", in_recipe, &cycpp_shape_in_recipe)
1211 ->AddVal("residence_time", residence_time, &cycpp_shape_residence_time)
1212 ->AddVal("sell_quantity", sell_quantity, &cycpp_shape_sell_quantity)
1213 ->AddVal("throughput", throughput, &cycpp_shape_throughput)
1214 ->AddVal("max_inv_size", max_inv_size, &cycpp_shape_max_inv_size)
1215 ->AddVal("discrete_handling", discrete_handling, &cycpp_shape_discrete_handling)
1216 ->AddVal("active_buying_frequency_type", active_buying_frequency_type, &cycpp_shape_active_buying_frequency_type)
1217 ->AddVal("active_buying_val", active_buying_val, &cycpp_shape_active_buying_val)
1218 ->AddVal("active_buying_min", active_buying_min, &cycpp_shape_active_buying_min)
1219 ->AddVal("active_buying_max", active_buying_max, &cycpp_shape_active_buying_max)
1220 ->AddVal("active_buying_mean", active_buying_mean, &cycpp_shape_active_buying_mean)
1221 ->AddVal("active_buying_stddev", active_buying_stddev, &cycpp_shape_active_buying_stddev)
1222 ->AddVal("active_buying_end_probability", active_buying_end_probability, &cycpp_shape_active_buying_end_probability)
1223 ->AddVal("active_buying_disruption_probability", active_buying_disruption_probability, &cycpp_shape_active_buying_disruption_probability)
1224 ->AddVal("active_buying_disruption", active_buying_disruption, &cycpp_shape_active_buying_disruption)
1225 ->AddVal("dormant_buying_frequency_type", dormant_buying_frequency_type, &cycpp_shape_dormant_buying_frequency_type)
1226 ->AddVal("dormant_buying_val", dormant_buying_val, &cycpp_shape_dormant_buying_val)
1227 ->AddVal("dormant_buying_min", dormant_buying_min, &cycpp_shape_dormant_buying_min)
1228 ->AddVal("dormant_buying_max", dormant_buying_max, &cycpp_shape_dormant_buying_max)
1229 ->AddVal("dormant_buying_mean", dormant_buying_mean, &cycpp_shape_dormant_buying_mean)
1230 ->AddVal("dormant_buying_stddev", dormant_buying_stddev, &cycpp_shape_dormant_buying_stddev)
1231 ->AddVal("dormant_buying_end_probability", dormant_buying_end_probability, &cycpp_shape_dormant_buying_end_probability)
1232 ->AddVal("dormant_buying_disruption_probability", dormant_buying_disruption_probability, &cycpp_shape_dormant_buying_disruption_probability)
1233 ->AddVal("dormant_buying_disruption", dormant_buying_disruption, &cycpp_shape_dormant_buying_disruption)
1234 ->AddVal("buying_size_type", buying_size_type, &cycpp_shape_buying_size_type)
1235 ->AddVal("buying_size_val", buying_size_val, &cycpp_shape_buying_size_val)
1236 ->AddVal("buying_size_min", buying_size_min, &cycpp_shape_buying_size_min)
1237 ->AddVal("buying_size_max", buying_size_max, &cycpp_shape_buying_size_max)
1238 ->AddVal("buying_size_mean", buying_size_mean, &cycpp_shape_buying_size_mean)
1239 ->AddVal("buying_size_stddev", buying_size_stddev, &cycpp_shape_buying_size_stddev)
1240 ->AddVal("reorder_point", reorder_point, &cycpp_shape_reorder_point)
1241 ->AddVal("reorder_quantity", reorder_quantity, &cycpp_shape_reorder_quantity)
1242 ->AddVal("cumulative_cap", cumulative_cap, &cycpp_shape_cumulative_cap)
1243 ->AddVal("package", package, &cycpp_shape_package)
1244 ->AddVal("transport_unit", transport_unit, &cycpp_shape_transport_unit)
1245 ->AddVal("latitude", latitude, &cycpp_shape_latitude)
1246 ->AddVal("longitude", longitude, &cycpp_shape_longitude)
1247 ->Record();
1248};
1249#line 29 "/cycamore/src/storage.cc"
1250
1251void Storage::Snapshot(cyclus::DbInit di) {
1252 di.NewDatum("Info")
1253 ->AddVal("in_commods", in_commods, &cycpp_shape_in_commods)
1254 ->AddVal("in_commod_prefs", in_commod_prefs, &cycpp_shape_in_commod_prefs)
1255 ->AddVal("out_commods", out_commods, &cycpp_shape_out_commods)
1256 ->AddVal("in_recipe", in_recipe, &cycpp_shape_in_recipe)
1257 ->AddVal("residence_time", residence_time, &cycpp_shape_residence_time)
1258 ->AddVal("sell_quantity", sell_quantity, &cycpp_shape_sell_quantity)
1259 ->AddVal("throughput", throughput, &cycpp_shape_throughput)
1260 ->AddVal("max_inv_size", max_inv_size, &cycpp_shape_max_inv_size)
1261 ->AddVal("discrete_handling", discrete_handling, &cycpp_shape_discrete_handling)
1262 ->AddVal("active_buying_frequency_type", active_buying_frequency_type, &cycpp_shape_active_buying_frequency_type)
1263 ->AddVal("active_buying_val", active_buying_val, &cycpp_shape_active_buying_val)
1264 ->AddVal("active_buying_min", active_buying_min, &cycpp_shape_active_buying_min)
1265 ->AddVal("active_buying_max", active_buying_max, &cycpp_shape_active_buying_max)
1266 ->AddVal("active_buying_mean", active_buying_mean, &cycpp_shape_active_buying_mean)
1267 ->AddVal("active_buying_stddev", active_buying_stddev, &cycpp_shape_active_buying_stddev)
1268 ->AddVal("active_buying_end_probability", active_buying_end_probability, &cycpp_shape_active_buying_end_probability)
1269 ->AddVal("active_buying_disruption_probability", active_buying_disruption_probability, &cycpp_shape_active_buying_disruption_probability)
1270 ->AddVal("active_buying_disruption", active_buying_disruption, &cycpp_shape_active_buying_disruption)
1271 ->AddVal("dormant_buying_frequency_type", dormant_buying_frequency_type, &cycpp_shape_dormant_buying_frequency_type)
1272 ->AddVal("dormant_buying_val", dormant_buying_val, &cycpp_shape_dormant_buying_val)
1273 ->AddVal("dormant_buying_min", dormant_buying_min, &cycpp_shape_dormant_buying_min)
1274 ->AddVal("dormant_buying_max", dormant_buying_max, &cycpp_shape_dormant_buying_max)
1275 ->AddVal("dormant_buying_mean", dormant_buying_mean, &cycpp_shape_dormant_buying_mean)
1276 ->AddVal("dormant_buying_stddev", dormant_buying_stddev, &cycpp_shape_dormant_buying_stddev)
1277 ->AddVal("dormant_buying_end_probability", dormant_buying_end_probability, &cycpp_shape_dormant_buying_end_probability)
1278 ->AddVal("dormant_buying_disruption_probability", dormant_buying_disruption_probability, &cycpp_shape_dormant_buying_disruption_probability)
1279 ->AddVal("dormant_buying_disruption", dormant_buying_disruption, &cycpp_shape_dormant_buying_disruption)
1280 ->AddVal("buying_size_type", buying_size_type, &cycpp_shape_buying_size_type)
1281 ->AddVal("buying_size_val", buying_size_val, &cycpp_shape_buying_size_val)
1282 ->AddVal("buying_size_min", buying_size_min, &cycpp_shape_buying_size_min)
1283 ->AddVal("buying_size_max", buying_size_max, &cycpp_shape_buying_size_max)
1284 ->AddVal("buying_size_mean", buying_size_mean, &cycpp_shape_buying_size_mean)
1285 ->AddVal("buying_size_stddev", buying_size_stddev, &cycpp_shape_buying_size_stddev)
1286 ->AddVal("reorder_point", reorder_point, &cycpp_shape_reorder_point)
1287 ->AddVal("reorder_quantity", reorder_quantity, &cycpp_shape_reorder_quantity)
1288 ->AddVal("cumulative_cap", cumulative_cap, &cycpp_shape_cumulative_cap)
1289 ->AddVal("package", package, &cycpp_shape_package)
1290 ->AddVal("transport_unit", transport_unit, &cycpp_shape_transport_unit)
1291 ->AddVal("latitude", latitude, &cycpp_shape_latitude)
1292 ->AddVal("longitude", longitude, &cycpp_shape_longitude)
1293 ->Record();
1294};
1295#line 31 "/cycamore/src/storage.cc"
1296
1297cyclus::Agent* Storage::Clone() {
1298 cycamore::Storage* m = new cycamore::Storage(context());
1299 m->InitFrom(this);
1300 return m;
1301};
1302#line 33 "/cycamore/src/storage.cc"
1303
1304//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1305void Storage::InitFrom(Storage* m) { cyclus::Facility::InitFrom(m);
1306 int rawcycpp_shape_in_commods[2] = {-1, -1};
1307 cycpp_shape_in_commods = std::vector<int>(rawcycpp_shape_in_commods, rawcycpp_shape_in_commods + 2);
1308 int rawcycpp_shape_in_commod_prefs[2] = {-1, -1};
1309 cycpp_shape_in_commod_prefs = std::vector<int>(rawcycpp_shape_in_commod_prefs, rawcycpp_shape_in_commod_prefs + 2);
1310 int rawcycpp_shape_out_commods[2] = {-1, -1};
1311 cycpp_shape_out_commods = std::vector<int>(rawcycpp_shape_out_commods, rawcycpp_shape_out_commods + 2);
1312 int rawcycpp_shape_in_recipe[1] = {-1};
1313 cycpp_shape_in_recipe = std::vector<int>(rawcycpp_shape_in_recipe, rawcycpp_shape_in_recipe + 1);
1314 int rawcycpp_shape_residence_time[1] = {-1};
1315 cycpp_shape_residence_time = std::vector<int>(rawcycpp_shape_residence_time, rawcycpp_shape_residence_time + 1);
1316 int rawcycpp_shape_sell_quantity[1] = {-1};
1317 cycpp_shape_sell_quantity = std::vector<int>(rawcycpp_shape_sell_quantity, rawcycpp_shape_sell_quantity + 1);
1318 int rawcycpp_shape_throughput[1] = {-1};
1319 cycpp_shape_throughput = std::vector<int>(rawcycpp_shape_throughput, rawcycpp_shape_throughput + 1);
1320 int rawcycpp_shape_max_inv_size[1] = {-1};
1321 cycpp_shape_max_inv_size = std::vector<int>(rawcycpp_shape_max_inv_size, rawcycpp_shape_max_inv_size + 1);
1322 int rawcycpp_shape_discrete_handling[1] = {-1};
1323 cycpp_shape_discrete_handling = std::vector<int>(rawcycpp_shape_discrete_handling, rawcycpp_shape_discrete_handling + 1);
1324 int rawcycpp_shape_active_buying_frequency_type[1] = {-1};
1325 cycpp_shape_active_buying_frequency_type = std::vector<int>(rawcycpp_shape_active_buying_frequency_type, rawcycpp_shape_active_buying_frequency_type + 1);
1326 int rawcycpp_shape_active_buying_val[1] = {-1};
1327 cycpp_shape_active_buying_val = std::vector<int>(rawcycpp_shape_active_buying_val, rawcycpp_shape_active_buying_val + 1);
1328 int rawcycpp_shape_active_buying_min[1] = {-1};
1329 cycpp_shape_active_buying_min = std::vector<int>(rawcycpp_shape_active_buying_min, rawcycpp_shape_active_buying_min + 1);
1330 int rawcycpp_shape_active_buying_max[1] = {-1};
1331 cycpp_shape_active_buying_max = std::vector<int>(rawcycpp_shape_active_buying_max, rawcycpp_shape_active_buying_max + 1);
1332 int rawcycpp_shape_active_buying_mean[1] = {-1};
1333 cycpp_shape_active_buying_mean = std::vector<int>(rawcycpp_shape_active_buying_mean, rawcycpp_shape_active_buying_mean + 1);
1334 int rawcycpp_shape_active_buying_stddev[1] = {-1};
1335 cycpp_shape_active_buying_stddev = std::vector<int>(rawcycpp_shape_active_buying_stddev, rawcycpp_shape_active_buying_stddev + 1);
1336 int rawcycpp_shape_active_buying_end_probability[1] = {-1};
1337 cycpp_shape_active_buying_end_probability = std::vector<int>(rawcycpp_shape_active_buying_end_probability, rawcycpp_shape_active_buying_end_probability + 1);
1338 int rawcycpp_shape_active_buying_disruption_probability[1] = {-1};
1339 cycpp_shape_active_buying_disruption_probability = std::vector<int>(rawcycpp_shape_active_buying_disruption_probability, rawcycpp_shape_active_buying_disruption_probability + 1);
1340 int rawcycpp_shape_active_buying_disruption[1] = {-1};
1341 cycpp_shape_active_buying_disruption = std::vector<int>(rawcycpp_shape_active_buying_disruption, rawcycpp_shape_active_buying_disruption + 1);
1342 int rawcycpp_shape_dormant_buying_frequency_type[1] = {-1};
1343 cycpp_shape_dormant_buying_frequency_type = std::vector<int>(rawcycpp_shape_dormant_buying_frequency_type, rawcycpp_shape_dormant_buying_frequency_type + 1);
1344 int rawcycpp_shape_dormant_buying_val[1] = {-1};
1345 cycpp_shape_dormant_buying_val = std::vector<int>(rawcycpp_shape_dormant_buying_val, rawcycpp_shape_dormant_buying_val + 1);
1346 int rawcycpp_shape_dormant_buying_min[1] = {-1};
1347 cycpp_shape_dormant_buying_min = std::vector<int>(rawcycpp_shape_dormant_buying_min, rawcycpp_shape_dormant_buying_min + 1);
1348 int rawcycpp_shape_dormant_buying_max[1] = {-1};
1349 cycpp_shape_dormant_buying_max = std::vector<int>(rawcycpp_shape_dormant_buying_max, rawcycpp_shape_dormant_buying_max + 1);
1350 int rawcycpp_shape_dormant_buying_mean[1] = {-1};
1351 cycpp_shape_dormant_buying_mean = std::vector<int>(rawcycpp_shape_dormant_buying_mean, rawcycpp_shape_dormant_buying_mean + 1);
1352 int rawcycpp_shape_dormant_buying_stddev[1] = {-1};
1353 cycpp_shape_dormant_buying_stddev = std::vector<int>(rawcycpp_shape_dormant_buying_stddev, rawcycpp_shape_dormant_buying_stddev + 1);
1354 int rawcycpp_shape_dormant_buying_end_probability[1] = {-1};
1355 cycpp_shape_dormant_buying_end_probability = std::vector<int>(rawcycpp_shape_dormant_buying_end_probability, rawcycpp_shape_dormant_buying_end_probability + 1);
1356 int rawcycpp_shape_dormant_buying_disruption_probability[1] = {-1};
1357 cycpp_shape_dormant_buying_disruption_probability = std::vector<int>(rawcycpp_shape_dormant_buying_disruption_probability, rawcycpp_shape_dormant_buying_disruption_probability + 1);
1358 int rawcycpp_shape_dormant_buying_disruption[1] = {-1};
1359 cycpp_shape_dormant_buying_disruption = std::vector<int>(rawcycpp_shape_dormant_buying_disruption, rawcycpp_shape_dormant_buying_disruption + 1);
1360 int rawcycpp_shape_buying_size_type[1] = {-1};
1361 cycpp_shape_buying_size_type = std::vector<int>(rawcycpp_shape_buying_size_type, rawcycpp_shape_buying_size_type + 1);
1362 int rawcycpp_shape_buying_size_val[1] = {-1};
1363 cycpp_shape_buying_size_val = std::vector<int>(rawcycpp_shape_buying_size_val, rawcycpp_shape_buying_size_val + 1);
1364 int rawcycpp_shape_buying_size_min[1] = {-1};
1365 cycpp_shape_buying_size_min = std::vector<int>(rawcycpp_shape_buying_size_min, rawcycpp_shape_buying_size_min + 1);
1366 int rawcycpp_shape_buying_size_max[1] = {-1};
1367 cycpp_shape_buying_size_max = std::vector<int>(rawcycpp_shape_buying_size_max, rawcycpp_shape_buying_size_max + 1);
1368 int rawcycpp_shape_buying_size_mean[1] = {-1};
1369 cycpp_shape_buying_size_mean = std::vector<int>(rawcycpp_shape_buying_size_mean, rawcycpp_shape_buying_size_mean + 1);
1370 int rawcycpp_shape_buying_size_stddev[1] = {-1};
1371 cycpp_shape_buying_size_stddev = std::vector<int>(rawcycpp_shape_buying_size_stddev, rawcycpp_shape_buying_size_stddev + 1);
1372 int rawcycpp_shape_reorder_point[1] = {-1};
1373 cycpp_shape_reorder_point = std::vector<int>(rawcycpp_shape_reorder_point, rawcycpp_shape_reorder_point + 1);
1374 int rawcycpp_shape_reorder_quantity[1] = {-1};
1375 cycpp_shape_reorder_quantity = std::vector<int>(rawcycpp_shape_reorder_quantity, rawcycpp_shape_reorder_quantity + 1);
1376 int rawcycpp_shape_cumulative_cap[1] = {-1};
1377 cycpp_shape_cumulative_cap = std::vector<int>(rawcycpp_shape_cumulative_cap, rawcycpp_shape_cumulative_cap + 1);
1378 int rawcycpp_shape_package[1] = {-1};
1379 cycpp_shape_package = std::vector<int>(rawcycpp_shape_package, rawcycpp_shape_package + 1);
1380 int rawcycpp_shape_transport_unit[1] = {-1};
1381 cycpp_shape_transport_unit = std::vector<int>(rawcycpp_shape_transport_unit, rawcycpp_shape_transport_unit + 1);
1382 int rawcycpp_shape_inventory[2] = {-1, -1};
1383 cycpp_shape_inventory = std::vector<int>(rawcycpp_shape_inventory, rawcycpp_shape_inventory + 2);
1384 int rawcycpp_shape_stocks[2] = {-1, -1};
1385 cycpp_shape_stocks = std::vector<int>(rawcycpp_shape_stocks, rawcycpp_shape_stocks + 2);
1386 int rawcycpp_shape_ready[2] = {-1, -1};
1387 cycpp_shape_ready = std::vector<int>(rawcycpp_shape_ready, rawcycpp_shape_ready + 2);
1388 int rawcycpp_shape_processing[2] = {-1, -1};
1389 cycpp_shape_processing = std::vector<int>(rawcycpp_shape_processing, rawcycpp_shape_processing + 2);
1390 int rawcycpp_shape_inventory_tracker[1] = {-1};
1391 cycpp_shape_inventory_tracker = std::vector<int>(rawcycpp_shape_inventory_tracker, rawcycpp_shape_inventory_tracker + 1);
1392 int rawcycpp_shape_latitude[1] = {-1};
1393 cycpp_shape_latitude = std::vector<int>(rawcycpp_shape_latitude, rawcycpp_shape_latitude + 1);
1394 int rawcycpp_shape_longitude[1] = {-1};
1395 cycpp_shape_longitude = std::vector<int>(rawcycpp_shape_longitude, rawcycpp_shape_longitude + 1);
1399 in_recipe = m->in_recipe;
1432 package = m->package;
1434 latitude = m->latitude;
1435 longitude = m->longitude;
1436 inventory.capacity(m->inventory.capacity());
1437 stocks.capacity(m->stocks.capacity());
1438 ready.capacity(m->ready.capacity());
1439 processing.capacity(m->processing.capacity());
1440 inventory_tracker.capacity();
1441#line 37 "/cycamore/src/storage.cc"
1442 cyclus::toolkit::CommodityProducer::Copy(m);
1443}
1444
1445//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1446void Storage::InitFrom(cyclus::QueryableBackend* b) { cyclus::Facility::InitFrom(b);
1447 int rawcycpp_shape_in_commods[2] = {-1, -1};
1448 cycpp_shape_in_commods = std::vector<int>(rawcycpp_shape_in_commods, rawcycpp_shape_in_commods + 2);
1449 int rawcycpp_shape_in_commod_prefs[2] = {-1, -1};
1450 cycpp_shape_in_commod_prefs = std::vector<int>(rawcycpp_shape_in_commod_prefs, rawcycpp_shape_in_commod_prefs + 2);
1451 int rawcycpp_shape_out_commods[2] = {-1, -1};
1452 cycpp_shape_out_commods = std::vector<int>(rawcycpp_shape_out_commods, rawcycpp_shape_out_commods + 2);
1453 int rawcycpp_shape_in_recipe[1] = {-1};
1454 cycpp_shape_in_recipe = std::vector<int>(rawcycpp_shape_in_recipe, rawcycpp_shape_in_recipe + 1);
1455 int rawcycpp_shape_residence_time[1] = {-1};
1456 cycpp_shape_residence_time = std::vector<int>(rawcycpp_shape_residence_time, rawcycpp_shape_residence_time + 1);
1457 int rawcycpp_shape_sell_quantity[1] = {-1};
1458 cycpp_shape_sell_quantity = std::vector<int>(rawcycpp_shape_sell_quantity, rawcycpp_shape_sell_quantity + 1);
1459 int rawcycpp_shape_throughput[1] = {-1};
1460 cycpp_shape_throughput = std::vector<int>(rawcycpp_shape_throughput, rawcycpp_shape_throughput + 1);
1461 int rawcycpp_shape_max_inv_size[1] = {-1};
1462 cycpp_shape_max_inv_size = std::vector<int>(rawcycpp_shape_max_inv_size, rawcycpp_shape_max_inv_size + 1);
1463 int rawcycpp_shape_discrete_handling[1] = {-1};
1464 cycpp_shape_discrete_handling = std::vector<int>(rawcycpp_shape_discrete_handling, rawcycpp_shape_discrete_handling + 1);
1465 int rawcycpp_shape_active_buying_frequency_type[1] = {-1};
1466 cycpp_shape_active_buying_frequency_type = std::vector<int>(rawcycpp_shape_active_buying_frequency_type, rawcycpp_shape_active_buying_frequency_type + 1);
1467 int rawcycpp_shape_active_buying_val[1] = {-1};
1468 cycpp_shape_active_buying_val = std::vector<int>(rawcycpp_shape_active_buying_val, rawcycpp_shape_active_buying_val + 1);
1469 int rawcycpp_shape_active_buying_min[1] = {-1};
1470 cycpp_shape_active_buying_min = std::vector<int>(rawcycpp_shape_active_buying_min, rawcycpp_shape_active_buying_min + 1);
1471 int rawcycpp_shape_active_buying_max[1] = {-1};
1472 cycpp_shape_active_buying_max = std::vector<int>(rawcycpp_shape_active_buying_max, rawcycpp_shape_active_buying_max + 1);
1473 int rawcycpp_shape_active_buying_mean[1] = {-1};
1474 cycpp_shape_active_buying_mean = std::vector<int>(rawcycpp_shape_active_buying_mean, rawcycpp_shape_active_buying_mean + 1);
1475 int rawcycpp_shape_active_buying_stddev[1] = {-1};
1476 cycpp_shape_active_buying_stddev = std::vector<int>(rawcycpp_shape_active_buying_stddev, rawcycpp_shape_active_buying_stddev + 1);
1477 int rawcycpp_shape_active_buying_end_probability[1] = {-1};
1478 cycpp_shape_active_buying_end_probability = std::vector<int>(rawcycpp_shape_active_buying_end_probability, rawcycpp_shape_active_buying_end_probability + 1);
1479 int rawcycpp_shape_active_buying_disruption_probability[1] = {-1};
1480 cycpp_shape_active_buying_disruption_probability = std::vector<int>(rawcycpp_shape_active_buying_disruption_probability, rawcycpp_shape_active_buying_disruption_probability + 1);
1481 int rawcycpp_shape_active_buying_disruption[1] = {-1};
1482 cycpp_shape_active_buying_disruption = std::vector<int>(rawcycpp_shape_active_buying_disruption, rawcycpp_shape_active_buying_disruption + 1);
1483 int rawcycpp_shape_dormant_buying_frequency_type[1] = {-1};
1484 cycpp_shape_dormant_buying_frequency_type = std::vector<int>(rawcycpp_shape_dormant_buying_frequency_type, rawcycpp_shape_dormant_buying_frequency_type + 1);
1485 int rawcycpp_shape_dormant_buying_val[1] = {-1};
1486 cycpp_shape_dormant_buying_val = std::vector<int>(rawcycpp_shape_dormant_buying_val, rawcycpp_shape_dormant_buying_val + 1);
1487 int rawcycpp_shape_dormant_buying_min[1] = {-1};
1488 cycpp_shape_dormant_buying_min = std::vector<int>(rawcycpp_shape_dormant_buying_min, rawcycpp_shape_dormant_buying_min + 1);
1489 int rawcycpp_shape_dormant_buying_max[1] = {-1};
1490 cycpp_shape_dormant_buying_max = std::vector<int>(rawcycpp_shape_dormant_buying_max, rawcycpp_shape_dormant_buying_max + 1);
1491 int rawcycpp_shape_dormant_buying_mean[1] = {-1};
1492 cycpp_shape_dormant_buying_mean = std::vector<int>(rawcycpp_shape_dormant_buying_mean, rawcycpp_shape_dormant_buying_mean + 1);
1493 int rawcycpp_shape_dormant_buying_stddev[1] = {-1};
1494 cycpp_shape_dormant_buying_stddev = std::vector<int>(rawcycpp_shape_dormant_buying_stddev, rawcycpp_shape_dormant_buying_stddev + 1);
1495 int rawcycpp_shape_dormant_buying_end_probability[1] = {-1};
1496 cycpp_shape_dormant_buying_end_probability = std::vector<int>(rawcycpp_shape_dormant_buying_end_probability, rawcycpp_shape_dormant_buying_end_probability + 1);
1497 int rawcycpp_shape_dormant_buying_disruption_probability[1] = {-1};
1498 cycpp_shape_dormant_buying_disruption_probability = std::vector<int>(rawcycpp_shape_dormant_buying_disruption_probability, rawcycpp_shape_dormant_buying_disruption_probability + 1);
1499 int rawcycpp_shape_dormant_buying_disruption[1] = {-1};
1500 cycpp_shape_dormant_buying_disruption = std::vector<int>(rawcycpp_shape_dormant_buying_disruption, rawcycpp_shape_dormant_buying_disruption + 1);
1501 int rawcycpp_shape_buying_size_type[1] = {-1};
1502 cycpp_shape_buying_size_type = std::vector<int>(rawcycpp_shape_buying_size_type, rawcycpp_shape_buying_size_type + 1);
1503 int rawcycpp_shape_buying_size_val[1] = {-1};
1504 cycpp_shape_buying_size_val = std::vector<int>(rawcycpp_shape_buying_size_val, rawcycpp_shape_buying_size_val + 1);
1505 int rawcycpp_shape_buying_size_min[1] = {-1};
1506 cycpp_shape_buying_size_min = std::vector<int>(rawcycpp_shape_buying_size_min, rawcycpp_shape_buying_size_min + 1);
1507 int rawcycpp_shape_buying_size_max[1] = {-1};
1508 cycpp_shape_buying_size_max = std::vector<int>(rawcycpp_shape_buying_size_max, rawcycpp_shape_buying_size_max + 1);
1509 int rawcycpp_shape_buying_size_mean[1] = {-1};
1510 cycpp_shape_buying_size_mean = std::vector<int>(rawcycpp_shape_buying_size_mean, rawcycpp_shape_buying_size_mean + 1);
1511 int rawcycpp_shape_buying_size_stddev[1] = {-1};
1512 cycpp_shape_buying_size_stddev = std::vector<int>(rawcycpp_shape_buying_size_stddev, rawcycpp_shape_buying_size_stddev + 1);
1513 int rawcycpp_shape_reorder_point[1] = {-1};
1514 cycpp_shape_reorder_point = std::vector<int>(rawcycpp_shape_reorder_point, rawcycpp_shape_reorder_point + 1);
1515 int rawcycpp_shape_reorder_quantity[1] = {-1};
1516 cycpp_shape_reorder_quantity = std::vector<int>(rawcycpp_shape_reorder_quantity, rawcycpp_shape_reorder_quantity + 1);
1517 int rawcycpp_shape_cumulative_cap[1] = {-1};
1518 cycpp_shape_cumulative_cap = std::vector<int>(rawcycpp_shape_cumulative_cap, rawcycpp_shape_cumulative_cap + 1);
1519 int rawcycpp_shape_package[1] = {-1};
1520 cycpp_shape_package = std::vector<int>(rawcycpp_shape_package, rawcycpp_shape_package + 1);
1521 int rawcycpp_shape_transport_unit[1] = {-1};
1522 cycpp_shape_transport_unit = std::vector<int>(rawcycpp_shape_transport_unit, rawcycpp_shape_transport_unit + 1);
1523 int rawcycpp_shape_inventory[2] = {-1, -1};
1524 cycpp_shape_inventory = std::vector<int>(rawcycpp_shape_inventory, rawcycpp_shape_inventory + 2);
1525 int rawcycpp_shape_stocks[2] = {-1, -1};
1526 cycpp_shape_stocks = std::vector<int>(rawcycpp_shape_stocks, rawcycpp_shape_stocks + 2);
1527 int rawcycpp_shape_ready[2] = {-1, -1};
1528 cycpp_shape_ready = std::vector<int>(rawcycpp_shape_ready, rawcycpp_shape_ready + 2);
1529 int rawcycpp_shape_processing[2] = {-1, -1};
1530 cycpp_shape_processing = std::vector<int>(rawcycpp_shape_processing, rawcycpp_shape_processing + 2);
1531 int rawcycpp_shape_inventory_tracker[1] = {-1};
1532 cycpp_shape_inventory_tracker = std::vector<int>(rawcycpp_shape_inventory_tracker, rawcycpp_shape_inventory_tracker + 1);
1533 int rawcycpp_shape_latitude[1] = {-1};
1534 cycpp_shape_latitude = std::vector<int>(rawcycpp_shape_latitude, rawcycpp_shape_latitude + 1);
1535 int rawcycpp_shape_longitude[1] = {-1};
1536 cycpp_shape_longitude = std::vector<int>(rawcycpp_shape_longitude, rawcycpp_shape_longitude + 1);
1537 cyclus::QueryResult qr = b->Query("Info", NULL);
1538 in_commods = qr.GetVal<std::vector< std::string > >("in_commods");
1539 in_commod_prefs = qr.GetVal<std::vector< double > >("in_commod_prefs");
1540 out_commods = qr.GetVal<std::vector< std::string > >("out_commods");
1541 in_recipe = qr.GetVal<std::string>("in_recipe");
1542 residence_time = qr.GetVal<int>("residence_time");
1543 sell_quantity = qr.GetVal<double>("sell_quantity");
1544 throughput = qr.GetVal<double>("throughput");
1545 max_inv_size = qr.GetVal<double>("max_inv_size");
1546 discrete_handling = qr.GetVal<bool>("discrete_handling");
1547 active_buying_frequency_type = qr.GetVal<std::string>("active_buying_frequency_type");
1548 active_buying_val = qr.GetVal<int>("active_buying_val");
1549 active_buying_min = qr.GetVal<int>("active_buying_min");
1550 active_buying_max = qr.GetVal<int>("active_buying_max");
1551 active_buying_mean = qr.GetVal<double>("active_buying_mean");
1552 active_buying_stddev = qr.GetVal<double>("active_buying_stddev");
1553 active_buying_end_probability = qr.GetVal<double>("active_buying_end_probability");
1554 active_buying_disruption_probability = qr.GetVal<double>("active_buying_disruption_probability");
1555 active_buying_disruption = qr.GetVal<int>("active_buying_disruption");
1556 dormant_buying_frequency_type = qr.GetVal<std::string>("dormant_buying_frequency_type");
1557 dormant_buying_val = qr.GetVal<int>("dormant_buying_val");
1558 dormant_buying_min = qr.GetVal<int>("dormant_buying_min");
1559 dormant_buying_max = qr.GetVal<int>("dormant_buying_max");
1560 dormant_buying_mean = qr.GetVal<double>("dormant_buying_mean");
1561 dormant_buying_stddev = qr.GetVal<double>("dormant_buying_stddev");
1562 dormant_buying_end_probability = qr.GetVal<double>("dormant_buying_end_probability");
1563 dormant_buying_disruption_probability = qr.GetVal<double>("dormant_buying_disruption_probability");
1564 dormant_buying_disruption = qr.GetVal<int>("dormant_buying_disruption");
1565 buying_size_type = qr.GetVal<std::string>("buying_size_type");
1566 buying_size_val = qr.GetVal<double>("buying_size_val");
1567 buying_size_min = qr.GetVal<double>("buying_size_min");
1568 buying_size_max = qr.GetVal<double>("buying_size_max");
1569 buying_size_mean = qr.GetVal<double>("buying_size_mean");
1570 buying_size_stddev = qr.GetVal<double>("buying_size_stddev");
1571 reorder_point = qr.GetVal<double>("reorder_point");
1572 reorder_quantity = qr.GetVal<double>("reorder_quantity");
1573 cumulative_cap = qr.GetVal<double>("cumulative_cap");
1574 package = qr.GetVal<std::string>("package");
1575 transport_unit = qr.GetVal<std::string>("transport_unit");
1576 latitude = qr.GetVal<double>("latitude");
1577 longitude = qr.GetVal<double>("longitude");
1578 inventory.capacity(1e+300);
1579 stocks.capacity(1e+300);
1580 ready.capacity(1e+300);
1581 processing.capacity(1e+300);
1582 inventory_tracker.capacity();
1583#line 43 "/cycamore/src/storage.cc"
1584
1585 cyclus::toolkit::Commodity commod = cyclus::toolkit::Commodity(out_commods.front());
1586 cyclus::toolkit::CommodityProducer::Add(commod);
1587 cyclus::toolkit::CommodityProducer::SetCapacity(commod, throughput);
1588}
1589
1593 throw cyclus::ValueError("Active min larger than max.");
1594 }
1596 throw cyclus::ValueError("Dormant min larger than max.");
1597 }
1599 throw cyclus::ValueError("Buying size min larger than max.");
1600 }
1601
1602 if (active_buying_frequency_type == "Fixed") {
1603 active_dist_ = cyclus::FixedIntDist::Ptr (new cyclus::FixedIntDist(active_buying_val));
1604 }
1605 else if (active_buying_frequency_type == "Uniform") {
1606 if ((active_buying_min == -1) || (active_buying_max == -1)) {
1607 throw cyclus::ValueError("Invalid active buying frequency range. Please provide both a min and max value.");
1608 }
1609 active_dist_ = cyclus::UniformIntDist::Ptr (new cyclus::UniformIntDist(active_buying_min, active_buying_max));
1610 }
1611 else if (active_buying_frequency_type == "Normal") {
1612 if ((active_buying_mean == -1) || (active_buying_stddev == -1)) {
1613 throw cyclus::ValueError("Invalid active buying frequency range. Please provide both a mean and standard deviation value.");
1614 }
1615 if (active_buying_min == -1) {active_buying_min = 1;}
1616 if (active_buying_max == -1) {
1617 active_buying_max = std::numeric_limits<int>::max();}
1618
1619 active_dist_ = cyclus::NormalIntDist::Ptr (new cyclus::NormalIntDist(active_buying_mean, active_buying_stddev,
1621 }
1622 else if (active_buying_frequency_type == "Binomial") {
1624 throw cyclus::ValueError("Active buying end probability must be between 0 and 1");
1625 }
1626 int success = 1; // only one success is needed to end the active buying period
1627 active_dist_ = cyclus::NegativeBinomialIntDist::Ptr (new cyclus::NegativeBinomialIntDist(success, active_buying_end_probability));
1628 } else if (active_buying_frequency_type == "FixedWithDisruption") {
1629 if (active_buying_disruption < 0) {
1630 throw cyclus::ValueError("Disruption must be greater than or equal to 0");
1631 }
1632 active_dist_ = cyclus::BinaryIntDist::Ptr (
1633 new cyclus::BinaryIntDist(active_buying_disruption_probability,
1635 }
1636 else {
1637 throw cyclus::ValueError("Invalid active buying frequency type");}
1638
1640 if (dormant_buying_frequency_type == "Fixed") {
1641 dormant_dist_ = cyclus::FixedIntDist::Ptr (new cyclus::FixedIntDist(dormant_buying_val));
1642 }
1643 else if (dormant_buying_frequency_type == "Uniform") {
1644 if ((dormant_buying_min == -1) || (dormant_buying_max == -1)) {
1645 throw cyclus::ValueError("Invalid dormant buying frequency range. Please provide both a min and max value.");
1646 }
1647 dormant_dist_ = cyclus::UniformIntDist::Ptr (new cyclus::UniformIntDist(dormant_buying_min, dormant_buying_max));
1648 }
1649 else if (dormant_buying_frequency_type == "Normal") {
1650 if ((dormant_buying_mean == -1) || (dormant_buying_stddev == -1)) {
1651 throw cyclus::ValueError("Invalid dormant buying frequency range. Please provide both a mean and standard deviation value.");
1652 }
1653 if (dormant_buying_min == -1) {dormant_buying_min = 1;}
1654 if (dormant_buying_max == -1) {
1655 dormant_buying_max = std::numeric_limits<int>::max();}
1656 dormant_dist_ = cyclus::NormalIntDist::Ptr (new cyclus::NormalIntDist(dormant_buying_mean, dormant_buying_stddev,
1658 }
1659 else if (dormant_buying_frequency_type == "Binomial") {
1661 throw cyclus::ValueError("Dormant buying end probability must be between 0 and 1");
1662 }
1663 int success = 1; // only one success is needed to end the dormant buying period
1664 dormant_dist_ = cyclus::NegativeBinomialIntDist::Ptr (new cyclus::NegativeBinomialIntDist(success, dormant_buying_end_probability));
1665 } else if (dormant_buying_frequency_type == "FixedWithDisruption") {
1666 if (dormant_buying_disruption < 0) {
1667 throw cyclus::ValueError("Disruption must be greater than or equal to 0");
1668 }
1669 dormant_dist_ = cyclus::BinaryIntDist::Ptr (
1670 new cyclus::BinaryIntDist(dormant_buying_disruption_probability,
1672 }
1673 else {
1674 throw cyclus::ValueError("Invalid dormant buying frequency type");}
1675
1677 if (buying_size_type == "Fixed") {
1678 size_dist_ = cyclus::FixedDoubleDist::Ptr (new cyclus::FixedDoubleDist(buying_size_val));
1679 }
1680 else if (buying_size_type == "Uniform") {
1681 if ((buying_size_min == -1) || (buying_size_max == -1)) {
1682 throw cyclus::ValueError("Invalid buying size range. Please provide both a min and max value.");
1683 }
1684 size_dist_ = cyclus::UniformDoubleDist::Ptr (new cyclus::UniformDoubleDist(buying_size_min, buying_size_max));
1685 }
1686 else if (buying_size_type == "Normal") {
1687 if ((buying_size_mean == -1) || (buying_size_stddev == -1)) {
1688 throw cyclus::ValueError("Invalid buying size range. Please provide both a mean and standard deviation value.");
1689 }
1690 if (buying_size_min == -1) {buying_size_min = 0;}
1691 if (buying_size_max == -1) {buying_size_max = 1;}
1692 size_dist_ = cyclus::NormalDoubleDist::Ptr (new cyclus::NormalDoubleDist(buying_size_mean, buying_size_stddev,
1694 }
1695 else {
1696 throw cyclus::ValueError("Invalid buying size type");}
1697}
1698
1699//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1701 cyclus::Facility::EnterNotify();
1702
1703 inventory_tracker.set_capacity(max_inv_size);
1704 if (reorder_point < 0 && cumulative_cap <= 0) {
1706 buy_policy.Init(this, &inventory, std::string("inventory"),
1709 }
1710 else if (cumulative_cap > 0) {
1712 buy_policy.Init(this, &inventory, std::string("inventory"),
1715 }
1716 else if (reorder_quantity > 0) {
1718 throw cyclus::ValueError(
1719 "reorder_point + reorder_quantity must be less than or equal to max_inv_size");
1720 }
1721 buy_policy.Init(this, &inventory, std::string("inventory"),
1724 }
1725 else {
1726 buy_policy.Init(this, &inventory, std::string("inventory"),
1729 }
1730
1731 // dummy comp, use in_recipe if provided
1732 cyclus::CompMap v;
1733 cyclus::Composition::Ptr comp = cyclus::Composition::CreateFromAtom(v);
1734 if (in_recipe != "") {
1735 comp = context()->GetRecipe(in_recipe);
1736 }
1737
1738 if (in_commod_prefs.size() == 0) {
1739 for (int i = 0; i < in_commods.size(); ++i) {
1740 in_commod_prefs.push_back(cyclus::kDefaultPref);
1741 }
1742 } else if (in_commod_prefs.size() != in_commods.size()) {
1743 std::stringstream ss;
1744 ss << "in_commod_prefs has " << in_commod_prefs.size()
1745 << " values, expected " << in_commods.size();
1746 throw cyclus::ValueError(ss.str());
1747 }
1748
1749 for (int i = 0; i != in_commods.size(); ++i) {
1750 buy_policy.Set(in_commods[i], comp, in_commod_prefs[i]);
1751 }
1752 buy_policy.Start();
1753
1754 std::string package_name_ = context()->GetPackage(package)->name();
1755 std::string tu_name_ = context()->GetTransportUnit(transport_unit)->name();
1756 if (out_commods.size() == 1) {
1757 sell_policy.Init(this, &stocks, std::string("stocks"), cyclus::CY_LARGE_DOUBLE, false,
1758 sell_quantity, package_name_, tu_name_)
1759 .Set(out_commods.front())
1760 .Start();
1761
1762 } else {
1763 std::stringstream ss;
1764 ss << "out_commods has " << out_commods.size() << " values, expected 1.";
1765 throw cyclus::ValueError(ss.str());
1766 }
1768}
1769
1770//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1771std::string Storage::str() {
1772 std::stringstream ss;
1773 std::string ans, out_str;
1774 if (out_commods.size() == 1) {
1775 out_str = out_commods.front();
1776 } else {
1777 out_str = "";
1778 }
1779 if (cyclus::toolkit::CommodityProducer::Produces(
1780 cyclus::toolkit::Commodity(out_str))) {
1781 ans = "yes";
1782 } else {
1783 ans = "no";
1784 }
1785 ss << cyclus::Facility::str();
1786 ss << " has facility parameters {"
1787 << "\n"
1788 << " Output Commodity = " << out_str << ",\n"
1789 << " Residence Time = " << residence_time << ",\n"
1790 << " Throughput = " << throughput << ",\n"
1791 << " commod producer members: "
1792 << " produces " << out_str << "?:" << ans << "'}";
1793 return ss.str();
1794}
1795
1796//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1798
1799
1800 LOG(cyclus::LEV_INFO3, "ComCnv") << prototype() << " is ticking {";
1801
1802 LOG(cyclus::LEV_INFO5, "ComCnv") << "Processing = " << processing.quantity() << ", ready = " << ready.quantity() << ", stocks = " << stocks.quantity() << " and max inventory = " << max_inv_size;
1803
1804 LOG(cyclus::LEV_INFO4, "ComCnv") << "current capacity " << max_inv_size << " - " << processing.quantity() << " - " << ready.quantity() << " - " << stocks.quantity() << " = " << current_capacity();
1805
1806 if (current_capacity() > cyclus::eps_rsrc()) {
1807 LOG(cyclus::LEV_INFO4, "ComCnv")
1808 << " has capacity for " << current_capacity() << ".";
1809 }
1810 LOG(cyclus::LEV_INFO3, "ComCnv") << "}";
1811}
1812
1813//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1815 LOG(cyclus::LEV_INFO3, "ComCnv") << prototype() << " is tocking {";
1816
1817 BeginProcessing_(); // place unprocessed inventory into processing
1818
1819 LOG(cyclus::LEV_INFO4, "ComCnv") << "processing currently holds " << processing.quantity() << ". ready currently holds " << ready.quantity() << ".";
1820
1821 if (ready_time() >= 0 || residence_time == 0 && !inventory.empty()) {
1822 ReadyMatl_(ready_time()); // place processing into ready
1823 }
1824
1825 LOG(cyclus::LEV_INFO5, "ComCnv") << "Ready now holds " << ready.quantity() << " kg.";
1826
1827 if (ready.quantity() > throughput) {
1828 LOG(cyclus::LEV_INFO5, "ComCnv") << "Up to " << throughput << " kg will be placed in stocks based on throughput limits. ";
1829 }
1830
1831 ProcessMat_(throughput); // place ready into stocks
1832
1833 std::vector<double>::iterator result;
1834 result = std::max_element(in_commod_prefs.begin(), in_commod_prefs.end());
1835 int maxindx = std::distance(in_commod_prefs.begin(), result);
1836 double demand = 0;
1837 demand = current_capacity();
1838
1839 cyclus::toolkit::RecordTimeSeries<double>("demand"+in_commods[maxindx], this, demand);
1840
1841 // Multiple commodity tracking is not supported, user can only
1842 // provide one value for out_commods, despite it being a vector of strings.
1843 cyclus::toolkit::RecordTimeSeries<double>("supply"+out_commods[0], this,
1844 stocks.quantity());
1845
1846 LOG(cyclus::LEV_INFO4, "ComCnv") << "process has "
1847 << processing.quantity() << ". Ready has " << ready.quantity() << ". Stocks has " << stocks.quantity() << ".";
1848 LOG(cyclus::LEV_INFO3, "ComCnv") << "}";
1849}
1850
1851//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1852void Storage::AddMat_(cyclus::Material::Ptr mat) {
1853 LOG(cyclus::LEV_INFO5, "ComCnv") << prototype() << " is initially holding "
1854 << inventory.quantity() << " total.";
1855
1856 try {
1857 inventory.Push(mat);
1858 } catch (cyclus::Error& e) {
1859 e.msg(Agent::InformErrorMsg(e.msg()));
1860 throw e;
1861 }
1862
1863 LOG(cyclus::LEV_INFO5, "ComCnv")
1864 << prototype() << " added " << mat->quantity()
1865 << " of material to its inventory, which is holding "
1866 << inventory.quantity() << " total.";
1867}
1868
1869//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1871 while (inventory.count() > 0) {
1872 try {
1873 processing.Push(inventory.Pop());
1874 entry_times.push_back(context()->time());
1875
1876 LOG(cyclus::LEV_DEBUG2, "ComCnv")
1877 << "Storage " << prototype()
1878 << " added resources to processing at t= " << context()->time();
1879 } catch (cyclus::Error& e) {
1880 e.msg(Agent::InformErrorMsg(e.msg()));
1881 throw e;
1882 }
1883 }
1884}
1885
1886//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1887void Storage::ProcessMat_(double cap) {
1888 if (!ready.empty()) {
1889 try {
1890 double max_pop = std::min(cap, ready.quantity());
1891
1892 if (discrete_handling) {
1893 if (max_pop == ready.quantity()) {
1894 stocks.Push(ready.PopN(ready.count()));
1895 } else {
1896 double cap_pop = ready.Peek()->quantity();
1897 while (cap_pop <= max_pop && !ready.empty()) {
1898 stocks.Push(ready.Pop());
1899 cap_pop += ready.empty() ? 0 : ready.Peek()->quantity();
1900 }
1901 }
1902 } else {
1903 stocks.Push(ready.Pop(max_pop, cyclus::eps_rsrc()));
1904 }
1905
1906 LOG(cyclus::LEV_INFO4, "ComCnv") << "Storage " << prototype()
1907 << " moved resources"
1908 << " from ready to stocks"
1909 << " at t= " << context()->time();
1910 } catch (cyclus::Error& e) {
1911 e.msg(Agent::InformErrorMsg(e.msg()));
1912 throw e;
1913 }
1914 }
1915}
1916
1917//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1918void Storage::ReadyMatl_(int time) {
1919 LOG(cyclus::LEV_INFO5, "ComCnv") << "Placing material into ready";
1920
1921 int to_ready = 0;
1922
1923 while (!entry_times.empty() && entry_times.front() <= time) {
1924 entry_times.pop_front();
1925 ++to_ready;
1926 }
1927
1928 ready.Push(processing.PopN(to_ready));
1929}
1930
1932 std::string specification = this->spec();
1933 context()
1934 ->NewDatum("AgentPosition")
1935 ->AddVal("Spec", specification)
1936 ->AddVal("Prototype", this->prototype())
1937 ->AddVal("AgentId", id())
1938 ->AddVal("Latitude", latitude)
1939 ->AddVal("Longitude", longitude)
1940 ->Record();
1941}
1942
1943
1944// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1945extern "C" cyclus::Agent* ConstructStorage(cyclus::Context* ctx) {
1946 return new Storage(ctx);
1947}
1948
1949} // namespace cycamore
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::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< int > cycpp_shape_active_buying_end_probability
std::vector< double > in_commod_prefs
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
std::vector< int > cycpp_shape_active_buying_disruption_probability
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
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_dormant_buying_end_probability
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
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_disruption_probability
std::vector< int > cycpp_shape_dormant_buying_frequency_type
std::vector< int > cycpp_shape_latitude
std::vector< int > cycpp_shape_active_buying_max
std::vector< int > cycpp_shape_dormant_buying_disruption
void ReadyMatl_(int time)
move ready resources from processing to ready at a certain time
std::vector< int > cycpp_shape_active_buying_mean
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
std::vector< int > cycpp_shape_active_buying_disruption
virtual void EnterNotify()
Sets up the Storage Facility's trade requests.
virtual Json::Value annotations()
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
cyclus::Agent * ConstructStorage(cyclus::Context *ctx)