1#ifndef CYCAMORE_SRC_SOURCE_H_
2#define CYCAMORE_SRC_SOURCE_H_
10#pragma cyclus exec from cyclus.system import CY_LARGE_DOUBLE, CY_LARGE_INT, CY_NEAR_ZERO
25class Source :
public cyclus::Facility,
26 public cyclus::toolkit::CommodityProducer,
27 public cyclus::toolkit::Position {
37 #pragma cyclus note { \
38 "doc": "This facility acts as a source of material with a fixed throughput (per\n" \
39 "time step) capacity and a lifetime capacity defined by a total inventory\n" \
40 "size. It offers its material as a single commodity. If a composition\n" \
41 "recipe is specified, it provides that single material composition to\n" \
42 "requesters. If unspecified, the source provides materials with the exact\n" \
43 "requested compositions. The inventory size and throughput both default to\n" \
44 "infinite. Supplies material results in corresponding decrease in\n" \
45 "inventory, and when the inventory size reaches zero, the source can provide\n" \
46 "no more material.\n" \
50 #pragma cyclus def clone
51 #pragma cyclus def schema
52 #pragma cyclus def annotations
53 #pragma cyclus def infiletodb
54 #pragma cyclus def snapshot
55 #pragma cyclus def snapshotinv
56 #pragma cyclus def initinv
60 virtual void InitFrom(cyclus::QueryableBackend* b);
66 virtual std::string
str();
68 virtual std::set<cyclus::BidPortfolio<cyclus::Material>::Ptr>
76 virtual void Build(cyclus::Agent* parent);
79 const std::vector< cyclus::Trade<cyclus::Material> >& trades,
80 std::vector<std::pair<cyclus::Trade<cyclus::Material>,
81 cyclus::Material::Ptr> >& responses);
84 #pragma cyclus var { \
85 "tooltip": "source output commodity", \
86 "doc": "Output commodity on which the source offers material.", \
87 "uilabel": "Output Commodity", \
88 "uitype": "outcommodity", \
92 #pragma cyclus var { \
93 "tooltip": "name of material recipe to provide", \
94 "doc": "Name of composition recipe that this source provides regardless " \
95 "of requested composition. If empty, source creates and provides " \
96 "whatever compositions are requested.", \
97 "uilabel": "Output Recipe", \
99 "uitype": "outrecipe", \
103 #pragma cyclus var { \
104 "doc": "Total amount of material this source has remaining." \
105 " Every trade decreases this value by the supplied material " \
106 "quantity. When it reaches zero, the source cannot provide any " \
108 "default": CY_LARGE_DOUBLE, \
110 "range": [0.0, CY_LARGE_DOUBLE], \
111 "uilabel": "Initial Inventory", \
116 #pragma cyclus var { \
117 "default": CY_LARGE_DOUBLE, \
118 "tooltip": "per time step throughput", \
119 "units": "kg/(time step)", \
120 "uilabel": "Maximum Throughput", \
122 "range": [0.0, CY_LARGE_DOUBLE], \
123 "doc": "amount of commodity that can be supplied at each time step", \
127 #pragma cyclus var { \
128 "default": "unpackaged", \
129 "tooltip": "name of package to provide material in", \
130 "doc": "Name of package that this source provides. Offers will only be" \
131 "made in packagable quantities of material.", \
132 "uilabel": "Output Package Type", \
133 "uitype": "package", \
137 #pragma cyclus var { \
138 "default": "unrestricted", \
139 "tooltip": "name of transport unit to ship packages in", \
140 "doc": "Name of transport unit that this source uses to ship packages of " \
141 "material. Offers will only be made in shippable quantities of " \
142 "packages. Optional if packaging is used, but use of transport " \
143 "units requires packaging type to also be set", \
144 "uilabel": "Output Transport Unit Type", \
145 "uitype": "transportunit", \
149 #pragma cyclus var { \
151 "uilabel": "Geographical latitude in degrees as a double", \
152 "doc": "Latitude of the agent's geographical position. The value should " \
153 "be expressed in degrees as a double." \
157 #pragma cyclus var { \
159 "uilabel": "Geographical longitude in degrees as a double", \
160 "doc": "Longitude of the agent's geographical position. The value should " \
161 "be expressed in degrees as a double." \
165 #pragma cyclus var { \
166 "tooltip":"Material buffer"}
167 cyclus::toolkit::ResBuf<cyclus::Material>
inventory;
This facility acts as a source of material with a fixed throughput (per time step) capacity and a lif...
virtual void InitFrom(Source *m)
virtual std::string version()
virtual void EnterNotify()
virtual std::set< cyclus::BidPortfolio< cyclus::Material >::Ptr > GetMatlBids(cyclus::CommodMap< cyclus::Material >::type &commod_requests)
virtual void GetMatlTrades(const std::vector< cyclus::Trade< cyclus::Material > > &trades, std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &responses)
virtual void Build(cyclus::Agent *parent)
— Facility Members — perform module-specific tasks when entering the simulation
cyclus::toolkit::Position coordinates
Source(cyclus::Context *ctx)
cyclus::toolkit::ResBuf< cyclus::Material > inventory
std::string transport_unit
virtual void InitFrom(cyclus::QueryableBackend *b)
virtual std::string str()