CYCLUS
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
cyclus Namespace Reference

Namespaces

 compmath
 
 toolkit
 
 units
 
 version
 

Classes

class  Agent
 
class  AgentSpec
 
class  Arc
 
class  Bid
 
class  BidPortfolio
 
class  Blob
 
class  CapacityConstraint
 
class  CastError
 
struct  CommodMap
 
struct  compare
 
class  Composition
 
class  Cond
 
class  CondInjector
 
class  Context
 
class  Converter
 
class  CycArithmetic
 
class  Datum
 
class  DbInit
 
class  Decayer
 
class  DepricationError
 
class  Digest
 
class  Dummy
 
class  DynamicModule
 
class  Env
 
class  Error
 
class  ExchangeContext
 
class  ExchangeGraph
 
class  ExchangeManager
 
class  ExchangeNode
 
class  ExchangeNodeGroup
 
class  ExchangeSolver
 
class  ExchangeTranslationContext
 
class  ExchangeTranslator
 
class  Facility
 
class  FullBackend
 
class  GreedyPreconditioner
 
class  GreedySolver
 
class  Hdf5Back
 
class  Ider
 
class  InfileTree
 
class  Institution
 
class  IntrusiveBase
 
class  IOError
 
class  KeyError
 
class  LMatrix
 
class  Logger
 
class  Material
 
class  MockAgent
 
class  MockSim
 
class  ObjValueHandler
 
class  PrefixInjector
 
struct  PrefMap
 
class  Product
 
class  ProgSolver
 
class  ProgTranslator
 
struct  ProgTranslatorContext
 
struct  QtyCoeffConverter
 
class  QueryableBackend
 
class  QueryResult
 
class  RecBackend
 
class  Recorder
 
class  Region
 
class  RelaxNGValidator
 
class  Request
 
class  RequestGroup
 
class  RequestPortfolio
 
class  Resource
 
class  ResourceExchange
 
class  ResTracker
 
struct  SecondLT
 
class  Sha1
 
class  SimInfo
 
class  SimInit
 
class  SolverFactory
 
class  SqliteBack
 
class  SqliteDb
 
class  SqlStatement
 
class  StateError
 
class  StateWrangler
 
class  TimeListener
 
class  Timer
 
class  Trade
 
struct  TradeExecutionContext
 
class  TradeExecutor
 
class  Trader
 
class  TrivialConverter
 
class  UniformTaylor
 
class  ValidationError
 
class  ValueError
 
class  XMLFileLoader
 
class  XMLFlatLoader
 
class  XMLParser
 

Typedefs

typedef AgentAgentCtor(Context *)
 
typedef std::map< Nuc, double > CompMap
 
typedef std::vector< Datum * > DatumList
 
typedef boost::singleton_pool< Datum, sizeof(Datum)> DatumPool
 
typedef std::map< int, std::vector< std::pair< int, double > > > DaughtersMap
 
typedef std::map< std::string, std::vector< Resource::Ptr > > Inventories
 
typedef std::pair< Arc, double > Match
 
typedef LMatrix Matrix
 
typedef int Nuc
 
typedef std::vector< int > NucList
 
typedef std::map< int, std::pair< int, double > > ParentMap
 
typedef std::set< std::string >::iterator PrototypeIterator
 
typedef std::set< std::string > PrototypeSet
 
typedef std::vector< boost::spirit::hold_anyQueryRow
 
typedef std::string ResourceType
 
typedef std::vector< std::string > StrList
 
typedef LMatrix Vector
 

Enumerations

enum  CmpOpCode {
  LT = 0, GT, LE, GE,
  EQ, NE
}
 
