2#line 1 "/cycamore/src/enrichment.h"
3#ifndef CYCAMORE_SRC_ENRICHMENT_H_
4#define CYCAMORE_SRC_ENRICHMENT_H_
11#pragma cyclus exec from cyclus.system import CY_LARGE_DOUBLE, CY_LARGE_INT, CY_NEAR_ZERO
27 cyclus::Material::Ptr m,
28 cyclus::Arc
const * a = NULL,
29 cyclus::ExchangeTranslationContext<cyclus::Material>
30 const * ctx = NULL)
const {
31 cyclus::toolkit::Assays assays(
feed_, cyclus::toolkit::UraniumAssayMass(m),
33 return cyclus::toolkit::SwuRequired(m->quantity(), assays);
39 return cast != NULL &&
63 cyclus::Material::Ptr m,
64 cyclus::Arc
const * a = NULL,
65 cyclus::ExchangeTranslationContext<cyclus::Material>
66 const * ctx = NULL)
const {
67 cyclus::toolkit::Assays assays(
feed_, cyclus::toolkit::UraniumAssayMass(m),
69 cyclus::toolkit::MatQuery mq(m);
70 std::set<cyclus::Nuc> nucs;
71 nucs.insert(922350000);
72 nucs.insert(922380000);
74 double natu_frac = mq.mass_frac(nucs);
75 double natu_req = cyclus::toolkit::FeedQty(m->quantity(), assays);
76 return natu_req / natu_frac;
82 return cast != NULL &&
125 :
public cyclus::Facility,
126 public cyclus::toolkit::Position {
127#pragma cyclus note { "niche": "enrichment facility", "doc": "The Enrichment facility is a simple agent that enriches natural " "uranium in a Cyclus simulation. It does not explicitly compute " "the physical enrichment process, rather it calculates the SWU " "required to convert a source uranium recipe (i.e. natural uranium) " "into a requested enriched recipe (i.e. 4% enriched uranium), given " "the natural uranium inventory constraint and its SWU capacity " "constraint." "\n\n" "The Enrichment facility requests an input commodity and associated " "recipe whose quantity is its remaining inventory capacity. All " "facilities trading the same input commodity (even with different " "recipes) will offer materials for trade. The Enrichment facility " "accepts any input materials with enrichments less than its tails assay, " "as long as some U235 is present, and preference increases with U235 " "content. If no U235 is present in the offered material, the trade " "preference is set to -1 and the material is not accepted. Any material " "components other than U235 and U238 are sent directly to the tails buffer." "\n\n" "The Enrichment facility will bid on any request for its output commodity " "up to the maximum allowed enrichment (if not specified, default is 100%) " "It bids on either the request quantity, or the maximum quanity allowed " "by its SWU constraint or natural uranium inventory, whichever is lower. " "If multiple output commodities with different enrichment levels are " "requested and the facility does not have the SWU or quantity capacity " "to meet all requests, the requests are fully, then partially filled " "in unspecified but repeatable order. A request for the product " "commodity without an associated requested enriched recipe will not be " "fulfilled." "\n\n" "Accumulated tails inventory is offered for trading as a specifiable " "output commodity.", }
128#line 160 "/cycamore/src/enrichment.h"
142 cyclus::Facility::InitFrom(m);
143 int rawcycpp_shape_latitude[1] = {-1};
144 cycpp_shape_latitude = std::vector<int>(rawcycpp_shape_latitude, rawcycpp_shape_latitude + 1);
145 int rawcycpp_shape_longitude[1] = {-1};
146 cycpp_shape_longitude = std::vector<int>(rawcycpp_shape_longitude, rawcycpp_shape_longitude + 1);
147 int rawcycpp_shape_feed_commod[1] = {-1};
149 int rawcycpp_shape_feed_recipe[1] = {-1};
151 int rawcycpp_shape_product_commod[1] = {-1};
153 int rawcycpp_shape_tails_commod[1] = {-1};
155 int rawcycpp_shape_tails_assay[1] = {-1};
157 int rawcycpp_shape_initial_feed[1] = {-1};
159 int rawcycpp_shape_max_feed_inventory[1] = {-1};
161 int rawcycpp_shape_max_enrich[1] = {-1};
163 int rawcycpp_shape_order_prefs[1] = {-1};
165 int rawcycpp_shape_swu_capacity[1] = {-1};
167 int rawcycpp_shape_inventory[2] = {-1, -1};
169 int rawcycpp_shape_tails[2] = {-1, -1};
170 cycpp_shape_tails = std::vector<int>(rawcycpp_shape_tails, rawcycpp_shape_tails + 2);
171 latitude = m->latitude;
172 longitude = m->longitude;
186#line 172 "/cycamore/src/enrichment.h"
188 virtual void InitFrom(cyclus::QueryableBackend* b) {
189 cyclus::Facility::InitFrom(b);
190 int rawcycpp_shape_latitude[1] = {-1};
191 cycpp_shape_latitude = std::vector<int>(rawcycpp_shape_latitude, rawcycpp_shape_latitude + 1);
192 int rawcycpp_shape_longitude[1] = {-1};
193 cycpp_shape_longitude = std::vector<int>(rawcycpp_shape_longitude, rawcycpp_shape_longitude + 1);
194 int rawcycpp_shape_feed_commod[1] = {-1};
196 int rawcycpp_shape_feed_recipe[1] = {-1};
198 int rawcycpp_shape_product_commod[1] = {-1};
200 int rawcycpp_shape_tails_commod[1] = {-1};
202 int rawcycpp_shape_tails_assay[1] = {-1};
204 int rawcycpp_shape_initial_feed[1] = {-1};
206 int rawcycpp_shape_max_feed_inventory[1] = {-1};
208 int rawcycpp_shape_max_enrich[1] = {-1};
210 int rawcycpp_shape_order_prefs[1] = {-1};
212 int rawcycpp_shape_swu_capacity[1] = {-1};
214 int rawcycpp_shape_inventory[2] = {-1, -1};
216 int rawcycpp_shape_tails[2] = {-1, -1};
217 cycpp_shape_tails = std::vector<int>(rawcycpp_shape_tails, rawcycpp_shape_tails + 2);
218 cyclus::QueryResult qr = b->Query(
"Info", NULL);
219 latitude = qr.GetVal<
double>(
"latitude");
220 longitude = qr.GetVal<
double>(
"longitude");
221 feed_commod = qr.GetVal<std::string>(
"feed_commod");
222 feed_recipe = qr.GetVal<std::string>(
"feed_recipe");
232 tails.capacity(1e+300);
235 virtual void InfileToDb(cyclus::InfileTree* tree, cyclus::DbInit di) {
236 cyclus::Facility::InfileToDb(tree, di);
237 int rawcycpp_shape_latitude[1] = {-1};
238 cycpp_shape_latitude = std::vector<int>(rawcycpp_shape_latitude, rawcycpp_shape_latitude + 1);
239 int rawcycpp_shape_longitude[1] = {-1};
240 cycpp_shape_longitude = std::vector<int>(rawcycpp_shape_longitude, rawcycpp_shape_longitude + 1);
241 int rawcycpp_shape_feed_commod[1] = {-1};
243 int rawcycpp_shape_feed_recipe[1] = {-1};
245 int rawcycpp_shape_product_commod[1] = {-1};
247 int rawcycpp_shape_tails_commod[1] = {-1};
249 int rawcycpp_shape_tails_assay[1] = {-1};
251 int rawcycpp_shape_initial_feed[1] = {-1};
253 int rawcycpp_shape_max_feed_inventory[1] = {-1};
255 int rawcycpp_shape_max_enrich[1] = {-1};
257 int rawcycpp_shape_order_prefs[1] = {-1};
259 int rawcycpp_shape_swu_capacity[1] = {-1};
261 int rawcycpp_shape_inventory[2] = {-1, -1};
263 int rawcycpp_shape_tails[2] = {-1, -1};
264 cycpp_shape_tails = std::vector<int>(rawcycpp_shape_tails, rawcycpp_shape_tails + 2);
265 cyclus::InfileTree* sub = tree->SubTree(
"config/*");
268 if (sub->NMatches(
"latitude") > 0) {
270 double latitude_val = cyclus::Query<double>(sub,
"latitude");
271 latitude = latitude_val;
274 double latitude_tmp = 0.0;
275 latitude = latitude_tmp;
277 if (sub->NMatches(
"longitude") > 0) {
279 double longitude_val = cyclus::Query<double>(sub,
"longitude");
280 longitude = longitude_val;
283 double longitude_tmp = 0.0;
284 longitude = longitude_tmp;
287 std::string feed_commod_val = cyclus::Query<std::string>(sub,
"feed_commod");
291 std::string feed_recipe_val = cyclus::Query<std::string>(sub,
"feed_recipe");
295 std::string product_commod_val = cyclus::Query<std::string>(sub,
"product_commod");
299 std::string tails_commod_val = cyclus::Query<std::string>(sub,
"tails_commod");
302 if (sub->NMatches(
"tails_assay") > 0) {
304 double tails_assay_val = cyclus::Query<double>(sub,
"tails_assay");
308 double tails_assay_tmp = 0.003;
311 if (sub->NMatches(
"initial_feed") > 0) {
313 double initial_feed_val = cyclus::Query<double>(sub,
"initial_feed");
317 double initial_feed_tmp = 0;
320 if (sub->NMatches(
"max_feed_inventory") > 0) {
322 double max_feed_inventory_val = cyclus::Query<double>(sub,
"max_feed_inventory");
326 double max_feed_inventory_tmp = 1e+299;
329 if (sub->NMatches(
"max_enrich") > 0) {
331 double max_enrich_val = cyclus::Query<double>(sub,
"max_enrich");
335 double max_enrich_tmp = 1.0;
338 if (sub->NMatches(
"order_prefs") > 0) {
340 bool order_prefs_val = cyclus::Query<bool>(sub,
"order_prefs");
344 bool order_prefs_tmp =
true;
347 if (sub->NMatches(
"swu_capacity") > 0) {
349 double swu_capacity_val = cyclus::Query<double>(sub,
"swu_capacity");
353 double swu_capacity_tmp = 1e+299;
357 ->AddVal(
"latitude", latitude, &cycpp_shape_latitude)
358 ->AddVal(
"longitude", longitude, &cycpp_shape_longitude)
382 " <element name=\"latitude\">\n"
383 " <a:documentation>Latitude of the agent's geographical position. The value should be expressed in degrees as a double.</a:documentation>\n"
384 " <data type=\"double\"/>\n"
388 " <element name=\"longitude\">\n"
389 " <a:documentation>Longitude of the agent's geographical position. The value should be expressed in degrees as a double.</a:documentation>\n"
390 " <data type=\"double\"/>\n"
393 " <element name=\"feed_commod\">\n"
394 " <a:documentation>feed commodity that the enrichment facility accepts</a:documentation>\n"
395 " <data type=\"string\"/>\n"
397 " <element name=\"feed_recipe\">\n"
398 " <a:documentation>recipe for enrichment facility feed commodity</a:documentation>\n"
399 " <data type=\"string\"/>\n"
401 " <element name=\"product_commod\">\n"
402 " <a:documentation>product commodity that the enrichment facility generates</a:documentation>\n"
403 " <data type=\"string\"/>\n"
405 " <element name=\"tails_commod\">\n"
406 " <a:documentation>tails commodity supplied by enrichment facility</a:documentation>\n"
407 " <data type=\"string\"/>\n"
410 " <element name=\"tails_assay\">\n"
411 " <a:documentation>tails assay from the enrichment process</a:documentation>\n"
412 " <data type=\"double\"/>\n"
416 " <element name=\"initial_feed\">\n"
417 " <a:documentation>amount of natural uranium stored at the enrichment facility at the beginning of the simulation (kg)</a:documentation>\n"
418 " <data type=\"double\"/>\n"
422 " <element name=\"max_feed_inventory\">\n"
423 " <a:documentation>maximum total inventory of natural uranium in the enrichment facility (kg)</a:documentation>\n"
424 " <data type=\"double\"/>\n"
428 " <element name=\"max_enrich\">\n"
429 " <data type=\"double\">\n"
430 " <param name=\"minInclusive\">0</param>\n"
431 " <param name=\"maxInclusive\">1</param>\n"
436 " <element name=\"order_prefs\">\n"
437 " <a:documentation>turn on preference ordering for input material so that EF chooses higher U235 content first</a:documentation>\n"
438 " <data type=\"boolean\"/>\n"
442 " <element name=\"swu_capacity\">\n"
443 " <a:documentation>separative work unit (SWU) capacity of enrichment facility (kgSWU/timestep) </a:documentation>\n"
444 " <data type=\"double\"/>\n"
453 bool parsed_ok = reader.parse(
454 "{\"name\":\"cycamore::Enrichment\",\"entity\":\"facility\""
455 ",\"parents\":[\"cyclus::Facility\",\"cyclus::toolkit::P"
456 "osition\"],\"all_parents\":[\"EconomicEntity\",\"cyclus:"
457 ":Agent\",\"cyclus::Facility\",\"cyclus::Ider\",\"cyclus:"
458 ":StateWrangler\",\"cyclus::TimeListener\",\"cyclus::Tr"
459 "ader\",\"cyclus::toolkit::Position\"],\"vars\":{\"latitu"
460 "de\":{\"default\":0.0,\"uilabel\":\"Geographical "
461 "latitude in degrees as a double\",\"doc\":\"Latitude "
462 "of the agent's geographical position. The value "
463 "should be expressed in degrees as a double.\",\"type"
464 "\":\"double\",\"index\":0,\"shape\":[-"
465 "1],\"alias\":\"latitude\",\"tooltip\":\"latitude\"},\"longi"
466 "tude\":{\"default\":0.0,\"uilabel\":\"Geographical "
467 "longitude in degrees as a double\",\"doc\":\"Longitude"
468 " of the agent's geographical position. The value "
469 "should be expressed in degrees as a double.\",\"type"
470 "\":\"double\",\"index\":1,\"shape\":[-"
471 "1],\"alias\":\"longitude\",\"tooltip\":\"longitude\"},\"fee"
472 "d_commod\":{\"tooltip\":\"feed commodity\",\"doc\":\"feed "
473 "commodity that the enrichment facility "
474 "accepts\",\"uilabel\":\"Feed Commodity\",\"uitype\":\"inco"
475 "mmodity\",\"type\":\"std::string\",\"index\":2,\"shape\":[-"
476 "1],\"alias\":\"feed_commod\"},\"feed_recipe\":{\"tooltip\""
477 ":\"feed recipe\",\"doc\":\"recipe for enrichment "
478 "facility feed commodity\",\"uilabel\":\"Feed Recipe\",\""
479 "uitype\":\"inrecipe\",\"type\":\"std::string\",\"index\":3,"
481 "1],\"alias\":\"feed_recipe\"},\"product_commod\":{\"toolt"
482 "ip\":\"product commodity\",\"doc\":\"product commodity "
483 "that the enrichment facility "
484 "generates\",\"uilabel\":\"Product Commodity\",\"uitype\":"
485 "\"outcommodity\",\"type\":\"std::string\",\"index\":4,\"sha"
487 "1],\"alias\":\"product_commod\"},\"tails_commod\":{\"tool"
488 "tip\":\"tails commodity\",\"doc\":\"tails commodity "
489 "supplied by enrichment facility\",\"uilabel\":\"Tails "
490 "Commodity\",\"uitype\":\"outcommodity\",\"type\":\"std::st"
491 "ring\",\"index\":5,\"shape\":[-"
492 "1],\"alias\":\"tails_commod\"},\"tails_assay\":{\"default"
493 "\":0.003,\"tooltip\":\"tails assay\",\"uilabel\":\"Tails A"
494 "ssay\",\"uitype\":\"range\",\"range\":[0.0,0.003],\"doc\":\""
495 "tails assay from the enrichment process\",\"type\":\"d"
496 "ouble\",\"index\":6,\"shape\":[-"
497 "1],\"alias\":\"tails_assay\"},\"initial_feed\":{\"default"
498 "\":0,\"tooltip\":\"initial uranium reserves "
499 "(kg)\",\"uilabel\":\"Initial Feed "
500 "Inventory\",\"doc\":\"amount of natural uranium stored"
501 " at the enrichment facility at the beginning of "
502 "the simulation (kg)\",\"type\":\"double\",\"index\":7,\"sh"
504 "1],\"alias\":\"initial_feed\"},\"max_feed_inventory\":{\""
505 "default\":1e+299,\"tooltip\":\"max inventory of feed "
506 "material (kg)\",\"uilabel\":\"Maximum Feed Inventory\","
507 "\"uitype\":\"range\",\"range\":[0.0,1e+299],\"doc\":\"maxim"
508 "um total inventory of natural uranium in the "
509 "enrichment facility (kg)\",\"type\":\"double\",\"index\":"
511 "1],\"alias\":\"max_feed_inventory\"},\"max_enrich\":{\"de"
512 "fault\":1.0,\"tooltip\":\"maximum allowed enrichment "
513 "fraction\",\"doc\":\"maximum allowed weight fraction "
514 "of U235 in product\",\"uilabel\":\"Maximum Allowed Enr"
515 "ichment\",\"uitype\":\"range\",\"range\":[0.0,1.0],\"schem"
516 "a\":\"<optional> <element "
517 "name=\\\"max_enrich\\\"> <data "
518 "type=\\\"double\\\"> <param "
519 "name=\\\"minInclusive\\\">0</param> "
520 "<param name=\\\"maxInclusive\\\">1</param>"
521 " </data> </element> </o"
522 "ptional>\",\"type\":\"double\",\"index\":9,\"shape\":[-"
523 "1],\"alias\":\"max_enrich\"},\"order_prefs\":{\"default\":"
524 "1,\"userlevel\":10,\"tooltip\":\"Rank Material Requests"
525 " by U235 Content\",\"uilabel\":\"Prefer feed with "
526 "higher U235 content\",\"doc\":\"turn on preference "
527 "ordering for input material so that EF chooses "
528 "higher U235 content first\",\"type\":\"bool\",\"index\":1"
530 "1],\"alias\":\"order_prefs\"},\"swu_capacity\":{\"default"
531 "\":1e+299,\"tooltip\":\"SWU capacity "
532 "(kgSWU/timestep)\",\"uilabel\":\"SWU Capacity\",\"uitype"
533 "\":\"range\",\"range\":[0.0,1e+299],\"doc\":\"separative "
534 "work unit (SWU) capacity of enrichment facility "
535 "(kgSWU/timestep) \",\"type\":\"double\",\"index\":11,\"sha"
537 "1],\"alias\":\"swu_capacity\"},\"inventory\":{\"capacity\""
538 ":\"max_feed_inventory\",\"type\":[\"cyclus::toolkit::Re"
539 "sBuf\",\"cyclus::Material\"],\"index\":12,\"shape\":[-1,-"
540 "1]},\"tails\":{\"type\":[\"cyclus::toolkit::ResBuf\",\"cy"
541 "clus::Material\"],\"index\":13,\"shape\":[-1,-"
542 "1]}},\"niche\":\"enrichment facility\",\"doc\":\"The "
543 "Enrichment facility is a simple agent that "
544 "enriches natural uranium in a Cyclus simulation. "
545 "It does not explicitly compute the physical "
546 "enrichment process, rather it calculates the SWU "
547 "required to convert a source uranium recipe (i.e. "
548 "natural uranium) into a requested enriched recipe "
549 "(i.e. 4% enriched uranium), given the natural "
550 "uranium inventory constraint and its SWU capacity "
551 "constraint.\\n\\nThe Enrichment facility requests an"
552 " input commodity and associated recipe whose "
553 "quantity is its remaining inventory capacity. All"
554 " facilities trading the same input commodity (even"
555 " with different recipes) will offer materials for "
556 "trade. The Enrichment facility accepts any input "
557 "materials with enrichments less than its tails "
558 "assay, as long as some U235 is present, and "
559 "preference increases with U235 content. If no "
560 "U235 is present in the offered material, the trade"
561 " preference is set to -1 and the material is not "
562 "accepted. Any material components other than U235"
563 " and U238 are sent directly to the tails "
564 "buffer.\\n\\nThe Enrichment facility will bid on any"
565 " request for its output commodity up to the "
566 "maximum allowed enrichment (if not specified, "
567 "default is 100%) It bids on either the request "
568 "quantity, or the maximum quanity allowed by its "
569 "SWU constraint or natural uranium inventory, "
570 "whichever is lower. If multiple output commodities"
571 " with different enrichment levels are requested "
572 "and the facility does not have the SWU or quantity"
573 " capacity to meet all requests, the requests are "
574 "fully, then partially filled in unspecified but "
575 "repeatable order. A request for the product "
576 "commodity without an associated requested enriched"
577 " recipe will not be fulfilled.\\n\\nAccumulated "
578 "tails inventory is offered for trading as a "
579 "specifiable output commodity.\"}", root);
581 throw cyclus::ValueError(
"failed to parse annotations for cycamore::Enrichment.");
586 virtual void InitInv(cyclus::Inventories& inv) {
588 tails.Push(inv[
"tails"]);
593 cyclus::Inventories invs;
597 tails.Push(invs[
"tails"]);
603 ->AddVal(
"latitude", latitude, &cycpp_shape_latitude)
604 ->AddVal(
"longitude", longitude, &cycpp_shape_longitude)
617#line 174 "/cycamore/src/enrichment.h"
620 virtual std::string
str();
625 virtual void Build(cyclus::Agent* parent);
643 virtual std::set<cyclus::RequestPortfolio<cyclus::Material>::Ptr>
654 const std::vector< std::pair<cyclus::Trade<cyclus::Material>,
655 cyclus::Material::Ptr> >& responses);
660 virtual std::set<cyclus::BidPortfolio<cyclus::Material>::Ptr>
670 const std::vector< cyclus::Trade<cyclus::Material> >& trades,
671 std::vector<std::pair<cyclus::Trade<cyclus::Material>,
672 cyclus::Material::Ptr> >& responses);
693 inline const cyclus::toolkit::ResBuf<cyclus::Material>&
Tails()
const {
699 #include "toolkit/position.cycpp.h"
715 cyclus::Material::Ptr
Offer_(cyclus::Material::Ptr req);
717 cyclus::Material::Ptr
Enrich_(cyclus::Material::Ptr mat,
double qty);
725 #pragma cyclus var { "tooltip": "feed commodity", "doc": "feed commodity that the enrichment facility accepts", "uilabel": "Feed Commodity", "uitype": "incommodity" }
726#line 287 "/cycamore/src/enrichment.h"
729#line 288 "/cycamore/src/enrichment.h"
732 #pragma cyclus var { "tooltip": "feed recipe", "doc": "recipe for enrichment facility feed commodity", "uilabel": "Feed Recipe", "uitype": "inrecipe" }
733#line 295 "/cycamore/src/enrichment.h"
736#line 296 "/cycamore/src/enrichment.h"
739 #pragma cyclus var { "tooltip": "product commodity", "doc": "product commodity that the enrichment facility generates", "uilabel": "Product Commodity", "uitype": "outcommodity" }
740#line 303 "/cycamore/src/enrichment.h"
743#line 304 "/cycamore/src/enrichment.h"
746 #pragma cyclus var { "tooltip": "tails commodity", "doc": "tails commodity supplied by enrichment facility", "uilabel": "Tails Commodity", "uitype": "outcommodity" }
747#line 311 "/cycamore/src/enrichment.h"
750#line 312 "/cycamore/src/enrichment.h"
753 #pragma cyclus var { "default": 0.003, "tooltip": "tails assay", "uilabel": "Tails Assay", "uitype": "range", "range": [0.0, 0.003], "doc": "tails assay from the enrichment process", }
754#line 320 "/cycamore/src/enrichment.h"
757#line 321 "/cycamore/src/enrichment.h"
760 #pragma cyclus var { "default": 0, "tooltip": "initial uranium reserves (kg)", "uilabel": "Initial Feed Inventory", "doc": "amount of natural uranium stored at the enrichment " "facility at the beginning of the simulation (kg)" }
761#line 328 "/cycamore/src/enrichment.h"
764#line 329 "/cycamore/src/enrichment.h"
767 #pragma cyclus var { "default": CY_LARGE_DOUBLE, "tooltip": "max inventory of feed material (kg)", "uilabel": "Maximum Feed Inventory", "uitype": "range", "range": [0.0, CY_LARGE_DOUBLE], "doc": "maximum total inventory of natural uranium in " "the enrichment facility (kg)" }
768#line 338 "/cycamore/src/enrichment.h"
771#line 339 "/cycamore/src/enrichment.h"
774 #pragma cyclus var { "default": 1.0, "tooltip": "maximum allowed enrichment fraction", "doc": "maximum allowed weight fraction of U235 in product", "uilabel": "Maximum Allowed Enrichment", "uitype": "range", "range": [0.0,1.0], "schema": '<optional>' ' <element name="max_enrich">' ' <data type="double">' ' <param name="minInclusive">0</param>' ' <param name="maxInclusive">1</param>' ' </data>' ' </element>' ' </optional>' }
775#line 356 "/cycamore/src/enrichment.h"
778#line 357 "/cycamore/src/enrichment.h"
781 #pragma cyclus var { "default": 1, "userlevel": 10, "tooltip": "Rank Material Requests by U235 Content", "uilabel": "Prefer feed with higher U235 content", "doc": "turn on preference ordering for input material " "so that EF chooses higher U235 content first" }
782#line 366 "/cycamore/src/enrichment.h"
785#line 367 "/cycamore/src/enrichment.h"
788 #pragma cyclus var { "default": CY_LARGE_DOUBLE, "tooltip": "SWU capacity (kgSWU/timestep)", "uilabel": "SWU Capacity", "uitype": "range", "range": [0.0, CY_LARGE_DOUBLE], "doc": "separative work unit (SWU) capacity of enrichment " "facility (kgSWU/timestep) " }
789#line 377 "/cycamore/src/enrichment.h"
793#line 378 "/cycamore/src/enrichment.h"
797 #pragma cyclus var { 'capacity': 'max_feed_inventory' }
801#line 383 "/cycamore/src/enrichment.h"
802 #pragma cyclus var {}
803 cyclus::toolkit::ResBuf<cyclus::Material>
tails;
806#line 385 "/cycamore/src/enrichment.h"
The Enrichment facility is a simple Agent that enriches natural uranium in a Cyclus simulation.
cyclus::Material::Ptr Request_()
generates a request for this facility given its current state.
void SwuCapacity(double capacity)
double current_swu_capacity
cyclus::Material::Ptr Enrich_(cyclus::Material::Ptr mat, double qty)
cyclus::Material::Ptr Offer_(cyclus::Material::Ptr req)
Generates a material offer for a given request.
std::vector< int > cycpp_shape_max_enrich
std::string product_commod
virtual void EnterNotify()
std::vector< int > cycpp_shape_tails
virtual std::set< cyclus::RequestPortfolio< cyclus::Material >::Ptr > GetMatlRequests()
The Enrichment request Materials of its given commodity.
void SetMaxInventorySize(double size)
std::vector< int > cycpp_shape_initial_feed
virtual void InitFrom(cyclus::QueryableBackend *b)
virtual void InfileToDb(cyclus::InfileTree *tree, cyclus::DbInit di)
const cyclus::toolkit::ResBuf< cyclus::Material > & Tails() const
virtual void InitInv(cyclus::Inventories &inv)
virtual void Tock()
Each facility is prompted to its end-of-time-step stuff on the tock of the timer.
cyclus::toolkit::ResBuf< cyclus::Material > tails
virtual void Snapshot(cyclus::DbInit di)
bool ValidReq(const cyclus::Material::Ptr mat)
Determines if a particular material is a valid request to respond to.
double intra_timestep_swu_
virtual ~Enrichment()
Destructor for the Enrichment class.
virtual cyclus::Inventories SnapshotInv()
virtual void AdjustMatlPrefs(cyclus::PrefMap< cyclus::Material >::type &prefs)
The Enrichment adjusts preferences for offers of natural uranium it has received to maximize U-235 co...
virtual cyclus::Agent * Clone()
double SwuCapacity() const
virtual std::string str()
Print information about this agent.
virtual void AcceptMatlTrades(const std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &responses)
The Enrichment place accepted trade Materials in their Inventory.
double FeedAssay()
calculates the feed assay based on the unenriched inventory
std::vector< int > cycpp_shape_tails_commod
virtual std::set< cyclus::BidPortfolio< cyclus::Material >::Ptr > GetMatlBids(cyclus::CommodMap< cyclus::Material >::type &commod_requests)
Responds to each request for this facility's commodity.
virtual void Tick()
Each facility is prompted to do its beginning-of-time-step stuff at the tick of the timer.
std::vector< int > cycpp_shape_feed_recipe
std::vector< int > cycpp_shape_feed_commod
void RecordEnrichment_(double natural_u, double swu)
records and enrichment with the cyclus::Recorder
virtual Json::Value annotations()
virtual std::string version()
std::vector< int > cycpp_shape_order_prefs
double intra_timestep_feed_
Enrichment(cyclus::Context *ctx)
Constructor for the Enrichment class.
std::vector< int > cycpp_shape_max_feed_inventory
virtual void InitFrom(cycamore::Enrichment *m)
std::vector< int > cycpp_shape_product_commod
cyclus::toolkit::ResBuf< cyclus::Material > inventory
std::vector< int > cycpp_shape_tails_assay
std::vector< int > cycpp_shape_inventory
friend class EnrichmentTest
virtual void GetMatlTrades(const std::vector< cyclus::Trade< cyclus::Material > > &trades, std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &responses)
respond to each trade with a material enriched to the appropriate level given this facility's invento...
virtual std::string schema()
virtual void Build(cyclus::Agent *parent)
perform module-specific tasks when entering the simulation
double max_feed_inventory
void AddMat_(cyclus::Material::Ptr mat)
adds a material into the natural uranium inventory
std::vector< int > cycpp_shape_swu_capacity
virtual std::string version()
virtual bool operator==(Converter &other) const
NatUConverter(double feed_commod, double tails)
virtual double convert(cyclus::Material::Ptr m, cyclus::Arc const *a=NULL, cyclus::ExchangeTranslationContext< cyclus::Material > const *ctx=NULL) const
provides a conversion for the amount of natural Uranium required
virtual double convert(cyclus::Material::Ptr m, cyclus::Arc const *a=NULL, cyclus::ExchangeTranslationContext< cyclus::Material > const *ctx=NULL) const
provides a conversion for the SWU required
SWUConverter(double feed_commod, double tails)
virtual bool operator==(Converter &other) const