![]() |
CYCAMORE
|
The Enrichment facility is a simple Agent that enriches natural uranium in a Cyclus simulation. More...
#include <enrichment.h>
Public Member Functions | |
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. | |
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. | |
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 content Any offers that have zero U-235 content are not accepted. | |
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 content Any offers that have zero U-235 content are not accepted. | |
virtual Json::Value | annotations () |
virtual void | Build (cyclus::Agent *parent) |
perform module-specific tasks when entering the simulation | |
virtual void | Build (cyclus::Agent *parent) |
perform module-specific tasks when entering the simulation | |
virtual cyclus::Agent * | Clone () |
Enrichment (cyclus::Context *ctx) | |
Constructor for the Enrichment class. | |
Enrichment (cyclus::Context *ctx) | |
Constructor for the Enrichment class. | |
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 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 std::set< cyclus::RequestPortfolio< cyclus::Material >::Ptr > | GetMatlRequests () |
The Enrichment request Materials of its given commodity. | |
virtual std::set< cyclus::RequestPortfolio< cyclus::Material >::Ptr > | GetMatlRequests () |
The Enrichment request Materials of its given commodity. | |
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 inventory | |
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 inventory | |
virtual void | InfileToDb (cyclus::InfileTree *tree, cyclus::DbInit di) |
virtual void | InitFrom (cycamore::Enrichment *m) |
virtual void | InitFrom (cyclus::QueryableBackend *b) |
virtual void | InitInv (cyclus::Inventories &inv) |
virtual std::string | schema () |
void | SetMaxInventorySize (double size) |
void | SetMaxInventorySize (double size) |
virtual void | Snapshot (cyclus::DbInit di) |
virtual cyclus::Inventories | SnapshotInv () |
virtual std::string | str () |
Print information about this agent. | |
virtual std::string | str () |
Print information about this agent. | |
double | SwuCapacity () const |
double | SwuCapacity () const |
void | SwuCapacity (double capacity) |
void | SwuCapacity (double capacity) |
const cyclus::toolkit::ResBuf< cyclus::Material > & | Tails () const |
const cyclus::toolkit::ResBuf< cyclus::Material > & | Tails () const |
virtual void | Tick () |
Each facility is prompted to do its beginning-of-time-step stuff at the tick of the timer. | |
virtual void | Tick () |
Each facility is prompted to do its beginning-of-time-step stuff at the tick of the timer. | |
virtual void | Tock () |
Each facility is prompted to its end-of-time-step stuff on the tock of the timer. | |
virtual void | Tock () |
Each facility is prompted to its end-of-time-step stuff on the tock of the timer. | |
bool | ValidReq (const cyclus::Material::Ptr mat) |
Determines if a particular material is a valid request to respond to. | |
bool | ValidReq (const cyclus::Material::Ptr mat) |
Determines if a particular material is a valid request to respond to. | |
virtual std::string | version () |
virtual std::string | version () |
virtual | ~Enrichment () |
Destructor for the Enrichment class. | |
virtual | ~Enrichment () |
Destructor for the Enrichment class. | |
Private Member Functions | |
void | AddMat_ (cyclus::Material::Ptr mat) |
adds a material into the natural uranium inventory | |
void | AddMat_ (cyclus::Material::Ptr mat) |
adds a material into the natural uranium inventory | |
cyclus::Material::Ptr | Enrich_ (cyclus::Material::Ptr mat, double qty) |
cyclus::Material::Ptr | Enrich_ (cyclus::Material::Ptr mat, double qty) |
double | FeedAssay () |
calculates the feed assay based on the unenriched inventory | |
double | FeedAssay () |
calculates the feed assay based on the unenriched inventory | |
cyclus::Material::Ptr | Offer_ (cyclus::Material::Ptr req) |
Generates a material offer for a given request. | |
cyclus::Material::Ptr | Offer_ (cyclus::Material::Ptr req) |
Generates a material offer for a given request. | |
void | RecordEnrichment_ (double natural_u, double swu) |
records and enrichment with the cyclus::Recorder | |
void | RecordEnrichment_ (double natural_u, double swu) |
records and enrichment with the cyclus::Recorder | |
void | RecordPosition () |
Records an agent's latitude and longitude to the output db. | |
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. | |
cyclus::Material::Ptr | Request_ () |
generates a request for this facility given its current state. | |
Friends | |
class | EnrichmentTest |
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 (ie. natural uranium) into a requested enriched recipe (ie. 4% enriched uranium), given the natural uranium inventory constraint and its SWU capacity constraint.
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 other than U235 and U238 are sent directly to the tails buffer.
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.
The Enrichment facility also offers its tails as an output commodity with no associated recipe. Bids for tails are constrained only by total tails inventory.
Definition at line 124 of file build/cycamore/enrichment.h.
cycamore::Enrichment::Enrichment | ( | cyclus::Context * | ctx | ) |
Constructor for the Enrichment class.
ctx | the cyclus context for access to simulation-wide parameters |
Definition at line 18 of file build/cycamore/enrichment.cc.
References coordinates, feed_commod, feed_recipe, initial_feed, latitude, longitude, max_enrich, order_prefs, product_commod, swu_capacity, tails_assay, and tails_commod.
|
virtual |
Destructor for the Enrichment class.
Definition at line 34 of file build/cycamore/enrichment.cc.
cycamore::Enrichment::Enrichment | ( | cyclus::Context * | ctx | ) |
Constructor for the Enrichment class.
ctx | the cyclus context for access to simulation-wide parameters |
|
virtual |
Destructor for the Enrichment class.
|
virtual |
The Enrichment place accepted trade Materials in their Inventory.
|
virtual |
The Enrichment place accepted trade Materials in their Inventory.
|
private |
adds a material into the natural uranium inventory
if | the material is not the same composition as the feed_recipe |
|
private |
adds a material into the natural uranium inventory
if | the material is not the same composition as the feed_recipe |
|
virtual |
The Enrichment adjusts preferences for offers of natural uranium it has received to maximize U-235 content Any offers that have zero U-235 content are not accepted.
|
virtual |
The Enrichment adjusts preferences for offers of natural uranium it has received to maximize U-235 content Any offers that have zero U-235 content are not accepted.
|
inlinevirtual |
Definition at line 448 of file build/cycamore/enrichment.h.
|
virtual |
perform module-specific tasks when entering the simulation
Definition at line 49 of file build/cycamore/enrichment.cc.
References feed_recipe, initial_feed, inventory, RecordPosition(), and str().
|
virtual |
perform module-specific tasks when entering the simulation
|
inlinevirtual |
Definition at line 370 of file build/cycamore/enrichment.h.
References InitFrom().
|
private |
|
private |
|
private |
calculates the feed assay based on the unenriched inventory
Definition at line 450 of file build/cycamore/enrichment.cc.
References inventory.
Referenced by str().
|
private |
calculates the feed assay based on the unenriched inventory
|
virtual |
Responds to each request for this facility's commodity.
If a given request is more than this facility's inventory or SWU capacity, it will offer its minimum of its capacities.
|
virtual |
Responds to each request for this facility's commodity.
If a given request is more than this facility's inventory or SWU capacity, it will offer its minimum of its capacities.
|
virtual |
The Enrichment request Materials of its given commodity.
Definition at line 82 of file build/cycamore/enrichment.cc.
References feed_commod, and Request_().
|
virtual |
The Enrichment request Materials of its given commodity.
|
virtual |
respond to each trade with a material enriched to the appropriate level given this facility's inventory
trades | all trades in which this trader is the supplier |
responses | a container to populate with responses to each trade |
|
virtual |
respond to each trade with a material enriched to the appropriate level given this facility's inventory
trades | all trades in which this trader is the supplier |
responses | a container to populate with responses to each trade |
|
inlinevirtual |
Definition at line 233 of file build/cycamore/enrichment.h.
References cycpp_shape_feed_commod, cycpp_shape_feed_recipe, cycpp_shape_initial_feed, cycpp_shape_inventory, cycpp_shape_latitude, cycpp_shape_longitude, cycpp_shape_max_enrich, cycpp_shape_max_feed_inventory, cycpp_shape_order_prefs, cycpp_shape_product_commod, cycpp_shape_swu_capacity, cycpp_shape_tails, cycpp_shape_tails_assay, cycpp_shape_tails_commod, feed_commod, feed_recipe, initial_feed, latitude, longitude, max_enrich, max_feed_inventory, order_prefs, product_commod, swu_capacity, tails_assay, and tails_commod.
|
inlinevirtual |
Definition at line 139 of file build/cycamore/enrichment.h.
References cycpp_shape_feed_commod, cycpp_shape_feed_recipe, cycpp_shape_initial_feed, cycpp_shape_inventory, cycpp_shape_latitude, cycpp_shape_longitude, cycpp_shape_max_enrich, cycpp_shape_max_feed_inventory, cycpp_shape_order_prefs, cycpp_shape_product_commod, cycpp_shape_swu_capacity, cycpp_shape_tails, cycpp_shape_tails_assay, cycpp_shape_tails_commod, feed_commod, feed_recipe, initial_feed, inventory, latitude, longitude, max_enrich, max_feed_inventory, order_prefs, product_commod, swu_capacity, tails, tails_assay, and tails_commod.
Referenced by Clone().
|
inlinevirtual |
Definition at line 186 of file build/cycamore/enrichment.h.
References cycpp_shape_feed_commod, cycpp_shape_feed_recipe, cycpp_shape_initial_feed, cycpp_shape_inventory, cycpp_shape_latitude, cycpp_shape_longitude, cycpp_shape_max_enrich, cycpp_shape_max_feed_inventory, cycpp_shape_order_prefs, cycpp_shape_product_commod, cycpp_shape_swu_capacity, cycpp_shape_tails, cycpp_shape_tails_assay, cycpp_shape_tails_commod, feed_commod, feed_recipe, initial_feed, inventory, latitude, longitude, max_enrich, max_feed_inventory, order_prefs, product_commod, swu_capacity, tails, tails_assay, and tails_commod.
|
inlinevirtual |
Definition at line 585 of file build/cycamore/enrichment.h.
|
private |
Generates a material offer for a given request.
The response composition will be comprised only of U235 and U238 at their relative ratio in the requested material. The response quantity will be the same as the requested commodity.
req | the requested material being responded to |
|
private |
Generates a material offer for a given request.
The response composition will be comprised only of U235 and U238 at their relative ratio in the requested material. The response quantity will be the same as the requested commodity.
req | the requested material being responded to |
|
private |
records and enrichment with the cyclus::Recorder
Definition at line 432 of file build/cycamore/enrichment.cc.
|
private |
records and enrichment with the cyclus::Recorder
|
private |
Records an agent's latitude and longitude to the output db.
Definition at line 462 of file build/cycamore/enrichment.cc.
References latitude, and longitude.
Referenced by Build().
|
private |
Records an agent's latitude and longitude to the output db.
References coordinates, current_swu_capacity, EnrichmentTest, feed_commod, feed_recipe, initial_feed, intra_timestep_feed_, intra_timestep_swu_, inventory, latitude, longitude, max_enrich, max_feed_inventory, order_prefs, product_commod, swu_capacity, tails, tails_assay, and tails_commod.
|
private |
generates a request for this facility given its current state.
Quantity of the material will be equal to remaining inventory size.
Definition at line 339 of file build/cycamore/enrichment.cc.
References feed_recipe, and inventory.
Referenced by GetMatlRequests().
|
private |
generates a request for this facility given its current state.
Quantity of the material will be equal to remaining inventory size.
|
inlinevirtual |
Definition at line 376 of file build/cycamore/enrichment.h.
|
inline |
Definition at line 680 of file build/cycamore/enrichment.h.
References inventory, and max_feed_inventory.
|
inline |
Definition at line 235 of file src/enrichment.h.
References inventory, and max_feed_inventory.
|
inlinevirtual |
Definition at line 600 of file build/cycamore/enrichment.h.
References cycpp_shape_feed_commod, cycpp_shape_feed_recipe, cycpp_shape_initial_feed, cycpp_shape_latitude, cycpp_shape_longitude, cycpp_shape_max_enrich, cycpp_shape_max_feed_inventory, cycpp_shape_order_prefs, cycpp_shape_product_commod, cycpp_shape_swu_capacity, cycpp_shape_tails_assay, cycpp_shape_tails_commod, feed_commod, feed_recipe, initial_feed, latitude, longitude, max_enrich, max_feed_inventory, order_prefs, product_commod, swu_capacity, tails_assay, and tails_commod.
|
inlinevirtual |
Definition at line 591 of file build/cycamore/enrichment.h.
|
virtual |
Print information about this agent.
Definition at line 37 of file build/cycamore/enrichment.cc.
References feed_commod, FeedAssay(), product_commod, SwuCapacity(), tails_assay, and tails_commod.
Referenced by Build().
|
virtual |
Print information about this agent.
|
inline |
Definition at line 690 of file build/cycamore/enrichment.h.
References swu_capacity.
|
inline |
Definition at line 245 of file src/enrichment.h.
References swu_capacity.
|
inline |
Definition at line 685 of file build/cycamore/enrichment.h.
References current_swu_capacity, and swu_capacity.
|
inline |
Definition at line 240 of file src/enrichment.h.
References current_swu_capacity, and swu_capacity.
|
inline |
Definition at line 692 of file build/cycamore/enrichment.h.
References tails.
|
inline |
Definition at line 247 of file src/enrichment.h.
References tails.
|
virtual |
Each facility is prompted to do its beginning-of-time-step stuff at the tick of the timer.
time | is the time to perform the tick |
Definition at line 63 of file build/cycamore/enrichment.cc.
References current_swu_capacity, and SwuCapacity().
|
virtual |
Each facility is prompted to do its beginning-of-time-step stuff at the tick of the timer.
time | is the time to perform the tick |
|
virtual |
Each facility is prompted to its end-of-time-step stuff on the tock of the timer.
time | is the time to perform the tock |
Definition at line 69 of file build/cycamore/enrichment.cc.
References feed_commod, intra_timestep_feed_, and intra_timestep_swu_.
|
virtual |
Each facility is prompted to its end-of-time-step stuff on the tock of the timer.
time | is the time to perform the tock |
bool cycamore::Enrichment::ValidReq | ( | const cyclus::Material::Ptr | mat | ) |
Determines if a particular material is a valid request to respond to.
Valid requests must contain U235 and U238 and must have a relative U235-to-U238 ratio less than this facility's tails_assay().
bool cycamore::Enrichment::ValidReq | ( | const cyclus::Material::Ptr | mat | ) |
Determines if a particular material is a valid request to respond to.
Valid requests must contain U235 and U238 and must have a relative U235-to-U238 ratio less than this facility's tails_assay().
|
inlinevirtual |
Definition at line 138 of file build/cycamore/enrichment.h.
References CYCAMORE_VERSION.
|
inlinevirtual |
Definition at line 169 of file src/enrichment.h.
References CYCAMORE_VERSION.
|
friend |
Definition at line 812 of file build/cycamore/enrichment.h.
References EnrichmentTest.
Referenced by EnrichmentTest, and RecordPosition().
|
private |
Definition at line 829 of file build/cycamore/enrichment.h.
Referenced by Enrichment(), and RecordPosition().
|
private |
Definition at line 794 of file build/cycamore/enrichment.h.
Referenced by RecordPosition(), SwuCapacity(), and Tick().
|
private |
Definition at line 727 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 734 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 762 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 798 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), and InitFrom().
|
private |
Definition at line 818 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 825 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 776 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 769 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 783 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 741 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 790 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 803 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), and InitFrom().
|
private |
Definition at line 755 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 748 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 726 of file build/cycamore/enrichment.h.
Referenced by Enrichment(), GetMatlRequests(), InfileToDb(), InitFrom(), InitFrom(), RecordPosition(), Snapshot(), str(), and Tock().
|
private |
Definition at line 733 of file build/cycamore/enrichment.h.
Referenced by Build(), Enrichment(), InfileToDb(), InitFrom(), InitFrom(), RecordPosition(), Request_(), and Snapshot().
|
private |
Definition at line 761 of file build/cycamore/enrichment.h.
Referenced by Build(), Enrichment(), InfileToDb(), InitFrom(), InitFrom(), RecordPosition(), and Snapshot().
|
private |
Definition at line 810 of file build/cycamore/enrichment.h.
Referenced by RecordPosition(), and Tock().
|
private |
Definition at line 809 of file build/cycamore/enrichment.h.
Referenced by RecordPosition(), and Tock().
|
private |
Definition at line 797 of file build/cycamore/enrichment.h.
Referenced by Build(), FeedAssay(), InitFrom(), InitFrom(), InitInv(), RecordPosition(), Request_(), SetMaxInventorySize(), and SnapshotInv().
|
private |
Definition at line 817 of file build/cycamore/enrichment.h.
Referenced by Enrichment(), InfileToDb(), InitFrom(), InitFrom(), RecordPosition(), and Snapshot().
|
private |
Definition at line 824 of file build/cycamore/enrichment.h.
Referenced by Enrichment(), InfileToDb(), InitFrom(), InitFrom(), RecordPosition(), and Snapshot().
|
private |
Definition at line 775 of file build/cycamore/enrichment.h.
Referenced by Enrichment(), InfileToDb(), InitFrom(), InitFrom(), RecordPosition(), and Snapshot().
|
private |
Definition at line 768 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), RecordPosition(), SetMaxInventorySize(), and Snapshot().
|
private |
Definition at line 782 of file build/cycamore/enrichment.h.
Referenced by Enrichment(), InfileToDb(), InitFrom(), InitFrom(), RecordPosition(), and Snapshot().
|
private |
Definition at line 740 of file build/cycamore/enrichment.h.
Referenced by Enrichment(), InfileToDb(), InitFrom(), InitFrom(), RecordPosition(), Snapshot(), and str().
|
private |
Definition at line 789 of file build/cycamore/enrichment.h.
Referenced by Enrichment(), InfileToDb(), InitFrom(), InitFrom(), RecordPosition(), Snapshot(), SwuCapacity(), and SwuCapacity().
|
private |
Definition at line 802 of file build/cycamore/enrichment.h.
Referenced by InitFrom(), InitFrom(), InitInv(), RecordPosition(), SnapshotInv(), and Tails().
|
private |
Definition at line 754 of file build/cycamore/enrichment.h.
Referenced by Enrichment(), InfileToDb(), InitFrom(), InitFrom(), RecordPosition(), Snapshot(), and str().
|
private |
Definition at line 747 of file build/cycamore/enrichment.h.
Referenced by Enrichment(), InfileToDb(), InitFrom(), InitFrom(), RecordPosition(), Snapshot(), and str().