enum  DbTypes {
  BOOL = 0, INT, FLOAT, DOUBLE,
  STRING, VL_STRING, BLOB, UUID,
  VECTOR_BOOL, VL_VECTOR_BOOL, VECTOR_INT, VL_VECTOR_INT,
  VECTOR_FLOAT, VL_VECTOR_FLOAT, VECTOR_DOUBLE, VL_VECTOR_DOUBLE,
  VECTOR_STRING, VL_VECTOR_STRING, VECTOR_VL_STRING, VL_VECTOR_VL_STRING,
  VECTOR_BLOB, VL_VECTOR_BLOB, VECTOR_UUID, VL_VECTOR_UUID,
  SET_BOOL, VL_SET_BOOL, SET_INT, VL_SET_INT,
  SET_FLOAT, VL_SET_FLOAT, SET_DOUBLE, VL_SET_DOUBLE,
  SET_STRING, VL_SET_STRING, SET_VL_STRING, VL_SET_VL_STRING,
  SET_BLOB, VL_SET_BLOB, SET_UUID, VL_SET_UUID,
  LIST_BOOL, VL_LIST_BOOL, LIST_INT, VL_LIST_INT,
  LIST_FLOAT, VL_LIST_FLOAT, LIST_DOUBLE, VL_LIST_DOUBLE,
  LIST_STRING, VL_LIST_STRING, LIST_VL_STRING, VL_LIST_VL_STRING,
  LIST_BLOB, VL_LIST_BLOB, LIST_UUID, VL_LIST_UUID,
  PAIR_INT_BOOL, PAIR_INT_INT, PAIR_INT_FLOAT, PAIR_INT_DOUBLE,
  PAIR_INT_STRING, PAIR_INT_VL_STRING, PAIR_INT_BLOB, PAIR_INT_UUID,
  PAIR_STRING_BOOL, PAIR_STRING_INT, PAIR_STRING_FLOAT, PAIR_STRING_DOUBLE,
  PAIR_STRING_STRING, PAIR_STRING_VL_STRING, PAIR_STRING_BLOB, PAIR_STRING_UUID,
  PAIR_VL_STRING_BOOL, PAIR_VL_STRING_INT, PAIR_VL_STRING_FLOAT, PAIR_VL_STRING_DOUBLE,
  PAIR_VL_STRING_STRING, PAIR_VL_STRING_VL_STRING, PAIR_VL_STRING_BLOB, PAIR_VL_STRING_UUID,
  MAP_INT_BOOL, VL_MAP_INT_BOOL, MAP_INT_INT, VL_MAP_INT_INT,
  MAP_INT_FLOAT, VL_MAP_INT_FLOAT, MAP_INT_DOUBLE, VL_MAP_INT_DOUBLE,
  MAP_INT_STRING, VL_MAP_INT_STRING, MAP_INT_VL_STRING, VL_MAP_INT_VL_STRING,
  MAP_INT_BLOB, VL_MAP_INT_BLOB, MAP_INT_UUID, VL_MAP_INT_UUID,
  MAP_STRING_BOOL, VL_MAP_STRING_BOOL, MAP_STRING_INT, VL_MAP_STRING_INT,
  MAP_STRING_FLOAT, VL_MAP_STRING_FLOAT, MAP_STRING_DOUBLE, VL_MAP_STRING_DOUBLE,
  MAP_STRING_STRING, VL_MAP_STRING_STRING, MAP_STRING_VL_STRING, VL_MAP_STRING_VL_STRING,
  MAP_STRING_BLOB, VL_MAP_STRING_BLOB, MAP_STRING_UUID, VL_MAP_STRING_UUID,
  MAP_VL_STRING_BOOL, VL_MAP_VL_STRING_BOOL, MAP_VL_STRING_INT, VL_MAP_VL_STRING_INT,
  MAP_VL_STRING_FLOAT, VL_MAP_VL_STRING_FLOAT, MAP_VL_STRING_DOUBLE, VL_MAP_VL_STRING_DOUBLE,
  MAP_VL_STRING_STRING, VL_MAP_VL_STRING_STRING, MAP_VL_STRING_VL_STRING, VL_MAP_VL_STRING_VL_STRING,
  MAP_VL_STRING_BLOB, VL_MAP_VL_STRING_BLOB, MAP_VL_STRING_UUID, VL_MAP_VL_STRING_UUID,
  MAP_PAIR_INT_STRING_DOUBLE, VL_MAP_PAIR_INT_STRING_DOUBLE, MAP_PAIR_INT_VL_STRING_DOUBLE, VL_MAP_PAIR_INT_VL_STRING_DOUBLE,
  MAP_STRING_VECTOR_DOUBLE, MAP_STRING_VL_VECTOR_DOUBLE, VL_MAP_STRING_VECTOR_DOUBLE, MAP_VL_STRING_VECTOR_DOUBLE,
  MAP_VL_STRING_VL_VECTOR_DOUBLE, VL_MAP_STRING_VL_VECTOR_DOUBLE, VL_MAP_VL_STRING_VECTOR_DOUBLE, VL_MAP_VL_STRING_VL_VECTOR_DOUBLE,
  MAP_STRING_MAP_INT_DOUBLE, MAP_STRING_VL_MAP_INT_DOUBLE, VL_MAP_STRING_MAP_INT_DOUBLE, MAP_VL_STRING_MAP_INT_DOUBLE,
  MAP_VL_STRING_VL_MAP_INT_DOUBLE, VL_MAP_STRING_VL_MAP_INT_DOUBLE, VL_MAP_VL_STRING_MAP_INT_DOUBLE, VL_MAP_VL_STRING_VL_MAP_INT_DOUBLE,
  MAP_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE, VL_MAP_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE, MAP_VL_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE, MAP_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE,
  VL_MAP_VL_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE, VL_MAP_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE, MAP_VL_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE, VL_MAP_VL_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE,
  MAP_INT_MAP_STRING_DOUBLE, MAP_INT_MAP_VL_STRING_DOUBLE, VL_MAP_INT_MAP_STRING_DOUBLE, VL_MAP_INT_MAP_VL_STRING_DOUBLE,
  MAP_INT_VL_MAP_STRING_DOUBLE, MAP_INT_VL_MAP_VL_STRING_DOUBLE, VL_MAP_INT_VL_MAP_STRING_DOUBLE, VL_MAP_INT_VL_MAP_VL_STRING_DOUBLE,
  MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING, MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING,
  MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING, MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING,
  MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING, MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING,
  MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING, MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING,
  VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING, VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING,
  VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING, VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING,
  VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING, VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING,
  VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING, VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING, VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING, VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING,
  LIST_PAIR_INT_INT, VL_LIST_PAIR_INT_INT, MAP_STRING_PAIR_STRING_VECTOR_DOUBLE, MAP_STRING_PAIR_STRING_VL_VECTOR_DOUBLE,
  MAP_STRING_PAIR_VL_STRING_VECTOR_DOUBLE, MAP_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE, MAP_VL_STRING_PAIR_STRING_VECTOR_DOUBLE, MAP_VL_STRING_PAIR_VL_STRING_VECTOR_DOUBLE,
  MAP_VL_STRING_PAIR_STRING_VL_VECTOR_DOUBLE, MAP_VL_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE, VL_MAP_STRING_PAIR_STRING_VECTOR_DOUBLE, VL_MAP_VL_STRING_PAIR_STRING_VECTOR_DOUBLE,
  VL_MAP_STRING_PAIR_VL_STRING_VECTOR_DOUBLE, VL_MAP_STRING_PAIR_STRING_VL_VECTOR_DOUBLE, VL_MAP_VL_STRING_PAIR_VL_STRING_VECTOR_DOUBLE, VL_MAP_VL_STRING_PAIR_STRING_VL_VECTOR_DOUBLE,
  VL_MAP_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE, VL_MAP_VL_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE, MAP_STRING_MAP_STRING_INT, MAP_STRING_MAP_VL_STRING_INT,
  MAP_STRING_VL_MAP_STRING_INT, MAP_STRING_VL_MAP_VL_STRING_INT, MAP_VL_STRING_MAP_STRING_INT, MAP_VL_STRING_VL_MAP_STRING_INT,
  MAP_VL_STRING_MAP_VL_STRING_INT, MAP_VL_STRING_VL_MAP_VL_STRING_INT, VL_MAP_STRING_MAP_STRING_INT, VL_MAP_VL_STRING_MAP_STRING_INT,
  VL_MAP_STRING_VL_MAP_STRING_INT, VL_MAP_STRING_MAP_VL_STRING_INT, VL_MAP_STRING_VL_MAP_VL_STRING_INT, VL_MAP_VL_STRING_MAP_VL_STRING_INT,
  VL_MAP_VL_STRING_VL_MAP_STRING_INT, VL_MAP_VL_STRING_VL_MAP_VL_STRING_INT, VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_STRING_DOUBLE, VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_VL_STRING_DOUBLE,
  VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_STRING_DOUBLE, VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_VL_STRING_DOUBLE, VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_STRING_DOUBLE, VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_VL_STRING_DOUBLE,
  VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_STRING_DOUBLE, VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_VL_STRING_DOUBLE, PAIR_INT_PAIR_STRING_STRING, PAIR_INT_PAIR_VL_STRING_STRING,
  PAIR_INT_PAIR_STRING_VL_STRING, PAIR_INT_PAIR_VL_STRING_VL_STRING, PAIR_DOUBLE_DOUBLE, PAIR_PAIR_DOUBLE_DOUBLE_MAP_STRING_DOUBLE,
  PAIR_PAIR_DOUBLE_DOUBLE_MAP_VL_STRING_DOUBLE, PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_STRING_DOUBLE, PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_VL_STRING_DOUBLE
}
 
enum  LogLevel {
  LEV_ERROR, LEV_WARN, LEV_INFO1, LEV_INFO2,
  LEV_INFO3, LEV_INFO4, LEV_INFO5, LEV_DEBUG1,
  LEV_DEBUG2, LEV_DEBUG3, LEV_DEBUG4, LEV_DEBUG5
}
 
enum  Warnings {
  WARNING = 0, VALUE_WARNING, KEY_WARNING, STATE_WARNING,
  IO_WARNING, CAST_WARNING, VALIDATION_WARNING, DEPRECATION_WARNING,
  PENDING_DEPRECATION_WARNING, EXPERIMENTAL_WARNING
}
 

Functions

template<class T >
static void AcceptTrades (Trader *trader, const std::vector< std::pair< Trade< T >, typename T::Ptr > > &responses)
 
template<>
void AcceptTrades (Trader *trader, const std::vector< std::pair< Trade< Material >, Material::Ptr > > &responses)
 
template<>
void AcceptTrades (Trader *trader, const std::vector< std::pair< Trade< Product >, Product::Ptr > > &responses)
 
template<class T >
void AddBid (ExchangeTranslationContext< T > &translation_ctx, Bid< T > *b, ExchangeNode::Ptr n)
 
template<class T >
void AddRequest (ExchangeTranslationContext< T > &translation_ctx, Request< T > *r, ExchangeNode::Ptr n)
 
template<class T >
static void AdjustPrefs (Agent *m, typename PrefMap< T >::type &prefs)
 
static void AdjustPrefs (Agent *m, PrefMap< Material >::type &prefs)
 
static void AdjustPrefs (Agent *m, PrefMap< Product >::type &prefs)
 
static void AdjustPrefs (Trader *t, PrefMap< Material >::type &prefs)
 
static void AdjustPrefs (Trader *t, PrefMap< Product >::type &prefs)
 
bool AlmostEq (double d1, double d2)
 
double AvgPref (ExchangeNode::Ptr n)
 
bool AvgPrefComp (ExchangeNode::Ptr l, ExchangeNode::Ptr r)
 
template<class T >
Trade< T > BackTranslateMatch (const ExchangeTranslationContext< T > &translation_ctx, const Match &match)
 
std::string BuildFlatMasterSchema (std::string schema_path, std::string infile)
 
std::string BuildMasterSchema (std::string schema_path, std::string infile)
 
int CbcCallBack (CbcModel *model, int from)
 
template<typename T >
bool CmpCond (T *x, Cond *cond)
 
template<typename T >
bool CmpConds (T *x, std::vector< Cond * > *conds)
 
int differentAgent (OsiSolverInterface &lhs, OsiSolverInterface &rhs, bool)
 
std::set< std::string > DiscoverArchetypes (const std::string s)
 
Json::Value DiscoverMetadataInCyclusPath ()
 
std::set< std::string > DiscoverSpecs (std::string p, std::string lib)
 
std::set< std::string > DiscoverSpecsInCyclusPath ()
 
