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 SetPackage ()
 
void SetPackage ()
 

Private Attributes

std::vector< intcycpp_shape_inventory
 
std::vector< intcycpp_shape_inventory_size
 
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
 
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.

References inventory_size, package, throughput, and transport_unit.

Referenced by cycamore::ConstructSource(), and InitFrom().

◆ ~Source() [1/2]

cycamore::Source::~Source ( )
virtual

Definition at line 19 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 100 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 115 of file build/cycamore/source.cc.

References inventory, inventory_size, and outrecipe.

◆ 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.

References InitFrom().

◆ EnterNotify() [1/2]

void cycamore::Source::EnterNotify ( )
virtual

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

◆ 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 131 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 187 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()

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

◆ 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

References Source().

◆ InitInv()

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

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

References inventory.

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

References inventory.

◆ str() [1/2]

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

Definition at line 88 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 325 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 327 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.

References SourceTest.

Referenced by SourceTest.

Member Data Documentation

◆ cycpp_shape_inventory

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

Definition at line 395 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 367 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 353 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 360 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 381 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 374 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 388 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

◆ outcommod

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

◆ outrecipe

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

◆ package

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

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

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

◆ throughput

◆ transport_unit

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

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