CYCAMORE
Loading...
Searching...
No Matches
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 void Build (cyclus::Agent *parent)
 — Facility Members — perform module-specific tasks when entering the simulation
 
virtual void Build (cyclus::Agent *parent)
 — Facility Members — perform module-specific tasks when entering the simulation
 
virtual cyclus::Agent * Clone ()
 
virtual void EnterNotify ()
 
virtual void EnterNotify ()
 
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 (cyclus::QueryableBackend *b)
 
virtual void InitFrom (cyclus::QueryableBackend *b)
 
virtual void InitFrom (Source *m)
 
virtual void InitFrom (Source *m)
 
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 ()
 
void SetPackage ()
 
void SetPackage ()
 

Private Attributes

cyclus::toolkit::Position coordinates
 
std::vector< intcycpp_shape_inventory
 
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_package
 
std::vector< intcycpp_shape_throughput
 
std::vector< intcycpp_shape_transport_unit
 
cyclus::toolkit::ResBuf< cyclus::Material > inventory
 
double inventory_size
 
double latitude
 
double longitude
 
std::string outcommod
 
std::string outrecipe
 
std::string package
 
double throughput
 
std::string transport_unit
 

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 27 of file build/cycamore/source.h.

Constructor & Destructor Documentation

◆ Source() [1/2]

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

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

Referenced by cycamore::ConstructSource().

◆ ~Source() [1/2]

cycamore::Source::~Source ( )
virtual

Definition at line 22 of file 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 92 of file build/cycamore/source.h.

◆ Build() [1/2]

void cycamore::Source::Build ( cyclus::Agent * parent)
virtual

— Facility Members — perform module-specific tasks when entering the simulation

Definition at line 118 of file build/cycamore/source.cc.

References inventory, inventory_size, and outrecipe.

Referenced by cycamore::SourceTest::SetUp().

◆ Build() [2/2]

virtual void cycamore::Source::Build ( cyclus::Agent * parent)
virtual

— Facility Members — perform module-specific tasks when entering the simulation

◆ Clone()

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

Definition at line 42 of file build/cycamore/source.h.

◆ EnterNotify() [1/2]

void cycamore::Source::EnterNotify ( )
virtual

Definition at line 113 of file build/cycamore/source.cc.

References RecordPosition().

◆ EnterNotify() [2/2]

virtual void cycamore::Source::EnterNotify ( )
virtual

◆ GetMatlBids() [1/2]

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

Definition at line 134 of file build/cycamore/source.cc.

References inventory, outcommod, outrecipe, package, str(), throughput, and transport_unit.

◆ GetMatlBids() [2/2]

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

◆ GetMatlTrades() [1/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 190 of file build/cycamore/source.cc.

References inventory, outcommod, outrecipe, package, and transport_unit.

◆ GetMatlTrades() [2/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

◆ InfileToDb()

◆ InitFrom() [1/4]

◆ InitFrom() [2/4]

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

◆ InitFrom() [3/4]

◆ InitFrom() [4/4]

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

◆ InitInv()

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

Definition at line 307 of file build/cycamore/source.h.

References inventory.

◆ RecordPosition() [1/2]

void cycamore::Source::RecordPosition ( )
private

Definition at line 238 of file build/cycamore/source.cc.

References latitude, and longitude.

Referenced by EnterNotify().

◆ RecordPosition() [2/2]

void cycamore::Source::RecordPosition ( )
private

◆ schema()

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

Definition at line 48 of file build/cycamore/source.h.

◆ SetPackage() [1/2]

void cycamore::Source::SetPackage ( )
private

◆ SetPackage() [2/2]

void cycamore::Source::SetPackage ( )
private

◆ Snapshot()

◆ SnapshotInv()

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

Definition at line 300 of file build/cycamore/source.h.

References inventory.

◆ str() [1/2]

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

Definition at line 91 of file build/cycamore/source.cc.

References outcommod, outrecipe, and throughput.

Referenced by GetMatlBids().

◆ str() [2/2]

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

◆ Tick() [1/2]

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

Definition at line 317 of file build/cycamore/source.h.

◆ Tick() [2/2]

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

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

◆ Tock() [1/2]

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

Definition at line 319 of file build/cycamore/source.h.

◆ Tock() [2/2]

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

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

◆ version() [1/2]

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

Definition at line 37 of file build/cycamore/source.h.

References CYCAMORE_VERSION.

◆ version() [2/2]

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

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

References CYCAMORE_VERSION.

Friends And Related Symbol Documentation

◆ SourceTest

SourceTest
friend

Definition at line 30 of file build/cycamore/source.h.

Member Data Documentation

◆ coordinates

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

Definition at line 402 of file build/cycamore/source.h.

◆ cycpp_shape_inventory

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

Definition at line 398 of file build/cycamore/source.h.

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

◆ cycpp_shape_inventory_size

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

Definition at line 356 of file build/cycamore/source.h.

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

◆ cycpp_shape_latitude

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

Definition at line 384 of file build/cycamore/source.h.

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

◆ cycpp_shape_longitude

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

Definition at line 391 of file build/cycamore/source.h.

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

◆ cycpp_shape_outcommod

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

Definition at line 342 of file build/cycamore/source.h.

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

◆ cycpp_shape_outrecipe

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

Definition at line 349 of file build/cycamore/source.h.

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

◆ cycpp_shape_package

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

Definition at line 370 of file build/cycamore/source.h.

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

◆ cycpp_shape_throughput

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

Definition at line 363 of file build/cycamore/source.h.

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

◆ cycpp_shape_transport_unit

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

Definition at line 377 of file build/cycamore/source.h.

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

◆ inventory

cyclus::toolkit::ResBuf< cyclus::Material > cycamore::Source::inventory
private

◆ inventory_size

double cycamore::Source::inventory_size
private

Definition at line 355 of file build/cycamore/source.h.

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

◆ latitude

double cycamore::Source::latitude
private

◆ longitude

double cycamore::Source::longitude
private

◆ outcommod

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

◆ outrecipe

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

◆ package

std::string cycamore::Source::package
private

Definition at line 369 of file build/cycamore/source.h.

Referenced by GetMatlBids(), GetMatlTrades(), InfileToDb(), and Snapshot().

◆ throughput

double cycamore::Source::throughput
private

◆ transport_unit

std::string cycamore::Source::transport_unit
private

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