std::set< std::string > DiscoverSpecsInDir (std::string d)
 
double eps ()
 
double eps_rsrc ()
 
template<class T >
static void GetTradeResponses (TradeExecutionContext< T > &trade_ctx)
 
std::string GetTraderPrototype (Trader *bidder)
 
std::string GetTraderSpec (Trader *bidder)
 
template<class T >
void GroupTradesBySupplier (TradeExecutionContext< T > &trade_ctx, const std::vector< Trade< T > > &trades)
 
double GroupWeight (RequestGroup::Ptr g, std::map< std::string, double > *weights, std::map< ExchangeNode::Ptr, double > *avg_prefs)
 
bool HasInt (OsiSolverInterface *si)
 
template<>
std::list< int > Hdf5Back::VLBufToVal< std::list< int > > (const hvl_t &buf)
 
template<>
std::list< std::string > Hdf5Back::VLBufToVal< std::list< std::string > > (const hvl_t &buf)
 
template<>
std::map< int, double > Hdf5Back::VLBufToVal< std::map< int, double > > (const hvl_t &buf)
 
template<>
std::map< int, int > Hdf5Back::VLBufToVal< std::map< int, int > > (const hvl_t &buf)
 
template<>
std::map< int, std::string > Hdf5Back::VLBufToVal< std::map< int, std::string > > (const hvl_t &buf)
 
template<>
std::map< std::pair< int, std::string >, double > Hdf5Back::VLBufToVal< std::map< std::pair< int, std::string >, double > > (const hvl_t &buf)
 
template<>
std::map< std::string, double > Hdf5Back::VLBufToVal< std::map< std::string, double > > (const hvl_t &buf)
 
template<>
std::map< std::string, int > Hdf5Back::VLBufToVal< std::map< std::string, int > > (const hvl_t &buf)
 
template<>
std::map< std::string, std::string > Hdf5Back::VLBufToVal< std::map< std::string, std::string > > (const hvl_t &buf)
 
template<>
std::set< int > Hdf5Back::VLBufToVal< std::set< int > > (const hvl_t &buf)
 
template<>
std::set< std::string > Hdf5Back::VLBufToVal< std::set< std::string > > (const hvl_t &buf)
 
template<>
std::vector< double > Hdf5Back::VLBufToVal< std::vector< double > > (const hvl_t &buf)
 
template<>
std::vector< float > Hdf5Back::VLBufToVal< std::vector< float > > (const hvl_t &buf)
 
template<>
std::vector< int > Hdf5Back::VLBufToVal< std::vector< int > > (const hvl_t &buf)
 
template<>
std::vector< std::string > Hdf5Back::VLBufToVal< std::vector< std::string > > (const hvl_t &buf)
 
template<>
std::string Hdf5Back::VLRead< std::string, VL_STRING > (const char *rawkey)
 
template<>
Digest Hdf5Back::VLWrite< std::string, VL_STRING > (const std::string &x)
 
LMatrix identity (int n)
 
void InitAgent (Agent *a, std::stringstream &config, Recorder *rec, SqliteBack *back)
 
bool IsNegative (double d)
 
void LoadRawStringstreamFromFile (std::stringstream &stream, std::string file)
 
void LoadStringstreamFromFile (std::stringstream &stream, std::string file)
 
template<typename Map >
bool map_compare (Map const &lhs, Map const &rhs)
 
std::string ModuleConstructor (std::string module_spec)
 
Material::Ptr NewBlankMaterial (double qty)
 
double NodeWeight (ExchangeNode::Ptr n, std::map< std::string, double > *weights, double avg_pref)
 
LMatrix operator* (const LMatrix &lhs, const LMatrix &rhs)
 
LMatrix operator* (const long double k, const LMatrix &A)
 
LMatrix operator* (const LMatrix &A, const long double k)
 
LMatrix operator+ (const LMatrix &lhs, const LMatrix &rhs)
 
LMatrix operator- (const LMatrix &lhs, const LMatrix &rhs)
 
template<class T >
bool operator< (const CapacityConstraint< T > &lhs, const CapacityConstraint< T > &rhs)
 
template<class T >
bool operator== (const cyclus::Trade< T > &lhs, const cyclus::Trade< T > &rhs)
 
bool operator== (const ExchangeNode &lhs, const ExchangeNode &rhs)
 
template<class T >
bool operator== (const CapacityConstraint< T > &lhs, const CapacityConstraint< T > &rhs)
 
LMatrix operator^ (const LMatrix &A, const int k)
 
template<typename T >
OptionalQuery (InfileTree *tree, std::string query, T default_val)
 
template<>
int OptionalQuery (InfileTree *tree, std::string query, int default_val)
 
template<>
bool OptionalQuery (InfileTree *tree, std::string query, bool default_val)
 
template<>
float OptionalQuery (InfileTree *tree, std::string query, float default_val)
 
template<>
double OptionalQuery (InfileTree *tree, std::string query, double default_val)
 
std::vector< AgentSpecParseSpecs (std::string infile)
 
template<class T >
static void PopulateTradeResponses (Trader *trader, const std::vector< Trade< T > > &trades, std::vector< std::pair< Trade< T >, typename T::Ptr > > &responses)
 
template<>
void PopulateTradeResponses< Material > (Trader *trader, const std::vector< Trade< Material > > &trades, std::vector< std::pair< Trade< Material >, Material::Ptr > > &responses)
 
template<>
void PopulateTradeResponses< Product > (Trader *trader, const std::vector< Trade< Product > > &trades, std::vector< std::pair< Trade< Product >, Product::Ptr > > &responses)
 
template<typename T >
Query (InfileTree *tree, std::string query, int index=0)
 
template<>
std::string Query (InfileTree *tree, std::string query, int index)
 
template<>
int Query (InfileTree *tree, std::string query, int index)
 
template<>
float Query (InfileTree *tree, std::string query, int index)
 
template<>
double Query (InfileTree *tree, std::string query, int index)
 
template<class T >
static std::set< typename BidPortfolio< T >::Ptr > QueryBids (Trader *t, typename CommodMap< T >::type &map)
 
template<>
std::set< BidPortfolio< Material >::Ptr > QueryBids< Material > (Trader *t, CommodMap< Material >::type &map)
 
template<>
std::set< BidPortfolio< Product >::Ptr > QueryBids< Product > (Trader *t, CommodMap< Product >::type &map)
 
template<class T >
static std::set< typename RequestPortfolio< T >::Ptr > QueryRequests (Trader *t)
 
template<>
std::set< RequestPortfolio< Material >::Ptr > QueryRequests< Material > (Trader *t)
 
template<>
std::set< RequestPortfolio< Product >::Ptr > QueryRequests< Product > (Trader *t)
 
Composition::Ptr ReadRecipe (InfileTree *qe)
 
void Report (OsiSolverInterface *iface)
 
void ReportProg (OsiSolverInterface *si)
 
bool ReqPrefComp (const Arc &l, const Arc &r)
 
template<class T >
std::vector< typename T::Ptr > ResCast (std::vector< Resource::Ptr > rs)
 
template<class T >
T::Ptr ResCast (Resource::Ptr r)
 
std::string SanitizeSpec (std::string module_spec)
 
template<class T >
static void SendTradeResources (TradeExecutionContext< T > &trade_ctx)
 
void SolveProg (OsiSolverInterface *si, double greedy_obj, bool verbose)
 
void SolveProg (OsiSolverInterface *si)
 
void SolveProg (OsiSolverInterface *si, bool verbose)
 
void SolveProg (OsiSolverInterface *si, double greedy_obj)
 
std::vector< std::string > split (const std::string &s, char delim)
 
double SumPref (double total, std::pair< Arc, double > pref)
 
template<class T >
double SumQty (double total, Request< T > *r)
 
template<class T >
Arc TranslateArc (const ExchangeTranslationContext< T > &translation_ctx, Bid< T > *bid)
 
template<class T >
Arc TranslateArc (const ExchangeTranslationContext< T > &translation_ctx, Bid< T > *bid, double pref)
 
template<class T >
ExchangeNodeGroup::Ptr TranslateBidPortfolio (ExchangeTranslationContext< T > &translation_ctx, const typename BidPortfolio< T >::Ptr bp)
 
