CYCAMORE
Public Member Functions | Private 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:
Inheritance graph
[legend]
Collaboration diagram for cycamore::Source:
Collaboration graph
[legend]

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 Member Functions

void RecordPosition ()
 
void RecordPosition ()
 

Private Attributes

cyclus::toolkit::Position coordinates
 
std::vector< intcycpp_shape_inventory_size
 
std::vector< intcycpp_shape_latitude
 
std::vector< intcycpp_shape_longitude
 
std::vector< intcycpp_shape_outcommod
 
std::vector< intcycpp_shape_outrecipe
 
std::vector< intcycpp_shape_throughput
 
double inventory_size
 
double latitude
 
double longitude
 
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

◆ Source() [1/2]

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

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

Referenced by cycamore::ConstructSource().

◆ ~Source() [1/2]

cycamore::Source::~Source ( )
virtual

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

◆ Source() [2/2]

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

◆ ~Source() [2/2]

virtual cycamore::Source::~Source ( )
virtual

Member Function Documentation

◆ annotations()

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

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

◆ Clone()

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

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

References InitFrom().

Referenced by cycamore::TEST_F().

Here is the call graph for this function:

◆ GetMatlBids() [1/2]

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

◆ GetMatlBids() [2/2]

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

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

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

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

Here is the call graph for this function:

◆ GetMatlTrades() [1/2]

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

◆ GetMatlTrades() [2/2]

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 135 of file _tmp_build/cycamore/source.cc.

References inventory_size, outcommod, and outrecipe.

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

◆ InfileToDb()

virtual void cycamore::Source::InfileToDb ( cyclus::InfileTree *  tree,
cyclus::DbInit  di 
)
inlinevirtual

◆ InitFrom() [1/4]

virtual void cycamore::Source::InitFrom ( Source m)
virtual

◆ InitFrom() [2/4]

virtual void cycamore::Source::InitFrom ( cyclus::QueryableBackend *  b)
virtual

◆ InitFrom() [3/4]

void cycamore::Source::InitFrom ( Source m)
virtual

◆ InitFrom() [4/4]

void cycamore::Source::InitFrom ( cyclus::QueryableBackend *  b)
virtual

◆ InitInv()

virtual void cycamore::Source::InitInv ( cyclus::Inventories &  inv)
inlinevirtual

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

References InitFrom().

Here is the call graph for this function:

◆ RecordPosition() [1/2]

void cycamore::Source::RecordPosition ( )
private

◆ RecordPosition() [2/2]

void cycamore::Source::RecordPosition ( )
private

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

References latitude, longitude, and cycamore::string.

Referenced by InitFrom(), and Tock().

◆ schema()

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

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

◆ Snapshot()

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

◆ SnapshotInv()

virtual cyclus::Inventories cycamore::Source::SnapshotInv ( )
inlinevirtual

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

◆ str() [1/2]

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

◆ str() [2/2]

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

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

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

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

◆ Tick() [1/2]

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

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

◆ Tick() [2/2]

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

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

Referenced by cycamore::TEST_F().

◆ Tock() [1/2]

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

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

References coordinates, GetMatlBids(), GetMatlTrades(), inventory_size, latitude, longitude, outcommod, outrecipe, RecordPosition(), str(), cycamore::string, and throughput.

Here is the call graph for this function:

◆ Tock() [2/2]

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

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

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

Here is the call graph for this function:

◆ version() [1/2]

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

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

References CYCAMORE_VERSION, and InitFrom().

Here is the call graph for this function:

◆ version() [2/2]

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

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

References CYCAMORE_VERSION.

Friends And Related Function Documentation

◆ SourceTest

SourceTest
friend

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

Member Data Documentation

◆ coordinates

cyclus::toolkit::Position cycamore::Source::coordinates
private

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

Referenced by Tock().

◆ cycpp_shape_inventory_size

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

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

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

◆ cycpp_shape_latitude

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

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

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

◆ cycpp_shape_longitude

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

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

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

◆ cycpp_shape_outcommod

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

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

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

◆ cycpp_shape_outrecipe

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

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

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

◆ cycpp_shape_throughput

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

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

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

◆ inventory_size

double cycamore::Source::inventory_size
private

◆ latitude

double cycamore::Source::latitude
private

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

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

◆ longitude

double cycamore::Source::longitude
private

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

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

◆ outcommod

std::string cycamore::Source::outcommod
private

◆ outrecipe

std::string cycamore::Source::outrecipe
private

◆ throughput

double cycamore::Source::throughput
private

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