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"
140 cyclus::Facility::InitFrom(m);
141 int rawcycpp_shape_feed_commod[1] = {-1};
143 int rawcycpp_shape_feed_recipe[1] = {-1};
145 int rawcycpp_shape_product_commod[1] = {-1};
147 int rawcycpp_shape_tails_commod[1] = {-1};
149 int rawcycpp_shape_tails_assay[1] = {-1};
151 int rawcycpp_shape_initial_feed[1] = {-1};
153 int rawcycpp_shape_max_feed_inventory[1] = {-1};
155 int rawcycpp_shape_max_enrich[1] = {-1};
157 int rawcycpp_shape_order_prefs[1] = {-1};
159 int rawcycpp_shape_swu_capacity[1] = {-1};
161 int rawcycpp_shape_inventory[2] = {-1, -1};
163 int rawcycpp_shape_tails[2] = {-1, -1};
164 cycpp_shape_tails = std::vector<int>(rawcycpp_shape_tails, rawcycpp_shape_tails + 2);
165 int rawcycpp_shape_latitude[1] = {-1};
167 int rawcycpp_shape_longitude[1] = {-1};
184#line 170 "/cycamore/src/enrichment.h"
186 virtual void InitFrom(cyclus::QueryableBackend* b) {
187 cyclus::Facility::InitFrom(b);
188 int rawcycpp_shape_feed_commod[1] = {-1};
190 int rawcycpp_shape_feed_recipe[1] = {-1};
192 int rawcycpp_shape_product_commod[1] = {-1};
194 int rawcycpp_shape_tails_commod[1] = {-1};
196 int rawcycpp_shape_tails_assay[1] = {-1};
198 int rawcycpp_shape_initial_feed[1] = {-1};
200 int rawcycpp_shape_max_feed_inventory[1] = {-1};
202 int rawcycpp_shape_max_enrich[1] = {-1};
204 int rawcycpp_shape_order_prefs[1] = {-1};
206 int rawcycpp_shape_swu_capacity[1] = {-1};
208 int rawcycpp_shape_inventory[2] = {-1, -1};
210 int rawcycpp_shape_tails[2] = {-1, -1};
211 cycpp_shape_tails = std::vector<int>(rawcycpp_shape_tails, rawcycpp_shape_tails + 2);
212 int rawcycpp_shape_latitude[1] = {-1};
214 int rawcycpp_shape_longitude[1] = {-1};
216 cyclus::QueryResult qr = b->Query(
"Info", NULL);
217 feed_commod = qr.GetVal<std::string>(
"feed_commod");
218 feed_recipe = qr.GetVal<std::string>(
"feed_recipe");
227 latitude = qr.GetVal<
double>(
"latitude");
228 longitude = qr.GetVal<
double>(
"longitude");
230 tails.capacity(1e+300);
233 virtual void InfileToDb(cyclus::InfileTree* tree, cyclus::DbInit di) {
234 cyclus::Facility::InfileToDb(tree, di);
235 int rawcycpp_shape_feed_commod[1] = {-1};
237 int rawcycpp_shape_feed_recipe[1] = {-1};
239 int rawcycpp_shape_product_commod[1] = {-1};
241 int rawcycpp_shape_tails_commod[1] = {-1};
243 int rawcycpp_shape_tails_assay[1] = {-1};
245 int rawcycpp_shape_initial_feed[1] = {-1};
247 int rawcycpp_shape_max_feed_inventory[1] = {-1};
249 int rawcycpp_shape_max_enrich[1] = {-1};
251 int rawcycpp_shape_order_prefs[1] = {-1};
253 int rawcycpp_shape_swu_capacity[1] = {-1};
255 int rawcycpp_shape_inventory[2] = {-1, -1};
257 int rawcycpp_shape_tails[2] = {-1, -1};
258 cycpp_shape_tails = std::vector<int>(rawcycpp_shape_tails, rawcycpp_shape_tails + 2);
259 int rawcycpp_shape_latitude[1] = {-1};
261 int rawcycpp_shape_longitude[1] = {-1};
263 cyclus::InfileTree* sub = tree->SubTree(
"config/*");
267 std::string feed_commod_val = cyclus::Query<std::string>(sub,
"feed_commod");
271 std::string feed_recipe_val = cyclus::Query<std::string>(sub,
"feed_recipe");
275 std::string product_commod_val = cyclus::Query<std::string>(sub,
"product_commod");
279 std::string tails_commod_val = cyclus::Query<std::string>(sub,
"tails_commod");
282 if (sub->NMatches(
"tails_assay") > 0) {
284 double tails_assay_val = cyclus::Query<double>(sub,
"tails_assay");
288 double tails_assay_tmp = 0.003;
291 if (sub->NMatches(
"initial_feed") > 0) {
293 double initial_feed_val = cyclus::Query<double>(sub,
"initial_feed");
297 double initial_feed_tmp = 0;
300 if (sub->NMatches(
"max_feed_inventory") > 0) {
302 double max_feed_inventory_val = cyclus::Query<double>(sub,
"max_feed_inventory");
306 double max_feed_inventory_tmp = 1e+299;
309 if (sub->NMatches(
"max_enrich") > 0) {
311 double max_enrich_val = cyclus::Query<double>(sub,
"max_enrich");
315 double max_enrich_tmp = 1.0;
318 if (sub->NMatches(
"order_prefs") > 0) {
320 bool order_prefs_val = cyclus::Query<bool>(sub,
"order_prefs");
324 bool order_prefs_tmp =
true;
327 if (sub->NMatches(
"swu_capacity") > 0) {
329 double swu_capacity_val = cyclus::Query<double>(sub,
"swu_capacity");
333 double swu_capacity_tmp = 1e+299;
336 if (sub->NMatches(
"latitude") > 0) {
338 double latitude_val = cyclus::Query<double>(sub,
"latitude");
342 double latitude_tmp = 0.0;
345 if (sub->NMatches(
"longitude") > 0) {
347 double longitude_val = cyclus::Query<double>(sub,
"longitude");
351 double longitude_tmp = 0.0;
379 " <element name=\"feed_commod\">\n"
380 " <data type=\"string\"/>\n"
382 " <element name=\"feed_recipe\">\n"
383 " <data type=\"string\"/>\n"
385 " <element name=\"product_commod\">\n"
386 " <data type=\"string\"/>\n"
388 " <element name=\"tails_commod\">\n"
389 " <data type=\"string\"/>\n"
392 " <element name=\"tails_assay\">\n"
393 " <data type=\"double\"/>\n"
397 " <element name=\"initial_feed\">\n"
398 " <data type=\"double\"/>\n"
402 " <element name=\"max_feed_inventory\">\n"
403 " <data type=\"double\"/>\n"
407 " <element name=\"max_enrich\">\n"
408 " <data type=\"double\">\n"
409 " <param name=\"minInclusive\">0</param>\n"
410 " <param name=\"maxInclusive\">1</param>\n"
415 " <element name=\"order_prefs\">\n"
416 " <data type=\"boolean\"/>\n"
420 " <element name=\"swu_capacity\">\n"
421 " <data type=\"double\"/>\n"
425 " <element name=\"latitude\">\n"
426 " <data type=\"double\"/>\n"
430 " <element name=\"longitude\">\n"
431 " <data type=\"double\"/>\n"
440 bool parsed_ok = reader.parse(
441 "{\"name\":\"cycamore::Enrichment\",\"entity\":\"facility\""
442 ",\"parents\":[\"cyclus::Facility\",\"cyclus::toolkit::P"
443 "osition\"],\"all_parents\":[\"cyclus::Agent\",\"cyclus::"
444 "Facility\",\"cyclus::Ider\",\"cyclus::StateWrangler\",\""
445 "cyclus::TimeListener\",\"cyclus::Trader\",\"cyclus::to"
446 "olkit::Position\"],\"vars\":{\"feed_commod\":{\"tooltip\""
447 ":\"feed commodity\",\"doc\":\"feed commodity that the "
448 "enrichment facility accepts\",\"uilabel\":\"Feed Commo"
449 "dity\",\"uitype\":\"incommodity\",\"type\":\"std::string\","
450 "\"index\":0,\"shape\":[-"
451 "1],\"alias\":\"feed_commod\"},\"feed_recipe\":{\"tooltip\""
452 ":\"feed recipe\",\"doc\":\"recipe for enrichment "
453 "facility feed commodity\",\"uilabel\":\"Feed Recipe\",\""
454 "uitype\":\"inrecipe\",\"type\":\"std::string\",\"index\":1,"
456 "1],\"alias\":\"feed_recipe\"},\"product_commod\":{\"toolt"
457 "ip\":\"product commodity\",\"doc\":\"product commodity "
458 "that the enrichment facility "
459 "generates\",\"uilabel\":\"Product Commodity\",\"uitype\":"
460 "\"outcommodity\",\"type\":\"std::string\",\"index\":2,\"sha"
462 "1],\"alias\":\"product_commod\"},\"tails_commod\":{\"tool"
463 "tip\":\"tails commodity\",\"doc\":\"tails commodity "
464 "supplied by enrichment facility\",\"uilabel\":\"Tails "
465 "Commodity\",\"uitype\":\"outcommodity\",\"type\":\"std::st"
466 "ring\",\"index\":3,\"shape\":[-"
467 "1],\"alias\":\"tails_commod\"},\"tails_assay\":{\"default"
468 "\":0.003,\"tooltip\":\"tails assay\",\"uilabel\":\"Tails A"
469 "ssay\",\"uitype\":\"range\",\"range\":[0.0,0.003],\"doc\":\""
470 "tails assay from the enrichment process\",\"type\":\"d"
471 "ouble\",\"index\":4,\"shape\":[-"
472 "1],\"alias\":\"tails_assay\"},\"initial_feed\":{\"default"
473 "\":0,\"tooltip\":\"initial uranium reserves "
474 "(kg)\",\"uilabel\":\"Initial Feed "
475 "Inventory\",\"doc\":\"amount of natural uranium stored"
476 " at the enrichment facility at the beginning of "
477 "the simulation (kg)\",\"type\":\"double\",\"index\":5,\"sh"
479 "1],\"alias\":\"initial_feed\"},\"max_feed_inventory\":{\""
480 "default\":1e+299,\"tooltip\":\"max inventory of feed "
481 "material (kg)\",\"uilabel\":\"Maximum Feed Inventory\","
482 "\"uitype\":\"range\",\"range\":[0.0,1e+299],\"doc\":\"maxim"
483 "um total inventory of natural uranium in the "
484 "enrichment facility (kg)\",\"type\":\"double\",\"index\":"
486 "1],\"alias\":\"max_feed_inventory\"},\"max_enrich\":{\"de"
487 "fault\":1.0,\"tooltip\":\"maximum allowed enrichment "
488 "fraction\",\"doc\":\"maximum allowed weight fraction "
489 "of U235 in product\",\"uilabel\":\"Maximum Allowed Enr"
490 "ichment\",\"uitype\":\"range\",\"range\":[0.0,1.0],\"schem"
491 "a\":\"<optional> <element "
492 "name=\\\"max_enrich\\\"> <data "
493 "type=\\\"double\\\"> <param "
494 "name=\\\"minInclusive\\\">0</param> "
495 "<param name=\\\"maxInclusive\\\">1</param>"
496 " </data> </element> </o"
497 "ptional>\",\"type\":\"double\",\"index\":7,\"shape\":[-"
498 "1],\"alias\":\"max_enrich\"},\"order_prefs\":{\"default\":"
499 "1,\"userlevel\":10,\"tooltip\":\"Rank Material Requests"
500 " by U235 Content\",\"uilabel\":\"Prefer feed with "
501 "higher U235 content\",\"doc\":\"turn on preference "
502 "ordering for input material so that EF chooses "
503 "higher U235 content first\",\"type\":\"bool\",\"index\":8"
505 "1],\"alias\":\"order_prefs\"},\"swu_capacity\":{\"default"
506 "\":1e+299,\"tooltip\":\"SWU capacity "
507 "(kgSWU/timestep)\",\"uilabel\":\"SWU Capacity\",\"uitype"
508 "\":\"range\",\"range\":[0.0,1e+299],\"doc\":\"separative "
509 "work unit (SWU) capacity of enrichment facility "
510 "(kgSWU/timestep) \",\"type\":\"double\",\"index\":9,\"shap"
512 "1],\"alias\":\"swu_capacity\"},\"inventory\":{\"capacity\""
513 ":\"max_feed_inventory\",\"type\":[\"cyclus::toolkit::Re"
514 "sBuf\",\"cyclus::Material\"],\"index\":10,\"shape\":[-1,-"
515 "1]},\"tails\":{\"type\":[\"cyclus::toolkit::ResBuf\",\"cy"
516 "clus::Material\"],\"index\":11,\"shape\":[-1,-"
517 "1]},\"latitude\":{\"default\":0.0,\"uilabel\":\"Geographi"
518 "cal latitude in degrees as a "
519 "double\",\"doc\":\"Latitude of the agent's "
520 "geographical position. The value should be "
521 "expressed in degrees as a double.\",\"type\":\"double\""
522 ",\"index\":12,\"shape\":[-"
523 "1],\"alias\":\"latitude\",\"tooltip\":\"latitude\"},\"longi"
524 "tude\":{\"default\":0.0,\"uilabel\":\"Geographical "
525 "longitude in degrees as a double\",\"doc\":\"Longitude"
526 " of the agent's geographical position. The value "
527 "should be expressed in degrees as a double.\",\"type"
528 "\":\"double\",\"index\":13,\"shape\":[-"
529 "1],\"alias\":\"longitude\",\"tooltip\":\"longitude\"}},\"ni"
530 "che\":\"enrichment facility\",\"doc\":\"The Enrichment "
531 "facility is a simple agent that enriches natural "
532 "uranium in a Cyclus simulation. It does not "
533 "explicitly compute the physical enrichment "
534 "process, rather it calculates the SWU required to "
535 "convert a source uranium recipe (i.e. natural "
536 "uranium) into a requested enriched recipe (i.e. 4%"
537 " enriched uranium), given the natural uranium "
538 "inventory constraint and its SWU capacity "
539 "constraint.\\n\\nThe Enrichment facility requests an"
540 " input commodity and associated recipe whose "
541 "quantity is its remaining inventory capacity. All"
542 " facilities trading the same input commodity (even"
543 " with different recipes) will offer materials for "
544 "trade. The Enrichment facility accepts any input "
545 "materials with enrichments less than its tails "
546 "assay, as long as some U235 is present, and "
547 "preference increases with U235 content. If no "
548 "U235 is present in the offered material, the trade"
549 " preference is set to -1 and the material is not "
550 "accepted. Any material components other than U235"
551 " and U238 are sent directly to the tails "
552 "buffer.\\n\\nThe Enrichment facility will bid on any"
553 " request for its output commodity up to the "
554 "maximum allowed enrichment (if not specified, "
555 "default is 100%) It bids on either the request "
556 "quantity, or the maximum quanity allowed by its "
557 "SWU constraint or natural uranium inventory, "
558 "whichever is lower. If multiple output commodities"
559 " with different enrichment levels are requested "
560 "and the facility does not have the SWU or quantity"
561 " capacity to meet all requests, the requests are "
562 "fully, then partially filled in unspecified but "
563 "repeatable order. A request for the product "
564 "commodity without an associated requested enriched"
565 " recipe will not be fulfilled.\\n\\nAccumulated "
566 "tails inventory is offered for trading as a "
567 "specifiable output commodity.\"}", root);
569 throw cyclus::ValueError(
"failed to parse annotations for cycamore::Enrichment.");
574 virtual void InitInv(cyclus::Inventories& inv) {
576 tails.Push(inv[
"tails"]);
581 cyclus::Inventories invs;
585 tails.Push(invs[
"tails"]);
605#line 172 "/cycamore/src/enrichment.h"
608 virtual std::string
str();
613 virtual void Build(cyclus::Agent* parent);
631 virtual std::set<cyclus::RequestPortfolio<cyclus::Material>::Ptr>
642 const std::vector< std::pair<cyclus::Trade<cyclus::Material>,
643 cyclus::Material::Ptr> >& responses);
648 virtual std::set<cyclus::BidPortfolio<cyclus::Material>::Ptr>
658 const std::vector< cyclus::Trade<cyclus::Material> >& trades,
659 std::vector<std::pair<cyclus::Trade<cyclus::Material>,
660 cyclus::Material::Ptr> >& responses);
681 inline const cyclus::toolkit::ResBuf<cyclus::Material>&
Tails()
const {
700 cyclus::Material::Ptr
Offer_(cyclus::Material::Ptr req);
702 cyclus::Material::Ptr
Enrich_(cyclus::Material::Ptr mat,
double qty);
713 #pragma cyclus var { "tooltip": "feed commodity", "doc": "feed commodity that the enrichment facility accepts", "uilabel": "Feed Commodity", "uitype": "incommodity" }
714#line 285 "/cycamore/src/enrichment.h"
717#line 286 "/cycamore/src/enrichment.h"
720 #pragma cyclus var { "tooltip": "feed recipe", "doc": "recipe for enrichment facility feed commodity", "uilabel": "Feed Recipe", "uitype": "inrecipe" }
721#line 293 "/cycamore/src/enrichment.h"
724#line 294 "/cycamore/src/enrichment.h"
727 #pragma cyclus var { "tooltip": "product commodity", "doc": "product commodity that the enrichment facility generates", "uilabel": "Product Commodity", "uitype": "outcommodity" }
728#line 301 "/cycamore/src/enrichment.h"
731#line 302 "/cycamore/src/enrichment.h"
734 #pragma cyclus var { "tooltip": "tails commodity", "doc": "tails commodity supplied by enrichment facility", "uilabel": "Tails Commodity", "uitype": "outcommodity" }
735#line 309 "/cycamore/src/enrichment.h"
738#line 310 "/cycamore/src/enrichment.h"
741 #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", }
742#line 318 "/cycamore/src/enrichment.h"
745#line 319 "/cycamore/src/enrichment.h"
748 #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)" }
749#line 326 "/cycamore/src/enrichment.h"
752#line 327 "/cycamore/src/enrichment.h"
755 #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)" }
756#line 336 "/cycamore/src/enrichment.h"
759#line 337 "/cycamore/src/enrichment.h"
762 #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>' }
763#line 354 "/cycamore/src/enrichment.h"
766#line 355 "/cycamore/src/enrichment.h"
769 #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" }
770#line 364 "/cycamore/src/enrichment.h"
773#line 365 "/cycamore/src/enrichment.h"
776 #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) " }
777#line 375 "/cycamore/src/enrichment.h"
781#line 376 "/cycamore/src/enrichment.h"
785 #pragma cyclus var { 'capacity': 'max_feed_inventory' }
789#line 381 "/cycamore/src/enrichment.h"
790 #pragma cyclus var {}
791 cyclus::toolkit::ResBuf<cyclus::Material>
tails;
794#line 383 "/cycamore/src/enrichment.h"
804 #pragma cyclus var { "default": 0.0, "uilabel": "Geographical latitude in degrees as a double", "doc": "Latitude of the agent's geographical position. The value should " "be expressed in degrees as a double." }
805#line 398 "/cycamore/src/enrichment.h"
808#line 399 "/cycamore/src/enrichment.h"
811 #pragma cyclus var { "default": 0.0, "uilabel": "Geographical longitude in degrees as a double", "doc": "Longitude of the agent's geographical position. The value should " "be expressed in degrees as a double." }
812#line 406 "/cycamore/src/enrichment.h"
816#line 407 "/cycamore/src/enrichment.h"
The Enrichment facility is a simple Agent that enriches natural uranium in a Cyclus simulation.
void RecordPosition()
Records an agent's latitude and longitude to the output db.
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
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_
cyclus::toolkit::Position coordinates
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
std::vector< int > cycpp_shape_longitude
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
std::vector< int > cycpp_shape_latitude
The NatUConverter is a simple Converter class for material to determine the amount of natural uranium...
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
The SWUConverter is a simple Converter class for material to determine the amount of SWU required for...
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