template<typename T >
void TranslateCapacities (typename T::Ptr offer, const typename std::set< CapacityConstraint< T > > &constr, ExchangeNode::Ptr n, const Arc &a, const ExchangeTranslationContext< T > &ctx)
 
template<class T >
RequestGroup::Ptr TranslateRequestPortfolio (ExchangeTranslationContext< T > &translation_ctx, const typename RequestPortfolio< T >::Ptr rp)
 
template<Warnings T>
void Warn (const std::string &msg)
 
std::map< Warnings, std::string > warn_prefixes ()
 
void Capacity (cyclus::Arc const &, double, double)
 
void Capacity (boost::shared_ptr< cyclus::ExchangeNode >, cyclus::Arc const &, double)
 

Variables

double cy_eps = 1e-6
 
double cy_eps_rsrc = 1e-6
 
static const double float_ulp_eq = 2
 
static const double kConstraintEps = 1e-08
 
static unsigned int const kDefaultDumpCount = 10000
 
static const double kDefaultPref = 1
 
static const int kIntBoundLimit = std::numeric_limits<int>::max()
 
static const double kLinBoundLimit = std::numeric_limits<double>::max()
 
static const double kModifierLimit = pow(10, 10)
 
static std::map< const std::type_info *, DbTypes, comparetype_map
 
bool warn_as_error = false
 
std::map< Warnings, unsigned int > warn_count
 
unsigned int warn_limit = 42
 
std::map< Warnings, std::string > warn_prefix = warn_prefixes()
 

Detailed Description

taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or.org/Osi/browser/trunk.

a collection of tools that are standard-library like

Thanks to John Forrest for his assistance! Some small changes have been made to the original file.

Typedef Documentation

typedef Agent* cyclus::AgentCtor(Context *)

Definition at line 17 of file dynamic_module.h.

typedef std::map<Nuc, double> cyclus::CompMap

a raw definition of nuclides and corresponding (dimensionless quantities).

Definition at line 17 of file composition.h.

typedef std::vector< Datum * > cyclus::DatumList

Definition at line 12 of file rec_backend.h.

typedef boost::singleton_pool<Datum, sizeof(Datum)> cyclus::DatumPool

Definition at line 9 of file datum.cc.

typedef std::map<int, std::vector<std::pair<int, double> > > cyclus::DaughtersMap

A map type to represent all of the daughter nuclides tracked.

The key for this map type is the decay matrix column associated with the parent, and the value is a vector of pairs of all the daughters for that parent. Each of the daughters are represented by a pair that contains the daughter's Nuc number and its branching ratio.

Definition at line 30 of file decayer.h.

typedef std::map<std::string, std::vector<Resource::Ptr> > cyclus::Inventories

map<inventory_name, vector<resources_in_inventory> >.

Used by agents in their #SnapshotInv and #InitInv functions for saving+loading their internal resource inventories.

Definition at line 35 of file agent.h.

typedef std::pair<Arc, double> cyclus::Match

Definition at line 197 of file exchange_graph.h.

Definition at line 17 of file use_matrix_lib.h.

typedef int cyclus::Nuc

Definition at line 12 of file composition.h.

typedef std::vector<int> cyclus::NucList

Definition at line 32 of file decayer.h.

typedef std::map< int, std::pair<int, double> > cyclus::ParentMap

A map type to represent all of the parent nuclides tracked.

The key for this map type is the parent's Nuc number, and the value is a pair that contains the corresponding decay matrix column and decay constant associated with that parent.

Definition at line 23 of file decayer.h.

typedef std::set<std::string>::iterator cyclus::PrototypeIterator

Definition at line 18 of file institution.h.

typedef std::set<std::string> cyclus::PrototypeSet

Definition at line 14 of file institution.h.

Definition at line 360 of file query_backend.h.

typedef std::string cyclus::ResourceType

Definition at line 12 of file resource.h.

typedef std::vector<std::string> cyclus::StrList

Definition at line 15 of file sqlite_db.h.

Definition at line 22 of file use_matrix_lib.h.

Enumeration Type Documentation

Represents operation codes for condition checking.

Enumerator
LT 
GT 
LE 
GE 
EQ 
NE 

Definition at line 312 of file query_backend.h.

This is the master list of all supported database types.

All types must have a constant length unless they begin with the prefix VL_, which stands for "variable length" or are implicitly variable length, such as blob. Changing the order here may invalidate previously created databases. Thus only append to this enum if it is post-1.0.

