CYCLUS
Classes | Typedefs | Enumerations | Functions | Variables
cyclus::toolkit Namespace Reference

Classes

class  AgentManaged
 
class  Assays
 
class  BasicFunctionFactory
 
class  Builder
 
class  BuildingManager
 
struct  BuildOrder
 
struct  CommodInfo
 
class  Commodity
 
struct  CommodityCompare
 
class  CommodityProducer
 
class  CommodityProducerManager
 
class  CommodityRecipeContext
 
class  ExpFunctionFactory
 
class  ExponentialFunction
 
class  LinearFunction
 
class  LinFunctionFactory
 
class  MatlBuyPolicy
 
class  MatlSellPolicy
 
class  MatQuery
 
class  PiecewiseFunction
 
class  PiecewiseFunctionFactory
 
class  ResBuf
 
class  ResMap
 
class  ResourceBuff
 
class  SupplyDemandManager
 
class  SymbFunctionFactory
 
class  SymFunction
 

Typedefs

typedef std::vector< Resource::PtrManifest
 
typedef std::vector< Material::PtrMatVec
 
typedef std::vector< Product::PtrProdVec
 
typedef std::vector< Resource::PtrResVec
 

Enumerations

enum  TimeSeriesType { POWER, ENRICH_SWU, ENRICH_FEED }
 

Functions

void AddJsonToXml (Json::Value &node, std::stringstream &ss, std::string parent_name, std::string indent)
 
void AddXmlToJson (InfileTree *xnode, Json::Value &jnode, std::string parent_name)
 
double FeedQty (double product_qty, const Assays &assays)
 
void JsonInsertOrAppend (Json::Value &node, std::string key, Json::Value &val)
 
std::string JsonToXml (std::string s)
 
template<TimeSeriesType T>
void RecordTimeSeries (cyclus::Agent *agent, double value)
 
template<typename T >
void RecordTimeSeries (std::string tsname, cyclus::Agent *agent, T value)
 
template<>
void RecordTimeSeries< ENRICH_FEED > (cyclus::Agent *agent, double value)
 
template<>
void RecordTimeSeries< ENRICH_SWU > (cyclus::Agent *agent, double value)
 
template<>
void RecordTimeSeries< POWER > (cyclus::Agent *agent, double value)
 
std::vector< Resource::PtrResCast (std::vector< Material::Ptr > rs)
 
std::vector< Resource::PtrResCast (std::vector< Product::Ptr > rs)
 
std::vector< Resource::PtrResCast (std::vector< Resource::Ptr > rs)
 
Product::Ptr Squash (std::vector< Product::Ptr > ps)
 
Material::Ptr Squash (std::vector< Material::Ptr > ms)
 
Resource::Ptr Squash (std::vector< Resource::Ptr > rs)
 
double SwuRequired (double product_qty, const Assays &assays)
 
double TailsQty (double product_qty, const Assays &assays)
 
double UraniumAssay (Material::Ptr rsrc)
 
double UraniumQty (Material::Ptr mat)
 
double ValueFunc (double frac)
 
std::string XmlToJson (std::string s)
 

Variables

static double const kBuffInfinity = std::numeric_limits<double>::max()
 

Typedef Documentation

Definition at line 20 of file resource_buff.h.

typedef std::vector<Material::Ptr> cyclus::toolkit::MatVec

Definition at line 22 of file res_buf.h.

typedef std::vector<Product::Ptr> cyclus::toolkit::ProdVec

Definition at line 23 of file res_buf.h.

typedef std::vector<Resource::Ptr> cyclus::toolkit::ResVec

Definition at line 21 of file res_buf.h.

Enumeration Type Documentation

Time series types to be used in the RecordTimeSeries() functions.

These types have the following unit which must be adhered to strictly:

  • POWER [MWe]
  • ENRICH_SWU [kg SWU]
  • ENRICH_FEED [kg]
Enumerator
POWER 
ENRICH_SWU 
ENRICH_FEED 

Definition at line 17 of file timeseries.h.

Function Documentation

void cyclus::toolkit::AddJsonToXml ( Json::Value node,
std::stringstream &  ss,
std::string  parent_name,
std::string  indent 
)

Definition at line 14 of file infile_converters.cc.

void cyclus::toolkit::AddXmlToJson ( InfileTree xnode,
Json::Value jnode,
std::string  parent_name 
)

Definition at line 121 of file infile_converters.cc.

double cyclus::toolkit::FeedQty ( double  product_qty,
const Assays assays 
)

inline double UraniumQty(Material::Ptr mat) { return UraniumQty(mat.get()); }

Parameters
product_qtythe amount of product Uranium, assuming feed is comprised of only U-235 and U-238
assaysthe assay of product, feed, and tails
Returns
the quantity of feedstock required to make the product whose units match those of the given product

Definition at line 61 of file enrichment.cc.

void cyclus::toolkit::JsonInsertOrAppend ( Json::Value node,
std::string  key,
Json::Value val 
)

Definition at line 103 of file infile_converters.cc.

std::string cyclus::toolkit::JsonToXml ( std::string  s)

Converts a JSON string into an equivalent XML string.

Definition at line 80 of file infile_converters.cc.

template<TimeSeriesType T>
void cyclus::toolkit::RecordTimeSeries ( cyclus::Agent agent,
double  value 
)

Records a per-time step quantity for a given type.

template<typename T >
void cyclus::toolkit::RecordTimeSeries ( std::string  tsname,
cyclus::Agent agent,
value 
)

Records a per-time step quantity for a string.

Definition at line 29 of file timeseries.h.

template<>
void cyclus::toolkit::RecordTimeSeries< ENRICH_FEED > ( cyclus::Agent agent,
double  value 
)

Definition at line 17 of file timeseries.cc.

template<>
void cyclus::toolkit::RecordTimeSeries< ENRICH_SWU > ( cyclus::Agent agent,
double  value 
)

Definition at line 12 of file timeseries.cc.

template<>
void cyclus::toolkit::RecordTimeSeries< POWER > ( cyclus::Agent agent,
double  value 
)

Definition at line 7 of file timeseries.cc.

std::vector< Resource::Ptr > cyclus::toolkit::ResCast ( std::vector< Material::Ptr rs)

Casts a vector of Materials into a vector of Resources.

Definition at line 48 of file res_manip.cc.

std::vector< Resource::Ptr > cyclus::toolkit::ResCast ( std::vector< Product::Ptr rs)

Casts a vector of Products into a vector of Resources.

Definition at line 56 of file res_manip.cc.

std::vector< Resource::Ptr > cyclus::toolkit::ResCast ( std::vector< Resource::Ptr rs)

Casts a vector of Resources into a vector of Resources.

This is actually basically a no-op that enables ResBuf to work for plain Resource types.

Definition at line 64 of file res_manip.cc.

Product::Ptr cyclus::toolkit::Squash ( std::vector< Product::Ptr ps)

Squash combines all products in ps and returns the resulting single product.

Definition at line 7 of file res_manip.cc.

Material::Ptr cyclus::toolkit::Squash ( std::vector< Material::Ptr ms)

Squash combines all materials in ms and returns the resulting single material.

Definition at line 19 of file res_manip.cc.

Resource::Ptr cyclus::toolkit::Squash ( std::vector< Resource::Ptr rs)

Squash combines all resources in rs and returns the resulting single resource.

Definition at line 31 of file res_manip.cc.

double cyclus::toolkit::SwuRequired ( double  product_qty,
const Assays assays 
)
Parameters
product_qtythe amount of product Uranium
assaysthe assay of product, feed, and tails
Returns
the amount of swu required to enrich the product

Definition at line 98 of file enrichment.cc.

double cyclus::toolkit::TailsQty ( double  product_qty,
const Assays assays 
)
Parameters
product_qtythe amount of product Uranium
assaysthe assay of product, feed, and tails
Returns
the quantity of tails resulting from enriching the product whose units match those of the given product

Definition at line 70 of file enrichment.cc.

double cyclus::toolkit::UraniumAssay ( Material::Ptr  mat)
Parameters
matthe material inquired about
Returns
the atom percent of U-235 w.r.t U-235+U-238 in a material

Definition at line 36 of file enrichment.cc.

double cyclus::toolkit::UraniumQty ( Material::Ptr  mat)

inline double UraniumAssay(Material::Ptr mat) { return UraniumAssay(mat.get()); }

Parameters
matthe material inquired about
Returns
the quantity of uranium in a material whose units match those of the given material

Definition at line 55 of file enrichment.cc.

double cyclus::toolkit::ValueFunc ( double  frac)
Parameters
fracthe fraction input, this will throw if the fraction value is not in [0,1)
Returns
the value function for a given fraction in [0,1)

Definition at line 79 of file enrichment.cc.

std::string cyclus::toolkit::XmlToJson ( std::string  s)

Converts an XML string into an equivalent JSON string.

Definition at line 145 of file infile_converters.cc.

Variable Documentation

double const cyclus::toolkit::kBuffInfinity = std::numeric_limits<double>::max()
static

Definition at line 18 of file resource_buff.h.