1#ifndef CYCAMORE_SRC_MIXER_H_
2#define CYCAMORE_SRC_MIXER_H_
8#pragma cyclus exec from cyclus.system import CY_LARGE_DOUBLE, CY_LARGE_INT, CY_NEAR_ZERO
18 :
public cyclus::Facility,
19 public cyclus::toolkit::Position {
20#pragma cyclus note { \
21 "niche": "mixing facility", \
22 "doc": "Mixer mixes N streams with fixed, static, user-specified" \
23 " ratios into a single output stream. The Mixer has N input"\
24 " inventories: one for each streams to be mixed, and one output"\
25 " stream. The supplying of mixed material is constrained by "\
26 " available inventory of mixed material quantities.", \
40 const std::vector<std::pair<cyclus::Trade<cyclus::Material>,
41 cyclus::Material::Ptr> >& responses);
43 virtual std::set<cyclus::RequestPortfolio<cyclus::Material>::Ptr>
47#pragma cyclus initfromcopy
48#pragma cyclus infiletodb
49#pragma cyclus initfromdb
51#pragma cyclus annotations
52#pragma cyclus snapshot
60 virtual void InitInv(cyclus::Inventories& inv);
64 "alias": ["in_streams", [ "stream", [ "info", "mixing_ratio", "buf_size"], [ "commodities", "commodity", "pref"]]], \
65 "uitype": ["oneormore", [ "pair", ["pair", "double", "double"], ["oneormore", "incommodity", "double"]]], \
69 std::vector<std::pair<std::pair<double, double>, std::map<std::string, double> > >
streams_;
71 std::vector<std::map<std::string, double> >
in_commods;
77 std::map<std::string, cyclus::toolkit::ResBuf<cyclus::Material> >
streambufs;
81 "doc" : "Commodity on which to offer/supply mixed fuel material.", \
82 "uilabel" : "Output Commodity", "uitype" : "outcommodity", }
86 "doc" : "Maximum amount of mixed material that can be stored." \
87 " If full, the facility halts operation until space becomes" \
89 "uilabel": "Maximum Leftover Inventory", \
90 "default": CY_LARGE_DOUBLE, \
92 "range": [0.0, CY_LARGE_DOUBLE], \
97#pragma cyclus var { "capacity" : "out_buf_size", }
98 cyclus::toolkit::ResBuf<cyclus::Material>
output;
100#pragma cyclus var { \
101 "default": CY_LARGE_DOUBLE, \
102 "doc": "Maximum number of kg of fuel material that can be mixed per time step.", \
103 "uilabel": "Maximum Throughput", \
105 "range": [0.0, CY_LARGE_DOUBLE], \
118 #pragma cyclus var { \
120 "uilabel": "Geographical latitude in degrees as a double", \
121 "doc": "Latitude of the agent's geographical position. The value should " \
122 "be expressed in degrees as a double." \
126 #pragma cyclus var { \
128 "uilabel": "Geographical longitude in degrees as a double", \
129 "doc": "Longitude of the agent's geographical position. The value should " \
130 "be expressed in degrees as a double." \
std::map< std::string, cyclus::toolkit::ResBuf< cyclus::Material > > streambufs
std::map< cyclus::Request< cyclus::Material > *, std::string > req_inventories_
std::vector< double > mixing_ratios
void RecordPosition()
Records an agent's latitude and longitude to the output db.
virtual void AcceptMatlTrades(const std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &responses)
cyclus::toolkit::MatlSellPolicy sell_policy
virtual void InitInv(cyclus::Inventories &inv)
Mixer(cyclus::Context *ctx)
cyclus::toolkit::Position coordinates
virtual std::set< cyclus::RequestPortfolio< cyclus::Material >::Ptr > GetMatlRequests()
cyclus::toolkit::ResBuf< cyclus::Material > output
std::vector< std::map< std::string, double > > in_commods
std::vector< double > in_buf_sizes
virtual void EnterNotify()
virtual cyclus::Inventories SnapshotInv()
std::vector< std::pair< std::pair< double, double >, std::map< std::string, double > > > streams_