Enumerator
BOOL 
INT 
FLOAT 
DOUBLE 
STRING 
VL_STRING 
BLOB 
UUID 
VECTOR_BOOL 
VL_VECTOR_BOOL 
VECTOR_INT 
VL_VECTOR_INT 
VECTOR_FLOAT 
VL_VECTOR_FLOAT 
VECTOR_DOUBLE 
VL_VECTOR_DOUBLE 
VECTOR_STRING 
VL_VECTOR_STRING 
VECTOR_VL_STRING 
VL_VECTOR_VL_STRING 
VECTOR_BLOB 
VL_VECTOR_BLOB 
VECTOR_UUID 
VL_VECTOR_UUID 
SET_BOOL 
VL_SET_BOOL 
SET_INT 
VL_SET_INT 
SET_FLOAT 
VL_SET_FLOAT 
SET_DOUBLE 
VL_SET_DOUBLE 
SET_STRING 
VL_SET_STRING 
SET_VL_STRING 
VL_SET_VL_STRING 
SET_BLOB 
VL_SET_BLOB 
SET_UUID 
VL_SET_UUID 
LIST_BOOL 
VL_LIST_BOOL 
LIST_INT 
VL_LIST_INT 
LIST_FLOAT 
VL_LIST_FLOAT 
LIST_DOUBLE 
VL_LIST_DOUBLE 
LIST_STRING 
VL_LIST_STRING 
LIST_VL_STRING 
VL_LIST_VL_STRING 
LIST_BLOB 
VL_LIST_BLOB 
LIST_UUID 
VL_LIST_UUID 
PAIR_INT_BOOL 
PAIR_INT_INT 
PAIR_INT_FLOAT 
PAIR_INT_DOUBLE 
PAIR_INT_STRING 
PAIR_INT_VL_STRING 
PAIR_INT_BLOB 
PAIR_INT_UUID 
PAIR_STRING_BOOL 
PAIR_STRING_INT 
PAIR_STRING_FLOAT 
PAIR_STRING_DOUBLE 
PAIR_STRING_STRING 
PAIR_STRING_VL_STRING 
PAIR_STRING_BLOB 
PAIR_STRING_UUID 
PAIR_VL_STRING_BOOL 
PAIR_VL_STRING_INT 
PAIR_VL_STRING_FLOAT 
PAIR_VL_STRING_DOUBLE 
PAIR_VL_STRING_STRING 
PAIR_VL_STRING_VL_STRING 
PAIR_VL_STRING_BLOB 
PAIR_VL_STRING_UUID 
MAP_INT_BOOL 
VL_MAP_INT_BOOL 
MAP_INT_INT 
VL_MAP_INT_INT 
MAP_INT_FLOAT 
VL_MAP_INT_FLOAT 
MAP_INT_DOUBLE 
VL_MAP_INT_DOUBLE 
MAP_INT_STRING 
VL_MAP_INT_STRING 
MAP_INT_VL_STRING 
VL_MAP_INT_VL_STRING 
MAP_INT_BLOB 
VL_MAP_INT_BLOB 
MAP_INT_UUID 
VL_MAP_INT_UUID 
MAP_STRING_BOOL 
VL_MAP_STRING_BOOL 
MAP_STRING_INT 
VL_MAP_STRING_INT 
MAP_STRING_FLOAT 
VL_MAP_STRING_FLOAT 
MAP_STRING_DOUBLE 
VL_MAP_STRING_DOUBLE 
MAP_STRING_STRING 
VL_MAP_STRING_STRING 
MAP_STRING_VL_STRING 
VL_MAP_STRING_VL_STRING 
MAP_STRING_BLOB 
VL_MAP_STRING_BLOB 
MAP_STRING_UUID 
VL_MAP_STRING_UUID 
MAP_VL_STRING_BOOL 
VL_MAP_VL_STRING_BOOL 
MAP_VL_STRING_INT 
VL_MAP_VL_STRING_INT 
MAP_VL_STRING_FLOAT 
VL_MAP_VL_STRING_FLOAT 
MAP_VL_STRING_DOUBLE 
VL_MAP_VL_STRING_DOUBLE 
MAP_VL_STRING_STRING 
VL_MAP_VL_STRING_STRING 
MAP_VL_STRING_VL_STRING 
VL_MAP_VL_STRING_VL_STRING 
MAP_VL_STRING_BLOB 
VL_MAP_VL_STRING_BLOB 
MAP_VL_STRING_UUID 
VL_MAP_VL_STRING_UUID 
MAP_PAIR_INT_STRING_DOUBLE 
VL_MAP_PAIR_INT_STRING_DOUBLE 
MAP_PAIR_INT_VL_STRING_DOUBLE 
VL_MAP_PAIR_INT_VL_STRING_DOUBLE 
MAP_STRING_VECTOR_DOUBLE 
MAP_STRING_VL_VECTOR_DOUBLE 
VL_MAP_STRING_VECTOR_DOUBLE 
MAP_VL_STRING_VECTOR_DOUBLE 
MAP_VL_STRING_VL_VECTOR_DOUBLE 
VL_MAP_STRING_VL_VECTOR_DOUBLE 
VL_MAP_VL_STRING_VECTOR_DOUBLE 
VL_MAP_VL_STRING_VL_VECTOR_DOUBLE 
MAP_STRING_MAP_INT_DOUBLE 
MAP_STRING_VL_MAP_INT_DOUBLE 
VL_MAP_STRING_MAP_INT_DOUBLE 
MAP_VL_STRING_MAP_INT_DOUBLE 
MAP_VL_STRING_VL_MAP_INT_DOUBLE 
VL_MAP_STRING_VL_MAP_INT_DOUBLE 
VL_MAP_VL_STRING_MAP_INT_DOUBLE 
VL_MAP_VL_STRING_VL_MAP_INT_DOUBLE 
MAP_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE 
VL_MAP_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE 
MAP_VL_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE 
MAP_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE 
VL_MAP_VL_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE 
VL_MAP_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE 
MAP_VL_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE 
VL_MAP_VL_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE 
MAP_INT_MAP_STRING_DOUBLE 
MAP_INT_MAP_VL_STRING_DOUBLE 
VL_MAP_INT_MAP_STRING_DOUBLE 
VL_MAP_INT_MAP_VL_STRING_DOUBLE 
MAP_INT_VL_MAP_STRING_DOUBLE 
MAP_INT_VL_MAP_VL_STRING_DOUBLE 
VL_MAP_INT_VL_MAP_STRING_DOUBLE 
VL_MAP_INT_VL_MAP_VL_STRING_DOUBLE 
MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING 
MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING 
MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING 
MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING 
MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING 
MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING 
MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING 
MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING 
MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING 
MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING 
MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING 
MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING 
MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING 
MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING 
MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING 
MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING 
VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING 
VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING 
VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING 
VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING 
VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING 
VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING 
VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING 
VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING 
VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING 
VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING 
VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING 
VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING 
VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING 
VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING 
VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING 
VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING 
LIST_PAIR_INT_INT 
VL_LIST_PAIR_INT_INT 
MAP_STRING_PAIR_STRING_VECTOR_DOUBLE 
MAP_STRING_PAIR_STRING_VL_VECTOR_DOUBLE 
MAP_STRING_PAIR_VL_STRING_VECTOR_DOUBLE 
MAP_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE 
MAP_VL_STRING_PAIR_STRING_VECTOR_DOUBLE 
MAP_VL_STRING_PAIR_VL_STRING_VECTOR_DOUBLE 
MAP_VL_STRING_PAIR_STRING_VL_VECTOR_DOUBLE 
MAP_VL_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE 
VL_MAP_STRING_PAIR_STRING_VECTOR_DOUBLE 
VL_MAP_VL_STRING_PAIR_STRING_VECTOR_DOUBLE 
VL_MAP_STRING_PAIR_VL_STRING_VECTOR_DOUBLE 
VL_MAP_STRING_PAIR_STRING_VL_VECTOR_DOUBLE 
VL_MAP_VL_STRING_PAIR_VL_STRING_VECTOR_DOUBLE 
VL_MAP_VL_STRING_PAIR_STRING_VL_VECTOR_DOUBLE 
VL_MAP_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE 
VL_MAP_VL_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE 
MAP_STRING_MAP_STRING_INT 
MAP_STRING_MAP_VL_STRING_INT 
MAP_STRING_VL_MAP_STRING_INT 
MAP_STRING_VL_MAP_VL_STRING_INT 
MAP_VL_STRING_MAP_STRING_INT 
MAP_VL_STRING_VL_MAP_STRING_INT 
MAP_VL_STRING_MAP_VL_STRING_INT 
MAP_VL_STRING_VL_MAP_VL_STRING_INT 
VL_MAP_STRING_MAP_STRING_INT 
VL_MAP_VL_STRING_MAP_STRING_INT 
VL_MAP_STRING_VL_MAP_STRING_INT 
VL_MAP_STRING_MAP_VL_STRING_INT 
VL_MAP_STRING_VL_MAP_VL_STRING_INT 
VL_MAP_VL_STRING_MAP_VL_STRING_INT 
VL_MAP_VL_STRING_VL_MAP_STRING_INT 
VL_MAP_VL_STRING_VL_MAP_VL_STRING_INT 
VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_STRING_DOUBLE 
VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_VL_STRING_DOUBLE 
VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_STRING_DOUBLE 
VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_VL_STRING_DOUBLE 
VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_STRING_DOUBLE 
VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_VL_STRING_DOUBLE 
VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_STRING_DOUBLE 
VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_VL_STRING_DOUBLE 
PAIR_INT_PAIR_STRING_STRING 
PAIR_INT_PAIR_VL_STRING_STRING 
PAIR_INT_PAIR_STRING_VL_STRING 
PAIR_INT_PAIR_VL_STRING_VL_STRING 
PAIR_DOUBLE_DOUBLE 
PAIR_PAIR_DOUBLE_DOUBLE_MAP_STRING_DOUBLE 
PAIR_PAIR_DOUBLE_DOUBLE_MAP_VL_STRING_DOUBLE 
PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_STRING_DOUBLE 
PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_VL_STRING_DOUBLE 

Definition at line 26 of file query_backend.h.

categorical (verbosity) levels for log statements.

Enumerator
LEV_ERROR 

Use for errors that require agent code or input file modification (use extremely sparingly)

LEV_WARN 

Use to report questionable simulation state (use extremely sparingly)

LEV_INFO1 

Information helpful for simulation users and developers alike - least verbose.

LEV_INFO2 

Information helpful for simulation users and developers alike.

LEV_INFO3 

Information helpful for simulation users and developers alike.

LEV_INFO4 

Information helpful for simulation users and developers alike.

LEV_INFO5 

Information helpful for simulation users and developers alike - most verbose.

LEV_DEBUG1 

debugging information - least verbose

LEV_DEBUG2 

debugging information

LEV_DEBUG3 

debugging information

LEV_DEBUG4 

debugging information

LEV_DEBUG5 

debugging information - most verbose

Definition at line 50 of file logger.h.

Enumerator
WARNING 
VALUE_WARNING 
KEY_WARNING 
STATE_WARNING 
IO_WARNING 
CAST_WARNING 
VALIDATION_WARNING 
DEPRECATION_WARNING 
PENDING_DEPRECATION_WARNING 
EXPERIMENTAL_WARNING 

Definition at line 83 of file error.h.

Function Documentation

template<class T >
static void cyclus::AcceptTrades ( Trader trader,
const std::vector< std::pair< Trade< T >, typename T::Ptr > > &  responses 
)
inlinestatic

Definition at line 75 of file trader_management.h.

template<>
void cyclus::AcceptTrades ( Trader trader,
const std::vector< std::pair< Trade< Material >, Material::Ptr > > &  responses 
)
inline

