CYCAMORE
Loading...
Searching...
No Matches
build/cycamore/sink.cc
Go to the documentation of this file.
1#line 1 "/cycamore/src/sink.cc"
2// Implements the Sink class
3#include <algorithm>
4#include <sstream>
5
6#include <boost/lexical_cast.hpp>
7
8#include "sink.h"
9
10namespace cycamore {
11
12// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
13Sink::Sink(cyclus::Context* ctx)
14 : cyclus::Facility(ctx),
15 capacity(std::numeric_limits<double>::max()),
16 latitude(0.0),
17 longitude(0.0),
18 keep_packaging(true),
20 SetMaxInventorySize(std::numeric_limits<double>::max());}
21
22// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
24std::string Sink::schema() {
25 return ""
26 "<interleave>\n"
27 " <element name=\"in_commods\">\n"
28 " <oneOrMore>\n"
29 " <element name=\"val\">\n"
30 " <data type=\"string\"/>\n"
31 " </element>\n"
32 " </oneOrMore>\n"
33 " </element>\n"
34 " <optional>\n"
35 " <element name=\"in_commod_prefs\">\n"
36 " <oneOrMore>\n"
37 " <element name=\"val\">\n"
38 " <data type=\"double\"/>\n"
39 " </element>\n"
40 " </oneOrMore>\n"
41 " </element>\n"
42 " </optional>\n"
43 " <optional>\n"
44 " <element name=\"recipe_name\">\n"
45 " <data type=\"string\"/>\n"
46 " </element>\n"
47 " </optional>\n"
48 " <optional>\n"
49 " <element name=\"max_inv_size\">\n"
50 " <data type=\"double\"/>\n"
51 " </element>\n"
52 " </optional>\n"
53 " <optional>\n"
54 " <element name=\"capacity\">\n"
55 " <data type=\"double\"/>\n"
56 " </element>\n"
57 " </optional>\n"
58 " <optional>\n"
59 " <element name=\"random_size_type\">\n"
60 " <data type=\"string\"/>\n"
61 " </element>\n"
62 " </optional>\n"
63 " <optional>\n"
64 " <element name=\"random_size_mean\">\n"
65 " <data type=\"double\"/>\n"
66 " </element>\n"
67 " </optional>\n"
68 " <optional>\n"
69 " <element name=\"random_size_stddev\">\n"
70 " <data type=\"double\"/>\n"
71 " </element>\n"
72 " </optional>\n"
73 " <optional>\n"
74 " <element name=\"random_frequency_type\">\n"
75 " <data type=\"string\"/>\n"
76 " </element>\n"
77 " </optional>\n"
78 " <optional>\n"
79 " <element name=\"random_frequency_mean\">\n"
80 " <data type=\"double\"/>\n"
81 " </element>\n"
82 " </optional>\n"
83 " <optional>\n"
84 " <element name=\"random_frequency_stddev\">\n"
85 " <data type=\"double\"/>\n"
86 " </element>\n"
87 " </optional>\n"
88 " <optional>\n"
89 " <element name=\"random_frequency_min\">\n"
90 " <data type=\"int\"/>\n"
91 " </element>\n"
92 " </optional>\n"
93 " <optional>\n"
94 " <element name=\"random_frequency_max\">\n"
95 " <data type=\"int\"/>\n"
96 " </element>\n"
97 " </optional>\n"
98 " <optional>\n"
99 " <element name=\"keep_packaging\">\n"
100 " <data type=\"boolean\"/>\n"
101 " </element>\n"
102 " </optional>\n"
103 " <optional>\n"
104 " <element name=\"latitude\">\n"
105 " <data type=\"double\"/>\n"
106 " </element>\n"
107 " </optional>\n"
108 " <optional>\n"
109 " <element name=\"longitude\">\n"
110 " <data type=\"double\"/>\n"
111 " </element>\n"
112 " </optional>\n"
113 "</interleave>\n";
114};
115#line 23 "/cycamore/src/sink.cc"
116
117Json::Value Sink::annotations() {
118 Json::Value root;
119 Json::Reader reader;
120 bool parsed_ok = reader.parse(
121 "{\"name\":\"cycamore::Sink\",\"entity\":\"facility\",\"pare"
122 "nts\":[\"cyclus::Facility\",\"cyclus::toolkit::Positio"
123 "n\"],\"all_parents\":[\"cyclus::Agent\",\"cyclus::Facili"
124 "ty\",\"cyclus::Ider\",\"cyclus::StateWrangler\",\"cyclus"
125 "::TimeListener\",\"cyclus::Trader\",\"cyclus::toolkit:"
126 ":Position\"],\"vars\":{\"in_commods\":{\"tooltip\":[\"inpu"
127 "t commodities\",\"\"],\"doc\":\"commodities that the "
128 "sink facility accepts\",\"uilabel\":[\"List of Input C"
129 "ommodities\",\"\"],\"uitype\":[\"oneormore\",\"incommodity"
130 "\"],\"type\":[\"std::vector\",\"std::string\"],\"index\":0,"
131 "\"shape\":[-1,-"
132 "1],\"alias\":[\"in_commods\",\"val\"]},\"in_commod_prefs\""
133 ":{\"default\":[],\"doc\":\"preferences for each of the "
134 "given commodities, in the same order.Defauts to 1 "
135 "if unspecified\",\"uilabel\":[\"In Commody Preferences"
136 "\",\"\"],\"range\":[null,[1e-"
137 "08,1e+299]],\"uitype\":[\"oneormore\",\"range\"],\"type\":"
138 "[\"std::vector\",\"double\"],\"index\":1,\"shape\":[-1,-"
139 "1],\"alias\":[\"in_commod_prefs\",\"val\"],\"tooltip\":[\"i"
140 "n_commod_prefs\",\"\"]},\"recipe_name\":{\"default\":\"\",\""
141 "tooltip\":\"requested composition\",\"doc\":\"name of "
142 "recipe to use for material requests, where the "
143 "default (empty string) is to accept "
144 "everything\",\"uilabel\":\"Input Recipe\",\"uitype\":\"inr"
145 "ecipe\",\"type\":\"std::string\",\"index\":2,\"shape\":[-"
146 "1],\"alias\":\"recipe_name\"},\"max_inv_size\":{\"default"
147 "\":1e+299,\"tooltip\":\"sink maximum inventory "
148 "size\",\"uilabel\":\"Maximum Inventory\",\"uitype\":\"rang"
149 "e\",\"range\":[0.0,1e+299],\"doc\":\"total maximum "
150 "inventory size of sink facility\",\"type\":\"double\",\""
151 "index\":3,\"shape\":[-"
152 "1],\"alias\":\"max_inv_size\"},\"capacity\":{\"default\":1"
153 "e+299,\"tooltip\":\"sink capacity\",\"uilabel\":\"Maximum"
154 " Throughput\",\"uitype\":\"range\",\"range\":[0.0,1e+299]"
155 ",\"doc\":\"capacity the sink facility can accept at "
156 "each time step\",\"type\":\"double\",\"index\":4,\"shape\":"
157 "[-"
158 "1],\"alias\":\"capacity\"},\"inventory\":{\"capacity\":\"ma"
159 "x_inv_size\",\"type\":[\"cyclus::toolkit::ResBuf\",\"cyc"
160 "lus::Resource\"],\"index\":5,\"shape\":[-1,-"
161 "1]},\"random_size_type\":{\"default\":\"None\",\"tooltip\""
162 ":\"type of random behavior when setting the size of"
163 " the "
164 "request\",\"uitype\":\"combobox\",\"uilabel\":\"Random Siz"
165 "e\",\"categorical\":[\"None\",\"UniformReal\",\"UniformInt"
166 "\",\"NormalReal\",\"NormalInt\"],\"doc\":\"type of random "
167 "behavior to use. Default None, other options are "
168 "'UniformReal', 'UniformInt', 'NormalReal', and 'No"
169 "rmalInt'\",\"type\":\"std::string\",\"index\":6,\"shape\":["
170 "-1],\"alias\":\"random_size_type\"},\"random_size_mean\""
171 ":{\"default\":1.0,\"tooltip\":\"fraction of available "
172 "space to determine the mean\",\"uilabel\":\"Random "
173 "Size Mean\",\"uitype\":\"range\",\"range\":[0.0,1e+299],\""
174 "doc\":\"When a normal distribution is used to "
175 "determine the size of the request, this is the "
176 "fraction of available space to use as the mean. "
177 "Default 1.0. Note that values significantly above "
178 "1 without a correspondingly large std dev may "
179 "result in inefficient use of the random number gen"
180 "erator.\",\"type\":\"double\",\"index\":7,\"shape\":[-"
181 "1],\"alias\":\"random_size_mean\"},\"random_size_stddev"
182 "\":{\"default\":0.1,\"tooltip\":\"fraction of available "
183 "space to determine the std dev\",\"uilabel\":\"Random "
184 "Size Std Dev\",\"uitype\":\"range\",\"range\":[0.0,1e+299"
185 "],\"doc\":\"When a normal distribution is used to "
186 "determine the size of the request, this is the "
187 "fraction of available space to use as the standard"
188 " deviation. Default 0.1\",\"type\":\"double\",\"index\":8"
189 ",\"shape\":[-"
190 "1],\"alias\":\"random_size_stddev\"},\"random_frequency"
191 "_type\":{\"default\":\"None\",\"tooltip\":\"type of random"
192 " behavior when setting the timing of the "
193 "request\",\"uitype\":\"combobox\",\"uilabel\":\"Random Tim"
194 "ing\",\"categorical\":[\"None\",\"UniformInt\",\"NormalInt"
195 "\"],\"doc\":\"type of random behavior to use. Default "
196 "None, other options are, 'UniformInt', and "
197 "'NormalInt'. When using 'UniformInt', also set "
198 "'random_frequency_min' and 'random_frequency_max'."
199 " For 'NormalInt', set 'random_frequency_mean' and "
200 "'random_fequency_stddev', min and max values are "
201 "optional. \",\"type\":\"std::string\",\"index\":9,\"shape\""
202 ":[-"
203 "1],\"alias\":\"random_frequency_type\"},\"random_freque"
204 "ncy_mean\":{\"default\":1,\"tooltip\":\"mean of the "
205 "random frequency\",\"uilabel\":\"Random Frequency Mean"
206 "\",\"uitype\":\"range\",\"range\":[0.0,1e+299],\"doc\":\"Whe"
207 "n a normal distribution is used to determine the "
208 "frequency of the request, this is the mean. "
209 "Default 1\",\"type\":\"double\",\"index\":10,\"shape\":[-"
210 "1],\"alias\":\"random_frequency_mean\"},\"random_freque"
211 "ncy_stddev\":{\"default\":1,\"tooltip\":\"std dev of the"
212 " random frequency\",\"uilabel\":\"Random Frequency Std"
213 " Dev\",\"uitype\":\"range\",\"range\":[0.0,1e+299],\"doc\":"
214 "\"When a normal distribution is used to determine "
215 "the frequency of the request, this is the standard"
216 " deviation. Default 1\",\"type\":\"double\",\"index\":11,"
217 "\"shape\":[-"
218 "1],\"alias\":\"random_frequency_stddev\"},\"random_freq"
219 "uency_min\":{\"default\":1,\"tooltip\":\"lower bound of "
220 "the random frequency\",\"uilabel\":\"Random Frequency "
221 "Lower Bound\",\"uitype\":\"range\",\"range\":[1,214748364"
222 "7],\"doc\":\"When a random distribution is used to "
223 "determine the frequency of the request, this is "
224 "the lower bound. Default 1\",\"type\":\"int\",\"index\":1"
225 "2,\"shape\":[-"
226 "1],\"alias\":\"random_frequency_min\"},\"random_frequen"
227 "cy_max\":{\"default\":2147483647,\"tooltip\":\"upper "
228 "bound of the random frequency\",\"uilabel\":\"Random "
229 "Frequency Upper Bound\",\"uitype\":\"range\",\"range\":[1"
230 ",2147483647],\"doc\":\"When a random distribution is "
231 "used to determine the frequency of the request, "
232 "this is the upper bound. Default 2147483647 (CY_LA"
233 "RGE_INT)\",\"type\":\"int\",\"index\":13,\"shape\":[-"
234 "1],\"alias\":\"random_frequency_max\"},\"keep_packaging"
235 "\":{\"default\":true,\"tooltip\":\"Whether to persist "
236 "packaging in the sink.\",\"doc\":\"Boolean value about"
237 " whether to keep packaging. If true, packaging "
238 "will not be stripped upon acceptance into the "
239 "sink. If false, package type will be stripped "
240 "immediately upon acceptance. Has no effect if the "
241 "incoming material is not "
242 "packaged.\",\"uilabel\":\"Keep Packaging\",\"uitype\":\"bo"
243 "ol\",\"type\":\"bool\",\"index\":14,\"shape\":[-"
244 "1],\"alias\":\"keep_packaging\"},\"latitude\":{\"default\""
245 ":0.0,\"uilabel\":\"Geographical latitude in degrees "
246 "as a double\",\"doc\":\"Latitude of the agent's "
247 "geographical position. The value should be "
248 "expressed in degrees as a double.\",\"type\":\"double\""
249 ",\"index\":15,\"shape\":[-"
250 "1],\"alias\":\"latitude\",\"tooltip\":\"latitude\"},\"longi"
251 "tude\":{\"default\":0.0,\"uilabel\":\"Geographical "
252 "longitude in degrees as a double\",\"doc\":\"Longitude"
253 " of the agent's geographical position. The value "
254 "should be expressed in degrees as a double.\",\"type"
255 "\":\"double\",\"index\":16,\"shape\":[-"
256 "1],\"alias\":\"longitude\",\"tooltip\":\"longitude\"}},\"do"
257 "c\":\" A sink facility that accepts materials and "
258 "products with a fixed\\n throughput (per time step)"
259 " capacity and a lifetime capacity defined by\\n a "
260 "total inventory size. The inventory size and "
261 "throughput capacity\\n both default to infinite. If"
262 " a recipe is provided, it will request\\n material "
263 "with that recipe. Requests are made for any number"
264 " of\\n specified commodities.\\n\"}", root);
265 if (!parsed_ok) {
266 throw cyclus::ValueError("failed to parse annotations for cycamore::Sink.");
267 }
268 return root;
269};
270#line 25 "/cycamore/src/sink.cc"
271
272void Sink::InfileToDb(cyclus::InfileTree* tree, cyclus::DbInit di) {
273 cyclus::Facility::InfileToDb(tree, di);
274 int rawcycpp_shape_in_commods[2] = {-1, -1};
275 cycpp_shape_in_commods = std::vector<int>(rawcycpp_shape_in_commods, rawcycpp_shape_in_commods + 2);
276 int rawcycpp_shape_in_commod_prefs[2] = {-1, -1};
277 cycpp_shape_in_commod_prefs = std::vector<int>(rawcycpp_shape_in_commod_prefs, rawcycpp_shape_in_commod_prefs + 2);
278 int rawcycpp_shape_recipe_name[1] = {-1};
279 cycpp_shape_recipe_name = std::vector<int>(rawcycpp_shape_recipe_name, rawcycpp_shape_recipe_name + 1);
280 int rawcycpp_shape_max_inv_size[1] = {-1};
281 cycpp_shape_max_inv_size = std::vector<int>(rawcycpp_shape_max_inv_size, rawcycpp_shape_max_inv_size + 1);
282 int rawcycpp_shape_capacity[1] = {-1};
283 cycpp_shape_capacity = std::vector<int>(rawcycpp_shape_capacity, rawcycpp_shape_capacity + 1);
284 int rawcycpp_shape_inventory[2] = {-1, -1};
285 cycpp_shape_inventory = std::vector<int>(rawcycpp_shape_inventory, rawcycpp_shape_inventory + 2);
286 int rawcycpp_shape_random_size_type[1] = {-1};
287 cycpp_shape_random_size_type = std::vector<int>(rawcycpp_shape_random_size_type, rawcycpp_shape_random_size_type + 1);
288 int rawcycpp_shape_random_size_mean[1] = {-1};
289 cycpp_shape_random_size_mean = std::vector<int>(rawcycpp_shape_random_size_mean, rawcycpp_shape_random_size_mean + 1);
290 int rawcycpp_shape_random_size_stddev[1] = {-1};
291 cycpp_shape_random_size_stddev = std::vector<int>(rawcycpp_shape_random_size_stddev, rawcycpp_shape_random_size_stddev + 1);
292 int rawcycpp_shape_random_frequency_type[1] = {-1};
293 cycpp_shape_random_frequency_type = std::vector<int>(rawcycpp_shape_random_frequency_type, rawcycpp_shape_random_frequency_type + 1);
294 int rawcycpp_shape_random_frequency_mean[1] = {-1};
295 cycpp_shape_random_frequency_mean = std::vector<int>(rawcycpp_shape_random_frequency_mean, rawcycpp_shape_random_frequency_mean + 1);
296 int rawcycpp_shape_random_frequency_stddev[1] = {-1};
297 cycpp_shape_random_frequency_stddev = std::vector<int>(rawcycpp_shape_random_frequency_stddev, rawcycpp_shape_random_frequency_stddev + 1);
298 int rawcycpp_shape_random_frequency_min[1] = {-1};
299 cycpp_shape_random_frequency_min = std::vector<int>(rawcycpp_shape_random_frequency_min, rawcycpp_shape_random_frequency_min + 1);
300 int rawcycpp_shape_random_frequency_max[1] = {-1};
301 cycpp_shape_random_frequency_max = std::vector<int>(rawcycpp_shape_random_frequency_max, rawcycpp_shape_random_frequency_max + 1);
302 int rawcycpp_shape_keep_packaging[1] = {-1};
303 cycpp_shape_keep_packaging = std::vector<int>(rawcycpp_shape_keep_packaging, rawcycpp_shape_keep_packaging + 1);
304 int rawcycpp_shape_latitude[1] = {-1};
305 cycpp_shape_latitude = std::vector<int>(rawcycpp_shape_latitude, rawcycpp_shape_latitude + 1);
306 int rawcycpp_shape_longitude[1] = {-1};
307 cycpp_shape_longitude = std::vector<int>(rawcycpp_shape_longitude, rawcycpp_shape_longitude + 1);
308 cyclus::InfileTree* sub = tree->SubTree("config/*");
309 int i;
310 int n;
311 {
312 cyclus::InfileTree* bub = sub->SubTree("in_commods", 0);
313 cyclus::InfileTree* sub = bub;
314 int n1 = sub->NMatches("val");
315 std::vector< std::string > in_commods_val;
316 in_commods_val.resize(n1);
317 for (int i1 = 0; i1 < n1; ++i1) {
318 std::string elem;
319 {
320 std::string elem_in = cyclus::Query<std::string>(sub, "val", i1);
321 elem = elem_in;
322 }
323 in_commods_val[i1] = elem;
324 }
325 in_commods = in_commods_val;
326 }
327 if (sub->NMatches("in_commod_prefs") > 0) {
328 {
329 cyclus::InfileTree* bub = sub->SubTree("in_commod_prefs", 0);
330 cyclus::InfileTree* sub = bub;
331 int n1 = sub->NMatches("val");
332 std::vector< double > in_commod_prefs_val;
333 in_commod_prefs_val.resize(n1);
334 for (int i1 = 0; i1 < n1; ++i1) {
335 double elem;
336 {
337 double elem_in = cyclus::Query<double>(sub, "val", i1);
338 elem = elem_in;
339 }
340 in_commod_prefs_val[i1] = elem;
341 }
342 in_commod_prefs = in_commod_prefs_val;
343 }
344 } else {
345 std::vector< double > in_commod_prefs_tmp;
346 in_commod_prefs_tmp.resize(0);
347 {
348 }
349 in_commod_prefs = in_commod_prefs_tmp;
350 }
351 if (sub->NMatches("recipe_name") > 0) {
352 {
353 std::string recipe_name_val = cyclus::Query<std::string>(sub, "recipe_name");
354 recipe_name = recipe_name_val;
355 }
356 } else {
357 std::string recipe_name_tmp("");
358 recipe_name = recipe_name_tmp;
359 }
360 if (sub->NMatches("max_inv_size") > 0) {
361 {
362 double max_inv_size_val = cyclus::Query<double>(sub, "max_inv_size");
363 max_inv_size = max_inv_size_val;
364 }
365 } else {
366 double max_inv_size_tmp = 1e+299;
367 max_inv_size = max_inv_size_tmp;
368 }
369 if (sub->NMatches("capacity") > 0) {
370 {
371 double capacity_val = cyclus::Query<double>(sub, "capacity");
372 capacity = capacity_val;
373 }
374 } else {
375 double capacity_tmp = 1e+299;
376 capacity = capacity_tmp;
377 }
378 if (sub->NMatches("random_size_type") > 0) {
379 {
380 std::string random_size_type_val = cyclus::Query<std::string>(sub, "random_size_type");
381 random_size_type = random_size_type_val;
382 }
383 } else {
384 std::string random_size_type_tmp("None");
385 random_size_type = random_size_type_tmp;
386 }
387 if (sub->NMatches("random_size_mean") > 0) {
388 {
389 double random_size_mean_val = cyclus::Query<double>(sub, "random_size_mean");
390 random_size_mean = random_size_mean_val;
391 }
392 } else {
393 double random_size_mean_tmp = 1.0;
394 random_size_mean = random_size_mean_tmp;
395 }
396 if (sub->NMatches("random_size_stddev") > 0) {
397 {
398 double random_size_stddev_val = cyclus::Query<double>(sub, "random_size_stddev");
399 random_size_stddev = random_size_stddev_val;
400 }
401 } else {
402 double random_size_stddev_tmp = 0.1;
403 random_size_stddev = random_size_stddev_tmp;
404 }
405 if (sub->NMatches("random_frequency_type") > 0) {
406 {
407 std::string random_frequency_type_val = cyclus::Query<std::string>(sub, "random_frequency_type");
408 random_frequency_type = random_frequency_type_val;
409 }
410 } else {
411 std::string random_frequency_type_tmp("None");
412 random_frequency_type = random_frequency_type_tmp;
413 }
414 if (sub->NMatches("random_frequency_mean") > 0) {
415 {
416 double random_frequency_mean_val = cyclus::Query<double>(sub, "random_frequency_mean");
417 random_frequency_mean = random_frequency_mean_val;
418 }
419 } else {
420 double random_frequency_mean_tmp = 1;
421 random_frequency_mean = random_frequency_mean_tmp;
422 }
423 if (sub->NMatches("random_frequency_stddev") > 0) {
424 {
425 double random_frequency_stddev_val = cyclus::Query<double>(sub, "random_frequency_stddev");
426 random_frequency_stddev = random_frequency_stddev_val;
427 }
428 } else {
429 double random_frequency_stddev_tmp = 1;
430 random_frequency_stddev = random_frequency_stddev_tmp;
431 }
432 if (sub->NMatches("random_frequency_min") > 0) {
433 {
434 int random_frequency_min_val = cyclus::Query<int>(sub, "random_frequency_min");
435 random_frequency_min = random_frequency_min_val;
436 }
437 } else {
438 int random_frequency_min_tmp = 1;
439 random_frequency_min = random_frequency_min_tmp;
440 }
441 if (sub->NMatches("random_frequency_max") > 0) {
442 {
443 int random_frequency_max_val = cyclus::Query<int>(sub, "random_frequency_max");
444 random_frequency_max = random_frequency_max_val;
445 }
446 } else {
447 int random_frequency_max_tmp = 2147483647;
448 random_frequency_max = random_frequency_max_tmp;
449 }
450 if (sub->NMatches("keep_packaging") > 0) {
451 {
452 bool keep_packaging_val = cyclus::Query<bool>(sub, "keep_packaging");
453 keep_packaging = keep_packaging_val;
454 }
455 } else {
456 bool keep_packaging_tmp = true;
457 keep_packaging = keep_packaging_tmp;
458 }
459 if (sub->NMatches("latitude") > 0) {
460 {
461 double latitude_val = cyclus::Query<double>(sub, "latitude");
462 latitude = latitude_val;
463 }
464 } else {
465 double latitude_tmp = 0.0;
466 latitude = latitude_tmp;
467 }
468 if (sub->NMatches("longitude") > 0) {
469 {
470 double longitude_val = cyclus::Query<double>(sub, "longitude");
471 longitude = longitude_val;
472 }
473 } else {
474 double longitude_tmp = 0.0;
475 longitude = longitude_tmp;
476 }
477 di.NewDatum("Info")
478 ->AddVal("in_commods", in_commods, &cycpp_shape_in_commods)
479 ->AddVal("in_commod_prefs", in_commod_prefs, &cycpp_shape_in_commod_prefs)
480 ->AddVal("recipe_name", recipe_name, &cycpp_shape_recipe_name)
481 ->AddVal("max_inv_size", max_inv_size, &cycpp_shape_max_inv_size)
482 ->AddVal("capacity", capacity, &cycpp_shape_capacity)
483 ->AddVal("random_size_type", random_size_type, &cycpp_shape_random_size_type)
484 ->AddVal("random_size_mean", random_size_mean, &cycpp_shape_random_size_mean)
485 ->AddVal("random_size_stddev", random_size_stddev, &cycpp_shape_random_size_stddev)
486 ->AddVal("random_frequency_type", random_frequency_type, &cycpp_shape_random_frequency_type)
487 ->AddVal("random_frequency_mean", random_frequency_mean, &cycpp_shape_random_frequency_mean)
488 ->AddVal("random_frequency_stddev", random_frequency_stddev, &cycpp_shape_random_frequency_stddev)
489 ->AddVal("random_frequency_min", random_frequency_min, &cycpp_shape_random_frequency_min)
490 ->AddVal("random_frequency_max", random_frequency_max, &cycpp_shape_random_frequency_max)
491 ->AddVal("keep_packaging", keep_packaging, &cycpp_shape_keep_packaging)
492 ->AddVal("latitude", latitude, &cycpp_shape_latitude)
493 ->AddVal("longitude", longitude, &cycpp_shape_longitude)
494 ->Record();
495};
496#line 27 "/cycamore/src/sink.cc"
497
498void Sink::Snapshot(cyclus::DbInit di) {
499 di.NewDatum("Info")
500 ->AddVal("in_commods", in_commods, &cycpp_shape_in_commods)
501 ->AddVal("in_commod_prefs", in_commod_prefs, &cycpp_shape_in_commod_prefs)
502 ->AddVal("recipe_name", recipe_name, &cycpp_shape_recipe_name)
503 ->AddVal("max_inv_size", max_inv_size, &cycpp_shape_max_inv_size)
504 ->AddVal("capacity", capacity, &cycpp_shape_capacity)
505 ->AddVal("random_size_type", random_size_type, &cycpp_shape_random_size_type)
506 ->AddVal("random_size_mean", random_size_mean, &cycpp_shape_random_size_mean)
507 ->AddVal("random_size_stddev", random_size_stddev, &cycpp_shape_random_size_stddev)
508 ->AddVal("random_frequency_type", random_frequency_type, &cycpp_shape_random_frequency_type)
509 ->AddVal("random_frequency_mean", random_frequency_mean, &cycpp_shape_random_frequency_mean)
510 ->AddVal("random_frequency_stddev", random_frequency_stddev, &cycpp_shape_random_frequency_stddev)
511 ->AddVal("random_frequency_min", random_frequency_min, &cycpp_shape_random_frequency_min)
512 ->AddVal("random_frequency_max", random_frequency_max, &cycpp_shape_random_frequency_max)
513 ->AddVal("keep_packaging", keep_packaging, &cycpp_shape_keep_packaging)
514 ->AddVal("latitude", latitude, &cycpp_shape_latitude)
515 ->AddVal("longitude", longitude, &cycpp_shape_longitude)
516 ->Record();
517};
518#line 29 "/cycamore/src/sink.cc"
519
520cyclus::Inventories Sink::SnapshotInv() {
521 cyclus::Inventories invs;
522 invs["inventory"] = inventory.PopNRes(inventory.count());
523 inventory.Push(invs["inventory"]);
524 return invs;
525};
526#line 31 "/cycamore/src/sink.cc"
527
528void Sink::InitInv(cyclus::Inventories& inv) {
529 inventory.Push(inv["inventory"]);
530
531};
532#line 33 "/cycamore/src/sink.cc"
533
534cyclus::Agent* Sink::Clone() {
535 cycamore::Sink* m = new cycamore::Sink(context());
536 m->InitFrom(this);
537 return m;
538};
539#line 35 "/cycamore/src/sink.cc"
540
541void Sink::InitFrom(cyclus::QueryableBackend* b) {
542 cyclus::Facility::InitFrom(b);
543 int rawcycpp_shape_in_commods[2] = {-1, -1};
544 cycpp_shape_in_commods = std::vector<int>(rawcycpp_shape_in_commods, rawcycpp_shape_in_commods + 2);
545 int rawcycpp_shape_in_commod_prefs[2] = {-1, -1};
546 cycpp_shape_in_commod_prefs = std::vector<int>(rawcycpp_shape_in_commod_prefs, rawcycpp_shape_in_commod_prefs + 2);
547 int rawcycpp_shape_recipe_name[1] = {-1};
548 cycpp_shape_recipe_name = std::vector<int>(rawcycpp_shape_recipe_name, rawcycpp_shape_recipe_name + 1);
549 int rawcycpp_shape_max_inv_size[1] = {-1};
550 cycpp_shape_max_inv_size = std::vector<int>(rawcycpp_shape_max_inv_size, rawcycpp_shape_max_inv_size + 1);
551 int rawcycpp_shape_capacity[1] = {-1};
552 cycpp_shape_capacity = std::vector<int>(rawcycpp_shape_capacity, rawcycpp_shape_capacity + 1);
553 int rawcycpp_shape_inventory[2] = {-1, -1};
554 cycpp_shape_inventory = std::vector<int>(rawcycpp_shape_inventory, rawcycpp_shape_inventory + 2);
555 int rawcycpp_shape_random_size_type[1] = {-1};
556 cycpp_shape_random_size_type = std::vector<int>(rawcycpp_shape_random_size_type, rawcycpp_shape_random_size_type + 1);
557 int rawcycpp_shape_random_size_mean[1] = {-1};
558 cycpp_shape_random_size_mean = std::vector<int>(rawcycpp_shape_random_size_mean, rawcycpp_shape_random_size_mean + 1);
559 int rawcycpp_shape_random_size_stddev[1] = {-1};
560 cycpp_shape_random_size_stddev = std::vector<int>(rawcycpp_shape_random_size_stddev, rawcycpp_shape_random_size_stddev + 1);
561 int rawcycpp_shape_random_frequency_type[1] = {-1};
562 cycpp_shape_random_frequency_type = std::vector<int>(rawcycpp_shape_random_frequency_type, rawcycpp_shape_random_frequency_type + 1);
563 int rawcycpp_shape_random_frequency_mean[1] = {-1};
564 cycpp_shape_random_frequency_mean = std::vector<int>(rawcycpp_shape_random_frequency_mean, rawcycpp_shape_random_frequency_mean + 1);
565 int rawcycpp_shape_random_frequency_stddev[1] = {-1};
566 cycpp_shape_random_frequency_stddev = std::vector<int>(rawcycpp_shape_random_frequency_stddev, rawcycpp_shape_random_frequency_stddev + 1);
567 int rawcycpp_shape_random_frequency_min[1] = {-1};
568 cycpp_shape_random_frequency_min = std::vector<int>(rawcycpp_shape_random_frequency_min, rawcycpp_shape_random_frequency_min + 1);
569 int rawcycpp_shape_random_frequency_max[1] = {-1};
570 cycpp_shape_random_frequency_max = std::vector<int>(rawcycpp_shape_random_frequency_max, rawcycpp_shape_random_frequency_max + 1);
571 int rawcycpp_shape_keep_packaging[1] = {-1};
572 cycpp_shape_keep_packaging = std::vector<int>(rawcycpp_shape_keep_packaging, rawcycpp_shape_keep_packaging + 1);
573 int rawcycpp_shape_latitude[1] = {-1};
574 cycpp_shape_latitude = std::vector<int>(rawcycpp_shape_latitude, rawcycpp_shape_latitude + 1);
575 int rawcycpp_shape_longitude[1] = {-1};
576 cycpp_shape_longitude = std::vector<int>(rawcycpp_shape_longitude, rawcycpp_shape_longitude + 1);
577 cyclus::QueryResult qr = b->Query("Info", NULL);
578 in_commods = qr.GetVal<std::vector< std::string > >("in_commods");
579 in_commod_prefs = qr.GetVal<std::vector< double > >("in_commod_prefs");
580 recipe_name = qr.GetVal<std::string>("recipe_name");
581 max_inv_size = qr.GetVal<double>("max_inv_size");
582 capacity = qr.GetVal<double>("capacity");
583 random_size_type = qr.GetVal<std::string>("random_size_type");
584 random_size_mean = qr.GetVal<double>("random_size_mean");
585 random_size_stddev = qr.GetVal<double>("random_size_stddev");
586 random_frequency_type = qr.GetVal<std::string>("random_frequency_type");
587 random_frequency_mean = qr.GetVal<double>("random_frequency_mean");
588 random_frequency_stddev = qr.GetVal<double>("random_frequency_stddev");
589 random_frequency_min = qr.GetVal<int>("random_frequency_min");
590 random_frequency_max = qr.GetVal<int>("random_frequency_max");
591 keep_packaging = qr.GetVal<bool>("keep_packaging");
592 latitude = qr.GetVal<double>("latitude");
593 longitude = qr.GetVal<double>("longitude");
594 inventory.capacity(max_inv_size);
595};
596#line 37 "/cycamore/src/sink.cc"
597
599 cyclus::Facility::InitFrom(m);
600 int rawcycpp_shape_in_commods[2] = {-1, -1};
601 cycpp_shape_in_commods = std::vector<int>(rawcycpp_shape_in_commods, rawcycpp_shape_in_commods + 2);
602 int rawcycpp_shape_in_commod_prefs[2] = {-1, -1};
603 cycpp_shape_in_commod_prefs = std::vector<int>(rawcycpp_shape_in_commod_prefs, rawcycpp_shape_in_commod_prefs + 2);
604 int rawcycpp_shape_recipe_name[1] = {-1};
605 cycpp_shape_recipe_name = std::vector<int>(rawcycpp_shape_recipe_name, rawcycpp_shape_recipe_name + 1);
606 int rawcycpp_shape_max_inv_size[1] = {-1};
607 cycpp_shape_max_inv_size = std::vector<int>(rawcycpp_shape_max_inv_size, rawcycpp_shape_max_inv_size + 1);
608 int rawcycpp_shape_capacity[1] = {-1};
609 cycpp_shape_capacity = std::vector<int>(rawcycpp_shape_capacity, rawcycpp_shape_capacity + 1);
610 int rawcycpp_shape_inventory[2] = {-1, -1};
611 cycpp_shape_inventory = std::vector<int>(rawcycpp_shape_inventory, rawcycpp_shape_inventory + 2);
612 int rawcycpp_shape_random_size_type[1] = {-1};
613 cycpp_shape_random_size_type = std::vector<int>(rawcycpp_shape_random_size_type, rawcycpp_shape_random_size_type + 1);
614 int rawcycpp_shape_random_size_mean[1] = {-1};
615 cycpp_shape_random_size_mean = std::vector<int>(rawcycpp_shape_random_size_mean, rawcycpp_shape_random_size_mean + 1);
616 int rawcycpp_shape_random_size_stddev[1] = {-1};
617 cycpp_shape_random_size_stddev = std::vector<int>(rawcycpp_shape_random_size_stddev, rawcycpp_shape_random_size_stddev + 1);
618 int rawcycpp_shape_random_frequency_type[1] = {-1};
619 cycpp_shape_random_frequency_type = std::vector<int>(rawcycpp_shape_random_frequency_type, rawcycpp_shape_random_frequency_type + 1);
620 int rawcycpp_shape_random_frequency_mean[1] = {-1};
621 cycpp_shape_random_frequency_mean = std::vector<int>(rawcycpp_shape_random_frequency_mean, rawcycpp_shape_random_frequency_mean + 1);
622 int rawcycpp_shape_random_frequency_stddev[1] = {-1};
623 cycpp_shape_random_frequency_stddev = std::vector<int>(rawcycpp_shape_random_frequency_stddev, rawcycpp_shape_random_frequency_stddev + 1);
624 int rawcycpp_shape_random_frequency_min[1] = {-1};
625 cycpp_shape_random_frequency_min = std::vector<int>(rawcycpp_shape_random_frequency_min, rawcycpp_shape_random_frequency_min + 1);
626 int rawcycpp_shape_random_frequency_max[1] = {-1};
627 cycpp_shape_random_frequency_max = std::vector<int>(rawcycpp_shape_random_frequency_max, rawcycpp_shape_random_frequency_max + 1);
628 int rawcycpp_shape_keep_packaging[1] = {-1};
629 cycpp_shape_keep_packaging = std::vector<int>(rawcycpp_shape_keep_packaging, rawcycpp_shape_keep_packaging + 1);
630 int rawcycpp_shape_latitude[1] = {-1};
631 cycpp_shape_latitude = std::vector<int>(rawcycpp_shape_latitude, rawcycpp_shape_latitude + 1);
632 int rawcycpp_shape_longitude[1] = {-1};
633 cycpp_shape_longitude = std::vector<int>(rawcycpp_shape_longitude, rawcycpp_shape_longitude + 1);
634 in_commods = m->in_commods;
635 in_commod_prefs = m->in_commod_prefs;
636 recipe_name = m->recipe_name;
637 max_inv_size = m->max_inv_size;
638 capacity = m->capacity;
639 random_size_type = m->random_size_type;
640 random_size_mean = m->random_size_mean;
641 random_size_stddev = m->random_size_stddev;
642 random_frequency_type = m->random_frequency_type;
643 random_frequency_mean = m->random_frequency_mean;
644 random_frequency_stddev = m->random_frequency_stddev;
645 random_frequency_min = m->random_frequency_min;
646 random_frequency_max = m->random_frequency_max;
647 keep_packaging = m->keep_packaging;
648 latitude = m->latitude;
649 longitude = m->longitude;
650 inventory.capacity(m->inventory.capacity());
651};
652#line 41 "/cycamore/src/sink.cc"
653
654// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
656 cyclus::Facility::EnterNotify();
657 LOG(cyclus::LEV_INFO4, "SnkFac") << " using random behavior " << random_size_type;
658
659 inventory.keep_packaging(keep_packaging);
660
661 if (in_commod_prefs.size() == 0) {
662 for (int i = 0; i < in_commods.size(); ++i) {
663 in_commod_prefs.push_back(cyclus::kDefaultPref);
664 }
665 } else if (in_commod_prefs.size() != in_commods.size()) {
666 std::stringstream ss;
667 ss << "in_commod_prefs has " << in_commod_prefs.size()
668 << " values, expected " << in_commods.size();
669 throw cyclus::ValueError(ss.str());
670 }
675
676 if (random_size_type != "None") {
677 LOG(cyclus::LEV_INFO4, "SnkFac") << "Sink " << this->id()
678 << " is using random behavior "
680 << " for determining request size.";
681 }
682 if (random_frequency_type != "None") {
683 LOG(cyclus::LEV_INFO4, "SnkFac") << "Sink " << this->id()
684 << " is using random behavior "
686 << " for determining request frequency.";
687 }
689}
690
691// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
692std::string Sink::str() {
693 using std::string;
694 using std::vector;
695 std::stringstream ss;
696 ss << cyclus::Facility::str();
697
698 string msg = "";
699 msg += "accepts commodities ";
700 for (vector<string>::iterator commod = in_commods.begin();
701 commod != in_commods.end();
702 commod++) {
703 msg += (commod == in_commods.begin() ? "{" : ", ");
704 msg += (*commod);
705 }
706 msg += "} until its inventory is full at ";
707 ss << msg << inventory.capacity() << " kg.";
708 return "" + ss.str();
709}
710
711// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
712std::set<cyclus::RequestPortfolio<cyclus::Material>::Ptr>
714 using cyclus::Material;
715 using cyclus::RequestPortfolio;
716 using cyclus::Request;
717 using cyclus::Composition;
718
719 std::set<RequestPortfolio<Material>::Ptr> ports;
720 RequestPortfolio<Material>::Ptr port(new RequestPortfolio<Material>());
721 Material::Ptr mat;
722
724 if (requestAmt > SpaceAvailable()) {
726 }
727
728 if (recipe_name.empty()) {
729 mat = cyclus::NewBlankMaterial(requestAmt);
730 } else {
731 Composition::Ptr rec = this->context()->GetRecipe(recipe_name);
732 mat = cyclus::Material::CreateUntracked(requestAmt, rec);
733 }
734
735 if (requestAmt > cyclus::eps()) {
736 std::vector<Request<Material>*> mutuals;
737 for (int i = 0; i < in_commods.size(); i++) {
738 mutuals.push_back(port->AddRequest(mat, this, in_commods[i], in_commod_prefs[i]));
739
740 }
741 port->AddMutualReqs(mutuals);
742 ports.insert(port);
743 } // if amt > eps
744 return ports;
745}
746
747// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
748std::set<cyclus::RequestPortfolio<cyclus::Product>::Ptr>
750 using cyclus::CapacityConstraint;
751 using cyclus::Product;
752 using cyclus::RequestPortfolio;
753
754 std::set<RequestPortfolio<Product>::Ptr> ports;
755 RequestPortfolio<Product>::Ptr
756 port(new RequestPortfolio<Product>());
757
758 if (requestAmt > cyclus::eps()) {
759 CapacityConstraint<Product> cc(requestAmt);
760 port->AddConstraint(cc);
761
762 std::vector<std::string>::const_iterator it;
763 for (it = in_commods.begin(); it != in_commods.end(); ++it) {
764 std::string quality = ""; // not clear what this should be..
765 Product::Ptr rsrc = Product::CreateUntracked(requestAmt, quality);
766 port->AddRequest(rsrc, this, *it);
767 }
768
769 ports.insert(port);
770 } // if amt > eps
771 return ports;
772}
773
774// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
776 const std::vector< std::pair<cyclus::Trade<cyclus::Material>,
777 cyclus::Material::Ptr> >& responses) {
778 std::vector< std::pair<cyclus::Trade<cyclus::Material>,
779 cyclus::Material::Ptr> >::const_iterator it;
780 for (it = responses.begin(); it != responses.end(); ++it) {
781 inventory.Push(it->second);
782 }
783}
784
785// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
787 const std::vector< std::pair<cyclus::Trade<cyclus::Product>,
788 cyclus::Product::Ptr> >& responses) {
789 std::vector< std::pair<cyclus::Trade<cyclus::Product>,
790 cyclus::Product::Ptr> >::const_iterator it;
791 for (it = responses.begin(); it != responses.end(); ++it) {
792 inventory.Push(it->second);
793 }
794}
795
796// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
798 using std::string;
799 using std::vector;
800 LOG(cyclus::LEV_INFO3, "SnkFac") << "Sink " << this->id() << " is ticking {";
801
802 if (nextBuyTime == -1) {
804 }
805 else if (nextBuyTime == context()->time()) {
808
809 LOG(cyclus::LEV_INFO4, "SnkFac") << "Sink " << this->id()
810 << " has reached buying time. The next buy time will be time step " << nextBuyTime;
811 }
812 else {
813 requestAmt = 0;
814 }
815
816 // inform the simulation about what the sink facility will be requesting
817 if (requestAmt > cyclus::eps()) {
818 LOG(cyclus::LEV_INFO4, "SnkFac") << "Sink " << this->id()
819 << " has request amount " << requestAmt
820 << " kg of " << in_commods[0] << ".";
821 for (vector<string>::iterator commod = in_commods.begin();
822 commod != in_commods.end();
823 commod++) {
824 LOG(cyclus::LEV_INFO4, "SnkFac") << "Sink " << this->id()
825 << " will request " << requestAmt
826 << " kg of " << *commod << ".";
827 cyclus::toolkit::RecordTimeSeries<double>("demand"+*commod, this,
828 requestAmt);
829 }
830 }
831 LOG(cyclus::LEV_INFO3, "SnkFac") << "}";
832}
833
834// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
836 LOG(cyclus::LEV_INFO3, "SnkFac") << prototype() << " is tocking {";
837
838 // On the tock, the sink facility doesn't really do much.
839 // Maybe someday it will record things.
840 // For now, lets just print out what we have at each timestep.
841 LOG(cyclus::LEV_INFO4, "SnkFac") << "Sink " << this->id()
842 << " is holding " << inventory.quantity()
843 << " units of material at the close of timestep "
844 << context()->time() << ".";
845 LOG(cyclus::LEV_INFO3, "SnkFac") << "}";
846}
847
849 std::string specification = this->spec();
850 context()
851 ->NewDatum("AgentPosition")
852 ->AddVal("Spec", specification)
853 ->AddVal("Prototype", this->prototype())
854 ->AddVal("AgentId", id())
855 ->AddVal("Latitude", latitude)
856 ->AddVal("Longitude", longitude)
857 ->Record();
858}
859
861 double amt = SpaceAvailable();
862 if (amt < cyclus::eps()) {
863 requestAmt = 0;
864 }
865
866 if (random_size_type == "None") {
867 requestAmt = amt;
868 }
869 else if (random_size_type == "UniformReal") {
870 requestAmt = context()->random_uniform_real(0, amt);
871 }
872 else if (random_size_type == "NormalReal") {
873 requestAmt = context()->random_normal_real(amt * random_size_mean,
874 amt * random_size_stddev,
875 0, amt);
876 }
877 else {
878 requestAmt = amt;
879 }
880 return;
881}
882
884 if (random_frequency_type == "None") {
885 nextBuyTime = -1;
886 }
887 else if (random_frequency_type == "UniformInt") {
888 nextBuyTime = context()->time() + context()->random_uniform_int(random_frequency_min, random_frequency_max);
889 }
890 else if (random_frequency_type == "NormalInt") {
891 nextBuyTime = context()->time() + context()->random_normal_int(random_frequency_mean, random_frequency_stddev, random_frequency_min, random_frequency_max);
892 }
893 else {
894 nextBuyTime = -1;
895 }
896 return;
897}
898
899// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
900extern "C" cyclus::Agent* ConstructSink(cyclus::Context* ctx) {
901 return new Sink(ctx);
902}
903
904} // namespace cycamore
This facility acts as a sink of materials and products with a fixed throughput (per time step) capaci...
cyclus::toolkit::ResBuf< cyclus::Resource > inventory
this facility holds material in storage.
std::vector< int > cycpp_shape_random_frequency_mean
virtual Json::Value annotations()
Sink(cyclus::Context *ctx)
virtual void SetRequestAmt()
SinkFacilities update request amount using random behavior.
virtual void InitFrom(cycamore::Sink *m)
virtual void EnterNotify()
std::vector< int > cycpp_shape_random_frequency_stddev
std::vector< int > cycpp_shape_random_frequency_max
std::vector< std::string > in_commods
all facilities must have at least one input commodity
virtual void AcceptMatlTrades(const std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &responses)
SinkFacilities place accepted trade Materials in their Inventory.
std::vector< double > in_commod_prefs
std::string random_frequency_type
std::vector< int > cycpp_shape_random_frequency_type
virtual void InitInv(cyclus::Inventories &inv)
std::vector< int > cycpp_shape_in_commod_prefs
void SetMaxInventorySize(double size)
sets the size of the storage inventory for received material
std::vector< int > cycpp_shape_in_commods
std::vector< int > cycpp_shape_keep_packaging
virtual std::set< cyclus::RequestPortfolio< cyclus::Material >::Ptr > GetMatlRequests()
SinkFacilities request Materials of their given commodity.
std::vector< int > cycpp_shape_latitude
std::string random_size_type
random status (size of request)
double capacity
monthly acceptance capacity
std::vector< int > cycpp_shape_longitude
double SpaceAvailable() const
determines the amount to request
std::vector< int > cycpp_shape_capacity
virtual std::string schema()
virtual cyclus::Inventories SnapshotInv()
std::vector< int > cycpp_shape_random_size_mean
double max_inv_size
max inventory size
virtual std::set< cyclus::RequestPortfolio< cyclus::Product >::Ptr > GetGenRsrcRequests()
SinkFacilities request Products of their given commodity.
virtual void Snapshot(cyclus::DbInit di)
std::vector< int > cycpp_shape_random_size_type
virtual void SetNextBuyTime()
SinkFacilities update request time using random behavior.
virtual void AcceptGenRsrcTrades(const std::vector< std::pair< cyclus::Trade< cyclus::Product >, cyclus::Product::Ptr > > &responses)
SinkFacilities place accepted trade Materials in their Inventory.
virtual std::string str()
virtual void InfileToDb(cyclus::InfileTree *tree, cyclus::DbInit di)
std::vector< int > cycpp_shape_random_size_stddev
std::vector< int > cycpp_shape_inventory
std::vector< int > cycpp_shape_random_frequency_min
virtual cyclus::Agent * Clone()
std::vector< int > cycpp_shape_recipe_name
std::vector< int > cycpp_shape_max_inv_size
cyclus::Agent * ConstructSink(cyclus::Context *ctx)
cyclus::toolkit::Position coordinates