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.
|
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 437 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 574 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.
|
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 cycamore::EnrichmentTest::DoRequest(), and 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 669 of file build/cycamore/enrichment.h.
References inventory, and max_feed_inventory.
Referenced by cycamore::EnrichmentTest::SetUpSource().
|
inline |
Definition at line 235 of file src/enrichment.h.
References inventory, and max_feed_inventory.
|
inlinevirtual |
Definition at line 589 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 580 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 679 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 674 of file build/cycamore/enrichment.h.
References current_swu_capacity, and swu_capacity.
Referenced by cycamore::EnrichmentTest::SetUpSource().
|
inline |
Definition at line 240 of file src/enrichment.h.
References current_swu_capacity, and swu_capacity.
|
inline |
Definition at line 681 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 801 of file build/cycamore/enrichment.h.
|
private |
Definition at line 818 of file build/cycamore/enrichment.h.
|
private |
Definition at line 783 of file build/cycamore/enrichment.h.
Referenced by SwuCapacity(), and Tick().
|
private |
Definition at line 716 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 723 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 751 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 787 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), and InitFrom().
|
private |
Definition at line 807 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 814 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 765 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 758 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 772 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 730 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 779 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 792 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), and InitFrom().
|
private |
Definition at line 744 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 737 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 715 of file build/cycamore/enrichment.h.
Referenced by GetMatlRequests(), InfileToDb(), InitFrom(), InitFrom(), cycamore::EnrichmentTest::SetUpSource(), Snapshot(), str(), and Tock().
|
private |
Definition at line 722 of file build/cycamore/enrichment.h.
Referenced by Build(), InfileToDb(), InitFrom(), InitFrom(), Request_(), cycamore::EnrichmentTest::SetUpSource(), and Snapshot().
|
private |
Definition at line 750 of file build/cycamore/enrichment.h.
Referenced by Build(), InfileToDb(), InitFrom(), InitFrom(), cycamore::EnrichmentTest::SetUpSource(), and Snapshot().
|
private |
Definition at line 799 of file build/cycamore/enrichment.h.
Referenced by Tock().
|
private |
Definition at line 798 of file build/cycamore/enrichment.h.
Referenced by Tock().
|
private |
Definition at line 786 of file build/cycamore/enrichment.h.
Referenced by Build(), FeedAssay(), InitFrom(), InitFrom(), InitInv(), Request_(), SetMaxInventorySize(), and SnapshotInv().
|
private |
Definition at line 806 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), RecordPosition(), and Snapshot().
|
private |
Definition at line 813 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), RecordPosition(), and Snapshot().
|
private |
Definition at line 764 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), cycamore::EnrichmentTest::SetUpSource(), and Snapshot().
|
private |
Definition at line 757 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), SetMaxInventorySize(), and Snapshot().
|
private |
Definition at line 771 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), and Snapshot().
|
private |
Definition at line 729 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), cycamore::EnrichmentTest::SetUpSource(), Snapshot(), and str().
|
private |
Definition at line 778 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), Snapshot(), SwuCapacity(), and SwuCapacity().
|
private |
Definition at line 791 of file build/cycamore/enrichment.h.
Referenced by InitFrom(), InitFrom(), InitInv(), SnapshotInv(), and Tails().
|
private |
Definition at line 743 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), cycamore::EnrichmentTest::SetUpSource(), Snapshot(), and str().
|
private |
Definition at line 736 of file build/cycamore/enrichment.h.
Referenced by InfileToDb(), InitFrom(), InitFrom(), cycamore::EnrichmentTest::SetUpSource(), Snapshot(), and str().