Definition at line 82 of file trader_management.h.

template<>
void cyclus::AcceptTrades ( Trader trader,
const std::vector< std::pair< Trade< Product >, Product::Ptr > > &  responses 
)
inline

Definition at line 89 of file trader_management.h.

template<class T >
void cyclus::AddBid ( ExchangeTranslationContext< T > &  translation_ctx,
Bid< T > *  b,
ExchangeNode::Ptr  n 
)
inline

Adds a bid-node mapping.

Definition at line 141 of file exchange_translator.h.

template<class T >
void cyclus::AddRequest ( ExchangeTranslationContext< T > &  translation_ctx,
Request< T > *  r,
ExchangeNode::Ptr  n 
)
inline

Adds a request-node mapping.

Definition at line 133 of file exchange_translator.h.

template<class T >
static void cyclus::AdjustPrefs ( Agent m,
typename PrefMap< T >::type &  prefs 
)
inlinestatic

Preference adjustment method helpers to convert from templates to the Agent inheritance hierarchy.

Definition at line 22 of file resource_exchange.h.

static void cyclus::AdjustPrefs ( Agent m,
PrefMap< Material >::type &  prefs 
)
inlinestatic

Definition at line 23 of file resource_exchange.h.

static void cyclus::AdjustPrefs ( Agent m,
PrefMap< Product >::type &  prefs 
)
inlinestatic

Definition at line 26 of file resource_exchange.h.

static void cyclus::AdjustPrefs ( Trader t,
PrefMap< Material >::type &  prefs 
)
inlinestatic

Definition at line 29 of file resource_exchange.h.

static void cyclus::AdjustPrefs ( Trader t,
PrefMap< Product >::type &  prefs 
)
inlinestatic

Definition at line 32 of file resource_exchange.h.

bool cyclus::AlmostEq ( double  d1,
double  d2 
)
inline

returns true if two doubles are within eps() of one another

Definition at line 29 of file cyc_limits.h.

double cyclus::AvgPref ( ExchangeNode::Ptr  n)
Returns
the average preference across arcs for a node

Definition at line 21 of file greedy_preconditioner.cc.

bool cyclus::AvgPrefComp ( ExchangeNode::Ptr  l,
ExchangeNode::Ptr  r 
)
inline

A comparison function for sorting a container of Nodes by the nodes preference in decensing order (i.e., most preferred Node first).

In the case of a tie, a lexicalgraphic ordering of node ids is used.

Definition at line 39 of file greedy_solver.h.

template<class T >
Trade<T> cyclus::BackTranslateMatch ( const ExchangeTranslationContext< T > &  translation_ctx,
const Match match 
)

simple translation from a Match to a Trade, given internal state

Definition at line 263 of file exchange_translator.h.

std::string cyclus::BuildFlatMasterSchema ( std::string  schema_path,
std::string  infile 
)

Builds and returns a master cyclus input xml schema defining a flat prototype and instance structure that includes the sub-schemas defined by all installed cyclus modules (e.g.

facility agents). This is used to validate simulation input files.

Definition at line 14 of file xml_flat_loader.cc.

std::string cyclus::BuildMasterSchema ( std::string  schema_path,
std::string  infile 
)

Builds and returns a master cyclus input xml schema that includes the sub-schemas defined by all installed cyclus modules (e.g.

facility agents). This is used to validate simulation input files.

Definition at line 76 of file xml_file_loader.cc.

void cyclus::Capacity ( cyclus::Arc const &  ,
double  ,
double   
)
Warning
Deprecated! Use the Capacity member functions defined in the GreedySolver class.

Definition at line 15 of file greedy_solver.cc.

void cyclus::Capacity ( boost::shared_ptr< cyclus::ExchangeNode ,
cyclus::Arc const &  ,
double   
)

Definition at line 16 of file greedy_solver.cc.

static int cyclus::CbcCallBack ( CbcModel *  model,
int  from 
)

this is taken exactly from driver4.cpp in the Cbc examples

Definition at line 14 of file solver_factory.cc.

template<typename T >
bool cyclus::CmpCond ( T *  x,
Cond cond 
)
inline

Compares a condiontion for a single value.

Definition at line 501 of file query_backend.h.

template<typename T >
bool cyclus::CmpConds ( T *  x,
std::vector< Cond * > *  conds 
)
inline

Compares all condiontions for a value.

Definition at line 534 of file query_backend.h.

int cyclus::differentAgent ( OsiSolverInterface &  lhs,
OsiSolverInterface &  rhs,
bool   
)

Definition at line 21 of file coin_helpers.cc.

std::set< std::string > cyclus::DiscoverArchetypes ( const std::string  s)

This function returns a vector of archetype names in a given string that is the binary represnetation of a module/shared-object/library.

Definition at line 23 of file discovery.cc.

Json::Value cyclus::DiscoverMetadataInCyclusPath ( )

Discover archetype metadata in cyclus path.

Returns
a Json::Value having the structure { "specs": ["<spec1>", "<spec2>", ...], "annotations": {"<spec1>": <annotation dict1>="">, ...}, "schema": {"<spec1>": "<schema1>"} }

Definition at line 146 of file discovery.cc.

std::set< std::string > cyclus::DiscoverSpecs ( std::string  p,
std::string  lib 
)

Discover archetype specifications for a path and library.

Definition at line 48 of file discovery.cc.

std::set< std::string > cyclus::DiscoverSpecsInCyclusPath ( )

Discover archetype specifications that live recursively in CYCLUS_PATH directories.

Definition at line 130 of file discovery.cc.

std::set< std::string > cyclus::DiscoverSpecsInDir ( std::string  d)

Discover archetype specifications that live recursively in modules in a dir.

Definition at line 80 of file discovery.cc.

double cyclus::eps ( )
inline

a generic epsilon value

Definition at line 12 of file cyc_limits.h.

double cyclus::eps_rsrc ( )
inline

an epsilon value to be used by resources

Definition at line 19 of file cyc_limits.h.

template<class T >
static void cyclus::GetTradeResponses ( TradeExecutionContext< T > &  trade_ctx)
static

queries each supplier for the responses to thier matched trade and populates trades_by_requester_ and all_trades_ with the results

Definition at line 131 of file trade_executor.h.

std::string cyclus::GetTraderPrototype ( Trader bidder)

Definition at line 10 of file bid_portfolio.cc.

std::string cyclus::GetTraderSpec ( Trader bidder)

Definition at line 15 of file bid_portfolio.cc.

template<class T >
void cyclus::GroupTradesBySupplier ( TradeExecutionContext< T > &  trade_ctx,
const std::vector< Trade< T > > &  trades 
)

populates suppliers_, requesters_, and trades_by_supplier_

Definition at line 118 of file trade_executor.h.

double cyclus::GroupWeight ( RequestGroup::Ptr  g,
std::map< std::string, double > *  weights,
std::map< ExchangeNode::Ptr, double > *  avg_prefs 
)
Returns
average RequestGroup weight

Definition at line 118 of file greedy_preconditioner.cc.

bool cyclus::HasInt ( OsiSolverInterface *  si)

Definition at line 166 of file solver_factory.cc.

template<>
std::list<int> cyclus::Hdf5Back::VLBufToVal< std::list< int > > ( const hvl_t &  buf)

Definition at line 3845 of file hdf5_back.cc.

template<>
std::list<std::string> cyclus::Hdf5Back::VLBufToVal< std::list< std::string > > ( const hvl_t &  buf)

Definition at line 3869 of file hdf5_back.cc.

template<>
std::map<int, double> cyclus::Hdf5Back::VLBufToVal< std::map< int, double > > ( const hvl_t &  buf)

Definition at line 3918 of file hdf5_back.cc.

template<>
std::map<int, int> cyclus::Hdf5Back::VLBufToVal< std::map< int, int > > ( const hvl_t &  buf)

Definition at line 3893 of file hdf5_back.cc.

template<>
std::map<int, std::string> cyclus::Hdf5Back::VLBufToVal< std::map< int, std::string > > ( const hvl_t &  buf)

Definition at line 3948 of file hdf5_back.cc.

