285 cyclus::Facility::InfileToDb(tree, di);
286 int rawcycpp_shape_latitude[1] = {-1};
287 cycpp_shape_latitude = std::vector<int>(rawcycpp_shape_latitude, rawcycpp_shape_latitude + 1);
288 int rawcycpp_shape_longitude[1] = {-1};
289 cycpp_shape_longitude = std::vector<int>(rawcycpp_shape_longitude, rawcycpp_shape_longitude + 1);
290 int rawcycpp_shape_in_commods[2] = {-1, -1};
292 int rawcycpp_shape_in_commod_prefs[2] = {-1, -1};
294 int rawcycpp_shape_recipe_name[1] = {-1};
296 int rawcycpp_shape_max_inv_size[1] = {-1};
298 int rawcycpp_shape_capacity[1] = {-1};
300 int rawcycpp_shape_inventory[2] = {-1, -1};
302 int rawcycpp_shape_random_size_type[1] = {-1};
304 int rawcycpp_shape_random_size_mean[1] = {-1};
306 int rawcycpp_shape_random_size_stddev[1] = {-1};
308 int rawcycpp_shape_random_frequency_type[1] = {-1};
310 int rawcycpp_shape_random_frequency_mean[1] = {-1};
312 int rawcycpp_shape_random_frequency_stddev[1] = {-1};
314 int rawcycpp_shape_random_frequency_min[1] = {-1};
316 int rawcycpp_shape_random_frequency_max[1] = {-1};
318 int rawcycpp_shape_keep_packaging[1] = {-1};
320 cyclus::InfileTree* sub = tree->SubTree(
"config/*");
323 if (sub->NMatches(
"latitude") > 0) {
325 double latitude_val = cyclus::Query<double>(sub,
"latitude");
326 latitude = latitude_val;
329 double latitude_tmp = 0.0;
330 latitude = latitude_tmp;
332 if (sub->NMatches(
"longitude") > 0) {
334 double longitude_val = cyclus::Query<double>(sub,
"longitude");
335 longitude = longitude_val;
338 double longitude_tmp = 0.0;
339 longitude = longitude_tmp;
342 cyclus::InfileTree* bub = sub->SubTree(
"in_commods", 0);
343 cyclus::InfileTree* sub = bub;
344 int n1 = sub->NMatches(
"val");
345 std::vector< std::string > in_commods_val;
346 in_commods_val.resize(n1);
347 for (
int i1 = 0; i1 < n1; ++i1) {
350 std::string elem_in = cyclus::Query<std::string>(sub,
"val", i1);
353 in_commods_val[i1] = elem;
357 if (sub->NMatches(
"in_commod_prefs") > 0) {
359 cyclus::InfileTree* bub = sub->SubTree(
"in_commod_prefs", 0);
360 cyclus::InfileTree* sub = bub;
361 int n1 = sub->NMatches(
"val");
362 std::vector< double > in_commod_prefs_val;
363 in_commod_prefs_val.resize(n1);
364 for (
int i1 = 0; i1 < n1; ++i1) {
367 double elem_in = cyclus::Query<double>(sub,
"val", i1);
370 in_commod_prefs_val[i1] = elem;
375 std::vector< double > in_commod_prefs_tmp;
376 in_commod_prefs_tmp.resize(0);
381 if (sub->NMatches(
"recipe_name") > 0) {
383 std::string recipe_name_val = cyclus::Query<std::string>(sub,
"recipe_name");
387 std::string recipe_name_tmp(
"");
390 if (sub->NMatches(
"max_inv_size") > 0) {
392 double max_inv_size_val = cyclus::Query<double>(sub,
"max_inv_size");
396 double max_inv_size_tmp = 1e+299;
399 if (sub->NMatches(
"capacity") > 0) {
401 double capacity_val = cyclus::Query<double>(sub,
"capacity");
405 double capacity_tmp = 1e+299;
408 if (sub->NMatches(
"random_size_type") > 0) {
410 std::string random_size_type_val = cyclus::Query<std::string>(sub,
"random_size_type");
414 std::string random_size_type_tmp(
"None");
417 if (sub->NMatches(
"random_size_mean") > 0) {
419 double random_size_mean_val = cyclus::Query<double>(sub,
"random_size_mean");
423 double random_size_mean_tmp = 1.0;
426 if (sub->NMatches(
"random_size_stddev") > 0) {
428 double random_size_stddev_val = cyclus::Query<double>(sub,
"random_size_stddev");
432 double random_size_stddev_tmp = 0.1;
435 if (sub->NMatches(
"random_frequency_type") > 0) {
437 std::string random_frequency_type_val = cyclus::Query<std::string>(sub,
"random_frequency_type");
441 std::string random_frequency_type_tmp(
"None");
444 if (sub->NMatches(
"random_frequency_mean") > 0) {
446 double random_frequency_mean_val = cyclus::Query<double>(sub,
"random_frequency_mean");
450 double random_frequency_mean_tmp = 1;
453 if (sub->NMatches(
"random_frequency_stddev") > 0) {
455 double random_frequency_stddev_val = cyclus::Query<double>(sub,
"random_frequency_stddev");
459 double random_frequency_stddev_tmp = 1;
462 if (sub->NMatches(
"random_frequency_min") > 0) {
464 int random_frequency_min_val = cyclus::Query<int>(sub,
"random_frequency_min");
468 int random_frequency_min_tmp = 1;
471 if (sub->NMatches(
"random_frequency_max") > 0) {
473 int random_frequency_max_val = cyclus::Query<int>(sub,
"random_frequency_max");
477 int random_frequency_max_tmp = 2147483647;
480 if (sub->NMatches(
"keep_packaging") > 0) {
482 bool keep_packaging_val = cyclus::Query<bool>(sub,
"keep_packaging");
486 bool keep_packaging_tmp =
true;
490 ->AddVal(
"latitude", latitude, &cycpp_shape_latitude)
491 ->AddVal(
"longitude", longitude, &cycpp_shape_longitude)
554 cyclus::Facility::InitFrom(b);
555 int rawcycpp_shape_latitude[1] = {-1};
556 cycpp_shape_latitude = std::vector<int>(rawcycpp_shape_latitude, rawcycpp_shape_latitude + 1);
557 int rawcycpp_shape_longitude[1] = {-1};
558 cycpp_shape_longitude = std::vector<int>(rawcycpp_shape_longitude, rawcycpp_shape_longitude + 1);
559 int rawcycpp_shape_in_commods[2] = {-1, -1};
561 int rawcycpp_shape_in_commod_prefs[2] = {-1, -1};
563 int rawcycpp_shape_recipe_name[1] = {-1};
565 int rawcycpp_shape_max_inv_size[1] = {-1};
567 int rawcycpp_shape_capacity[1] = {-1};
569 int rawcycpp_shape_inventory[2] = {-1, -1};
571 int rawcycpp_shape_random_size_type[1] = {-1};
573 int rawcycpp_shape_random_size_mean[1] = {-1};
575 int rawcycpp_shape_random_size_stddev[1] = {-1};
577 int rawcycpp_shape_random_frequency_type[1] = {-1};
579 int rawcycpp_shape_random_frequency_mean[1] = {-1};
581 int rawcycpp_shape_random_frequency_stddev[1] = {-1};
583 int rawcycpp_shape_random_frequency_min[1] = {-1};
585 int rawcycpp_shape_random_frequency_max[1] = {-1};
587 int rawcycpp_shape_keep_packaging[1] = {-1};
589 cyclus::QueryResult qr = b->Query(
"Info", NULL);
590 latitude = qr.GetVal<
double>(
"latitude");
591 longitude = qr.GetVal<
double>(
"longitude");
592 in_commods = qr.GetVal<std::vector< std::string > >(
"in_commods");
593 in_commod_prefs = qr.GetVal<std::vector< double > >(
"in_commod_prefs");
594 recipe_name = qr.GetVal<std::string>(
"recipe_name");
596 capacity = qr.GetVal<
double>(
"capacity");
611 cyclus::Facility::InitFrom(m);
612 int rawcycpp_shape_latitude[1] = {-1};
613 cycpp_shape_latitude = std::vector<int>(rawcycpp_shape_latitude, rawcycpp_shape_latitude + 1);
614 int rawcycpp_shape_longitude[1] = {-1};
615 cycpp_shape_longitude = std::vector<int>(rawcycpp_shape_longitude, rawcycpp_shape_longitude + 1);
616 int rawcycpp_shape_in_commods[2] = {-1, -1};
618 int rawcycpp_shape_in_commod_prefs[2] = {-1, -1};
620 int rawcycpp_shape_recipe_name[1] = {-1};
622 int rawcycpp_shape_max_inv_size[1] = {-1};
624 int rawcycpp_shape_capacity[1] = {-1};
626 int rawcycpp_shape_inventory[2] = {-1, -1};
628 int rawcycpp_shape_random_size_type[1] = {-1};
630 int rawcycpp_shape_random_size_mean[1] = {-1};
632 int rawcycpp_shape_random_size_stddev[1] = {-1};
634 int rawcycpp_shape_random_frequency_type[1] = {-1};
636 int rawcycpp_shape_random_frequency_mean[1] = {-1};
638 int rawcycpp_shape_random_frequency_stddev[1] = {-1};
640 int rawcycpp_shape_random_frequency_min[1] = {-1};
642 int rawcycpp_shape_random_frequency_max[1] = {-1};
644 int rawcycpp_shape_keep_packaging[1] = {-1};
646 latitude = m->latitude;
647 longitude = m->longitude;