CYCAMORE
Public Member Functions | Private Attributes | Friends | List of all members
cycamore::Source Class Reference

This facility acts as a source of material with a fixed throughput (per time step) capacity and a lifetime capacity defined by a total inventory size. More...

#include <source.h>

Inheritance diagram for cycamore::Source:

Public Member Functions

virtual Json::Value annotations ()
 
virtual cyclus::Agent * Clone ()
 
virtual std::set< cyclus::BidPortfolio< cyclus::Material >::Ptr > GetMatlBids (cyclus::CommodMap< cyclus::Material >::type &commod_requests)
 
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 GetMatlTrades (const std::vector< cyclus::Trade< cyclus::Material > > &trades, std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &responses)
 
virtual void InfileToDb (cyclus::InfileTree *tree, cyclus::DbInit di)
 
virtual void InitFrom (Source *m)
 
virtual void InitFrom (cyclus::QueryableBackend *b)
 
virtual void InitFrom (Source *m)
 
virtual void InitFrom (cyclus::QueryableBackend *b)
 
virtual void InitInv (cyclus::Inventories &inv)
 
virtual std::string schema ()
 
virtual void Snapshot (cyclus::DbInit di)
 
virtual cyclus::Inventories SnapshotInv ()
 
 Source (cyclus::Context *ctx)
 
 Source (cyclus::Context *ctx)
 
virtual std::string str ()
 
virtual std::string str ()
 
virtual void Tick ()
 
virtual void Tick ()
 
virtual void Tock ()
 
virtual void Tock ()
 
virtual std::string version ()
 
virtual std::string version ()
 
virtual ~Source ()
 
virtual ~Source ()
 

Private Attributes

std::vector< intcycpp_shape_inventory_size
 
std::vector< intcycpp_shape_outcommod
 
std::vector< intcycpp_shape_outrecipe
 
std::vector< intcycpp_shape_throughput
 
double inventory_size
 
std::string outcommod
 
std::string outrecipe
 
double throughput
 

Friends

class SourceTest
 

Detailed Description

This facility acts as a source of material with a fixed throughput (per time step) capacity and a lifetime capacity defined by a total inventory size.

It offers its material as a single commodity. If a composition recipe is specified, it provides that single material composition to requesters. If unspecified, the source provides materials with the exact requested compositions. The inventory size and throughput both default to infinite. Supplies material results in corresponding decrease in inventory, and when the inventory size reaches zero, the source can provide no more material.

Definition at line 25 of file _tmp_build/cycamore/source.h.

Constructor & Destructor Documentation

cycamore::Source::Source ( cyclus::Context *  ctx)

Definition at line 12 of file _tmp_build/cycamore/source.cc.

Referenced by cycamore::ConstructSource().

cycamore::Source::~Source ( )
virtual

Definition at line 17 of file _tmp_build/cycamore/source.cc.

cycamore::Source::Source ( cyclus::Context *  ctx)
virtual cycamore::Source::~Source ( )
virtual

Member Function Documentation

virtual Json::Value cycamore::Source::annotations ( )
inlinevirtual

Definition at line 69 of file _tmp_build/cycamore/source.h.

virtual cyclus::Agent* cycamore::Source::Clone ( )
inlinevirtual

Definition at line 39 of file _tmp_build/cycamore/source.h.

References InitFrom(), and m.

Referenced by cycamore::TEST_F().

virtual std::set<cyclus::BidPortfolio<cyclus::Material>::Ptr> cycamore::Source::GetMatlBids ( cyclus::CommodMap< cyclus::Material >::type &  commod_requests)
virtual
std::set< cyclus::BidPortfolio< cyclus::Material >::Ptr > cycamore::Source::GetMatlBids ( cyclus::CommodMap< cyclus::Material >::type &  commod_requests)
virtual

Definition at line 76 of file _tmp_build/cycamore/source.cc.

References cc, inventory_size, m, outcommod, outrecipe, str(), and throughput.

Referenced by cycamore::TEST_F(), and Tock().