template<>
std::map<std::pair<int, std::string>, double> cyclus::Hdf5Back::VLBufToVal< std::map< std::pair< int, std::string >, double > > ( const hvl_t &  buf)

Definition at line 4080 of file hdf5_back.cc.

template<>
std::map<std::string, double> cyclus::Hdf5Back::VLBufToVal< std::map< std::string, double > > ( const hvl_t &  buf)

Definition at line 4011 of file hdf5_back.cc.

template<>
std::map<std::string, int> cyclus::Hdf5Back::VLBufToVal< std::map< std::string, int > > ( const hvl_t &  buf)

Definition at line 3979 of file hdf5_back.cc.

template<>
std::map<std::string, std::string> cyclus::Hdf5Back::VLBufToVal< std::map< std::string, std::string > > ( const hvl_t &  buf)

Definition at line 4046 of file hdf5_back.cc.

template<>
std::set<int> cyclus::Hdf5Back::VLBufToVal< std::set< int > > ( const hvl_t &  buf)

Definition at line 3798 of file hdf5_back.cc.

template<>
std::set<std::string> cyclus::Hdf5Back::VLBufToVal< std::set< std::string > > ( const hvl_t &  buf)

Definition at line 3822 of file hdf5_back.cc.

template<>
std::vector<double> cyclus::Hdf5Back::VLBufToVal< std::vector< double > > ( const hvl_t &  buf)

Definition at line 3754 of file hdf5_back.cc.

template<>
std::vector<float> cyclus::Hdf5Back::VLBufToVal< std::vector< float > > ( const hvl_t &  buf)

Definition at line 3738 of file hdf5_back.cc.

template<>
std::vector<int> cyclus::Hdf5Back::VLBufToVal< std::vector< int > > ( const hvl_t &  buf)

Definition at line 3722 of file hdf5_back.cc.

template<>
std::vector<std::string> cyclus::Hdf5Back::VLBufToVal< std::vector< std::string > > ( const hvl_t &  buf)

Definition at line 3775 of file hdf5_back.cc.

template<>
std::string cyclus::Hdf5Back::VLRead< std::string, VL_STRING > ( const char *  rawkey)

Definition at line 100 of file hdf5_back.cc.

template<>
Digest cyclus::Hdf5Back::VLWrite< std::string, VL_STRING > ( const std::string &  x)

Definition at line 2761 of file hdf5_back.cc.

LMatrix cyclus::identity ( int  n)

Definition at line 284 of file l_matrix.cc.

void cyclus::InitAgent ( Agent a,
std::stringstream &  config,
Recorder rec,
SqliteBack back 
)

Definition at line 11 of file mock_sim.cc.

bool cyclus::IsNegative ( double  d)
inline

returns true if a double is less than 0 - eps()

Definition at line 24 of file cyc_limits.h.

void cyclus::LoadRawStringstreamFromFile ( std::stringstream &  stream,
std::string  file 
)

Reads the given file path into the passed stream without modification.

Definition at line 30 of file xml_file_loader.cc.

void cyclus::LoadStringstreamFromFile ( std::stringstream &  stream,
std::string  file 
)

Reads the given file path as XML into the passed stream.

Definition at line 40 of file xml_file_loader.cc.

template<typename Map >
bool cyclus::map_compare ( Map const &  lhs,
Map const &  rhs 
)

Definition at line 20 of file cyc_std.h.

std::string cyclus::ModuleConstructor ( std::string  module_spec)
Material::Ptr cyclus::NewBlankMaterial ( double  qty)

Creates and returns a new material with the specified quantity and a default, meaningless composition.

This is intended only for testing purposes.

Definition at line 232 of file material.cc.

double cyclus::NodeWeight ( ExchangeNode::Ptr  n,
std::map< std::string, double > *  weights,
double  avg_pref 
)
Returns
the node's weight given the node and commodity weight

Definition at line 133 of file greedy_preconditioner.cc.

LMatrix cyclus::operator* ( const LMatrix lhs,
const LMatrix rhs 
)

Definition at line 226 of file l_matrix.cc.

LMatrix cyclus::operator* ( const long double  k,
const LMatrix A 
)

Definition at line 234 of file l_matrix.cc.

LMatrix cyclus::operator* ( const LMatrix A,
const long double  k 
)

Definition at line 251 of file l_matrix.cc.

LMatrix cyclus::operator+ ( const LMatrix lhs,
const LMatrix rhs 
)

Definition at line 210 of file l_matrix.cc.

LMatrix cyclus::operator- ( const LMatrix lhs,
const LMatrix rhs 
)

Definition at line 218 of file l_matrix.cc.

template<class T >
bool cyclus::operator< ( const CapacityConstraint< T > &  lhs,
const CapacityConstraint< T > &  rhs 
)
inline

CapacityConstraint-CapacityConstraint comparison operator, allows usage in ordered containers.

Definition at line 133 of file capacity_constraint.h.

template<class T >
bool cyclus::operator== ( const cyclus::Trade< T > &  lhs,
const cyclus::Trade< T > &  rhs 
)

Trade-Trade equality operator.

Definition at line 33 of file trade.h.

bool cyclus::operator== ( const ExchangeNode lhs,
const ExchangeNode rhs 
)
inline

ExchangeNode-ExchangeNode equality operator.

Definition at line 49 of file exchange_graph.cc.

template<class T >
bool cyclus::operator== ( const CapacityConstraint< T > &  lhs,
const CapacityConstraint< T > &  rhs 
)
inline

CapacityConstraint-CapacityConstraint equality operator.

Definition at line 124 of file capacity_constraint.h.

LMatrix cyclus::operator^ ( const LMatrix A,
const int  k 
)

Definition at line 269 of file l_matrix.cc.

template<typename T >
T cyclus::OptionalQuery ( InfileTree tree,
std::string  query,
default_val 
)
inline

a query method for optional parameters

Parameters
treethe infile tree to use
querythe query to be made
default_valthe default value to use
Returns
either return the optional value if it exists or return the default value

Definition at line 121 of file infile_tree.h.

template<>
int cyclus::OptionalQuery ( InfileTree tree,
std::string  query,
int  default_val 
)
inline

Definition at line 130 of file infile_tree.h.

template<>
bool cyclus::OptionalQuery ( InfileTree tree,
std::string  query,
bool  default_val 
)
inline

Definition at line 142 of file infile_tree.h.

template<>
float cyclus::OptionalQuery ( InfileTree tree,
std::string  query,
float  default_val 
)
inline

Definition at line 155 of file infile_tree.h.

template<>
double cyclus::OptionalQuery ( InfileTree tree,
std::string  query,
double  default_val 
)
inline

Definition at line 167 of file infile_tree.h.

std::vector< AgentSpec > cyclus::ParseSpecs ( std::string  infile)

Returns a list of the full module+agent spec for all agents in the given input file.

Definition at line 49 of file xml_file_loader.cc.

template<class T >
static void cyclus::PopulateTradeResponses ( Trader trader,
const std::vector< Trade< T > > &  trades,
std::vector< std::pair< Trade< T >, typename T::Ptr > > &  responses 
)
inlinestatic

Definition at line 50 of file trader_management.h.

template<>
void cyclus::PopulateTradeResponses< Material > ( Trader trader,
const std::vector< Trade< Material > > &  trades,
std::vector< std::pair< Trade< Material >, Material::Ptr > > &  responses 
)
inline

Definition at line 59 of file trader_management.h.

template<>
void cyclus::PopulateTradeResponses< Product > ( Trader trader,
const std::vector< Trade< Product > > &  trades,
std::vector< std::pair< Trade< Product >, Product::Ptr > > &  responses 
)
inline

Definition at line 67 of file trader_management.h.

template<typename T >
T cyclus::Query ( InfileTree tree,
std::string  query,
int  index = 0 
)
inline

a query method for required parameters

Parameters
treethe infile tree to use
querythe query to be made
indexthe index of the queried element
Returns
either return the optional value if it exists or return the default value

Definition at line 84 of file infile_tree.h.

template<>
std::string cyclus::Query ( InfileTree tree,
std::string  query,
int  index 
)
inline

Definition at line 89 of file infile_tree.h.

template<>
int cyclus::Query ( InfileTree tree,
std::string  query,
int  index 
)
inline

Definition at line 94 of file infile_tree.h.

template<>
float cyclus::Query ( InfileTree tree,
std::string  query,
int  index 
)
inline

Definition at line 101 of file infile_tree.h.

template<>
double cyclus::Query ( InfileTree tree,
std::string  query,
int  index 
)
inline

Definition at line 108 of file infile_tree.h.

template<class T >
static std::set<typename BidPortfolio<T>::Ptr> cyclus::QueryBids ( Trader t,
typename CommodMap< T >::type &  map 
)
inlinestatic

Definition at line 33 of file trader_management.h.

template<>
std::set<BidPortfolio<Material>::Ptr> cyclus::QueryBids< Material > ( Trader t,
CommodMap< Material >::type &  map 
)
inline

Definition at line 39 of file trader_management.h.

template<>
std::set<BidPortfolio<Product>::Ptr> cyclus::QueryBids< Product > ( Trader t,
CommodMap< Product >::type &  map 
)
inline

Definition at line 45 of file trader_management.h.

template<class T >
static std::set<typename RequestPortfolio<T>::Ptr> cyclus::QueryRequests ( Trader t)
inlinestatic

Definition at line 15 of file trader_management.h.

template<>
std::set<RequestPortfolio<Material>::Ptr> cyclus::QueryRequests< Material > ( Trader t)
inline

Definition at line 21 of file trader_management.h.

template<>
std::set<RequestPortfolio<Product>::Ptr> cyclus::QueryRequests< Product > ( Trader t)
inline

Definition at line 27 of file trader_management.h.

Composition::Ptr cyclus::ReadRecipe ( InfileTree qe)

Creates a composition from the recipe in the query engine.

Definition at line 115 of file xml_file_loader.cc.

void cyclus::Report ( OsiSolverInterface *  iface)

Definition at line 12 of file prog_solver.cc.

void cyclus::ReportProg ( OsiSolverInterface *  si)

Definition at line 94 of file solver_factory.cc.

bool cyclus::ReqPrefComp ( const Arc l,
const Arc r 
)
inline

double Capacity(const Arc& a, double u_curr_qty, double v_curr_qty) { return 0; }

A comparison function for sorting a container of Arcs by the requester's (unode's) preference, in decensing order (i.e., most preferred Arc first). In the case of a tie, a lexicalgraphic ordering of node ids is used.

Definition at line 26 of file greedy_solver.h.

template<class T >
std::vector<typename T::Ptr> cyclus::ResCast ( std::vector< Resource::Ptr rs)

Casts a vector of Resources into a vector of a specific resource type T.

Definition at line 91 of file resource.h.

template<class T >
T::Ptr cyclus::ResCast ( Resource::Ptr  r)

Casts a Resource::Ptr into a pointer of a specific resource type T.

Definition at line 101 of file resource.h.

std::string cyclus::SanitizeSpec ( std::string  module_spec)
template<class T >
static void cyclus::SendTradeResources ( TradeExecutionContext< T > &  trade_ctx)
static

Definition at line 158 of file trade_executor.h.

void cyclus::SolveProg ( OsiSolverInterface *  si,
double  greedy_obj,
bool  verbose 
)

Definition at line 122 of file solver_factory.cc.

void cyclus::SolveProg ( OsiSolverInterface *  si)

Definition at line 154 of file solver_factory.cc.

void cyclus::SolveProg ( OsiSolverInterface *  si,
bool  verbose 
)

Definition at line 158 of file solver_factory.cc.

void cyclus::SolveProg ( OsiSolverInterface *  si,
double  greedy_obj 
)

Definition at line 162 of file solver_factory.cc.

std::vector<std::string> cyclus::split ( const std::string &  s,
char  delim 
)

Definition at line 28 of file sqlite_back.cc.

double cyclus::SumPref ( double  total,
std::pair< Arc, double >  pref 
)
inline

Definition at line 17 of file greedy_preconditioner.cc.

template<class T >
double cyclus::SumQty ( double  total,
Request< T > *  r 
)
inline

accumulator sum for request quantities

Definition at line 23 of file request_portfolio.h.

template<class T >
Arc cyclus::TranslateArc ( const ExchangeTranslationContext< T > &  translation_ctx,
Bid< T > *  bid 
)

translates an arc given a bid and subsequent data, and also updates the unit capacities for the associated nodes on the arc

Definition at line 235 of file exchange_translator.h.

template<class T >
Arc cyclus::TranslateArc ( const ExchangeTranslationContext< T > &  translation_ctx,
Bid< T > *  bid,
double  pref 
)

Definition at line 241 of file exchange_translator.h.

template<class T >
ExchangeNodeGroup::Ptr cyclus::TranslateBidPortfolio ( ExchangeTranslationContext< T > &  translation_ctx,
const typename BidPortfolio< T >::Ptr  bp 
)

translates a bid portfolio by adding bid nodes and accounting for capacities.

Bid unit capcities must be added when arcs are known

Definition at line 187 of file exchange_translator.h.

template<typename T >
void cyclus::TranslateCapacities ( typename T::Ptr  offer,
const typename std::set< CapacityConstraint< T > > &  constr,
ExchangeNode::Ptr  n,
const Arc a,
const ExchangeTranslationContext< T > &  ctx 
)

updates a node's unit capacities given, a target resource and constraints

Definition at line 279 of file exchange_translator.h.

template<class T >
RequestGroup::Ptr cyclus::TranslateRequestPortfolio ( ExchangeTranslationContext< T > &  translation_ctx,
const typename RequestPortfolio< T >::Ptr  rp 
)

translates a request portfolio by adding request nodes and accounting for capacities.

Request unit capcities must be added when arcs are known

Definition at line 151 of file exchange_translator.h.

template<Warnings T>
void cyclus::Warn ( const std::string &  msg)

Issue a warning with the approriate message, accoring to the current warning settings.

Definition at line 115 of file error.h.

std::map< Warnings, std::string > cyclus::warn_prefixes ( )

Creates the warning prefixes mapping.

Definition at line 20 of file error.cc.

Variable Documentation

double cyclus::cy_eps = 1e-6

generic epsilon values

Definition at line 15 of file context.cc.

double cyclus::cy_eps_rsrc = 1e-6

epsilon values to be used by resources

Definition at line 16 of file context.cc.

const double cyclus::float_ulp_eq = 2
static

distance in ULP within which floating point numbers should be considered equal.

Definition at line 35 of file cyc_limits.h.

const double cyclus::kConstraintEps = 1e-08
static

epsilon value to turn determine difference between constraint values

Definition at line 47 of file cyc_limits.h.

unsigned int const cyclus::kDefaultDumpCount = 10000
static

default number of Datum objects to collect before flushing to backends.

Definition at line 21 of file recorder.h.

const double cyclus::kDefaultPref = 1
static

Default preference values are unity.

This has been updated from values of zero (which was the case prior to release 1.4). Preferences can be lower or higher than the default value, but must be positive.

Definition at line 18 of file request.h.

const int cyclus::kIntBoundLimit = std::numeric_limits<int>::max()
static

maximum (+ or -) value for an integer variable

Definition at line 41 of file cyc_limits.h.

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

maximum (+ or -) value for a linear variable

Definition at line 44 of file cyc_limits.h.

const double cyclus::kModifierLimit = pow(10, 10)
static

maximum value for a function modifier (i.e., a_i for variable x_i)

Definition at line 38 of file cyc_limits.h.

std::map<const std::type_info*, DbTypes, compare> cyclus::type_map
static

Definition at line 469 of file sqlite_back.cc.

bool cyclus::warn_as_error = false

Flag for throwing an error when a warning happens.

Definition at line 15 of file error.cc.

std::map< Warnings, unsigned int > cyclus::warn_count
Initial value:
= std::map<Warnings,
unsigned int>()
Warnings
Definition: error.h:83

The number of warnings issues for each kind.

Definition at line 17 of file error.cc.

unsigned int cyclus::warn_limit = 42

This is maximum number of times to issue a warning of each kind.

Definition at line 13 of file error.cc.

std::map< Warnings, std::string > cyclus::warn_prefix = warn_prefixes()

The number of warnings issues for each kind.

Definition at line 34 of file error.cc.