virtual void cycamore::Source::GetMatlTrades ( const std::vector< cyclus::Trade< cyclus::Material > > &  trades,
std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &  responses 
)
virtual
void cycamore::Source::GetMatlTrades ( const std::vector< cyclus::Trade< cyclus::Material > > &  trades,
std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &  responses 
)
virtual

Definition at line 116 of file _tmp_build/cycamore/source.cc.

References inventory_size, outcommod, and outrecipe.

Referenced by cycamore::TEST_F(), and Tock().

virtual void cycamore::Source::InfileToDb ( cyclus::InfileTree *  tree,
cyclus::DbInit  di 
)
inlinevirtual
virtual void cycamore::Source::InitFrom ( Source m)
virtual
virtual void cycamore::Source::InitFrom ( cyclus::QueryableBackend *  b)
virtual
void cycamore::Source::InitFrom ( Source m)
virtual
void cycamore::Source::InitFrom ( cyclus::QueryableBackend *  b)
virtual
virtual void cycamore::Source::InitInv ( cyclus::Inventories &  inv)
inlinevirtual

Definition at line 193 of file _tmp_build/cycamore/source.h.

References InitFrom(), and m.

virtual std::string cycamore::Source::schema ( )
inlinevirtual

Definition at line 45 of file _tmp_build/cycamore/source.h.

virtual void cycamore::Source::Snapshot ( cyclus::DbInit  di)
inlinevirtual
virtual cyclus::Inventories cycamore::Source::SnapshotInv ( )
inlinevirtual

Definition at line 188 of file _tmp_build/cycamore/source.h.

virtual std::string cycamore::Source::str ( )
virtual
std::string cycamore::Source::str ( )
virtual

Definition at line 56 of file _tmp_build/cycamore/source.cc.

References outcommod, outrecipe, cycamore::string, and throughput.

Referenced by GetMatlBids(), cycamore::TEST_F(), and Tock().

virtual void cycamore::Source::Tick ( )
inlinevirtual

Definition at line 59 of file src/source.h.

virtual void cycamore::Source::Tick ( )
inlinevirtual

Definition at line 201 of file _tmp_build/cycamore/source.h.

Referenced by cycamore::TEST_F().

virtual void cycamore::Source::Tock ( )
inlinevirtual
virtual void cycamore::Source::Tock ( )
inlinevirtual

Definition at line 203 of file _tmp_build/cycamore/source.h.

References GetMatlBids(), GetMatlTrades(), str(), and cycamore::string.

virtual std::string cycamore::Source::version ( )
inlinevirtual

Definition at line 32 of file src/source.h.

References CYCAMORE_VERSION, InitFrom(), and m.

virtual std::string cycamore::Source::version ( )
inlinevirtual

Definition at line 34 of file _tmp_build/cycamore/source.h.

References CYCAMORE_VERSION.

Friends And Related Function Documentation

SourceTest
friend

Definition at line 27 of file _tmp_build/cycamore/source.h.

Member Data Documentation

std::vector<int> cycamore::Source::cycpp_shape_inventory_size
private

Definition at line 234 of file _tmp_build/cycamore/source.h.

Referenced by InfileToDb(), InitFrom(), and Snapshot().

std::vector<int> cycamore::Source::cycpp_shape_outcommod
private

Definition at line 220 of file _tmp_build/cycamore/source.h.

Referenced by InfileToDb(), InitFrom(), and Snapshot().

std::vector<int> cycamore::Source::cycpp_shape_outrecipe
private

Definition at line 227 of file _tmp_build/cycamore/source.h.

Referenced by InfileToDb(), InitFrom(), and Snapshot().

std::vector<int> cycamore::Source::cycpp_shape_throughput
private

Definition at line 241 of file _tmp_build/cycamore/source.h.

Referenced by InfileToDb(), InitFrom(), and Snapshot().

double cycamore::Source::inventory_size
private
std::string cycamore::Source::outcommod
private
std::string cycamore::Source::outrecipe
private
double cycamore::Source::throughput
private

The documentation for this class was generated from the following files: