CYCAMORE
Loading...
Searching...
No Matches
cycamore::Mixer Class Reference

Mixer mixes N streams with fixed, static, user-specified ratios into a single output stream. More...

#include <mixer.h>

Inheritance diagram for cycamore::Mixer:

Public Member Functions

virtual void AcceptMatlTrades (const std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &responses)
 
virtual void AcceptMatlTrades (const std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > &responses)
 
virtual Json::Value annotations ()
 
virtual cyclus::Agent * Clone ()
 
virtual void EnterNotify ()
 
virtual void EnterNotify ()
 
virtual std::set< cyclus::RequestPortfolio< cyclus::Material >::Ptr > GetMatlRequests ()
 
virtual std::set< cyclus::RequestPortfolio< cyclus::Material >::Ptr > GetMatlRequests ()
 
virtual void InfileToDb (cyclus::InfileTree *tree, cyclus::DbInit di)
 
virtual void InitFrom (cycamore::Mixer *m)
 
virtual void InitFrom (cyclus::QueryableBackend *b)
 
virtual void InitInv (cyclus::Inventories &inv)
 
virtual void InitInv (cyclus::Inventories &inv)
 
 Mixer (cyclus::Context *ctx)
 
 Mixer (cyclus::Context *ctx)
 
virtual std::string schema ()
 
virtual void Snapshot (cyclus::DbInit di)
 
virtual cyclus::Inventories SnapshotInv ()
 
virtual cyclus::Inventories SnapshotInv ()
 
virtual void Tick ()
 
virtual void Tick ()
 
virtual void Tock ()
 
virtual void Tock ()
 
virtual ~Mixer ()
 
virtual ~Mixer ()
 

Protected Attributes

std::vector< intcycpp_shape_out_buf_size
 
std::vector< intcycpp_shape_out_commod
 
std::vector< intcycpp_shape_output
 
std::vector< intcycpp_shape_streams_
 
std::vector< intcycpp_shape_throughput
 
std::vector< double > in_buf_sizes
 
std::vector< std::map< std::string, double > > in_commods
 
std::vector< double > mixing_ratios
 
double out_buf_size
 
std::string out_commod
 
cyclus::toolkit::ResBuf< cyclus::Material > output
 
std::map< cyclus::Request< cyclus::Material > *, std::string > req_inventories_
 
cyclus::toolkit::MatlSellPolicy sell_policy
 
std::map< std::string, cyclus::toolkit::ResBuf< cyclus::Material > > streambufs
 
std::vector< std::pair< std::pair< double, double >, std::map< std::string, double > > > streams_
 
double throughput
 

Private Member Functions

void RecordPosition ()
 Records an agent's latitude and longitude to the output db.
 
void RecordPosition ()
 Records an agent's latitude and longitude to the output db.
 

Private Attributes

cyclus::toolkit::Position coordinates
 
std::vector< intcycpp_shape_latitude
 
std::vector< intcycpp_shape_longitude
 
double latitude
 
double longitude
 

Friends

class MixerTest
 

Detailed Description

Mixer mixes N streams with fixed, static, user-specified ratios into a single output stream.

The Mixer has N input inventories: one for each streams to be mixed, and one output stream. The supplying of mixed material is constrained by available inventory of mixed material quantities.

Definition at line 19 of file build/cycamore/mixer.h.

Constructor & Destructor Documentation

◆ Mixer() [1/2]

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

Definition at line 9 of file build/cycamore/mixer.cc.

References RecordPosition().

◆ ~Mixer() [1/2]

virtual cycamore::Mixer::~Mixer ( )
inlinevirtual

Definition at line 29 of file build/cycamore/mixer.h.

◆ Mixer() [2/2]

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

◆ ~Mixer() [2/2]

virtual cycamore::Mixer::~Mixer ( )
inlinevirtual

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

Member Function Documentation

◆ AcceptMatlTrades() [1/2]

void cycamore::Mixer::AcceptMatlTrades ( const std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > & responses)
virtual

Definition at line 176 of file build/cycamore/mixer.cc.

References req_inventories_, and streambufs.

◆ AcceptMatlTrades() [2/2]

virtual void cycamore::Mixer::AcceptMatlTrades ( const std::vector< std::pair< cyclus::Trade< cyclus::Material >, cyclus::Material::Ptr > > & responses)
virtual

◆ annotations()

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

Definition at line 285 of file build/cycamore/mixer.h.

◆ Clone()

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

Definition at line 41 of file build/cycamore/mixer.h.

◆ EnterNotify() [1/2]

void cycamore::Mixer::EnterNotify ( )
virtual

◆ EnterNotify() [2/2]

virtual void cycamore::Mixer::EnterNotify ( )
virtual

◆ GetMatlRequests() [1/2]

std::set< cyclus::RequestPortfolio< cyclus::Material >::Ptr > cycamore::Mixer::GetMatlRequests ( )
virtual

Definition at line 132 of file build/cycamore/mixer.cc.

References in_commods, mixing_ratios, req_inventories_, and streambufs.

◆ GetMatlRequests() [2/2]

virtual std::set< cyclus::RequestPortfolio< cyclus::Material >::Ptr > cycamore::Mixer::GetMatlRequests ( )
virtual

◆ InfileToDb()

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

◆ InitFrom() [1/2]

◆ InitFrom() [2/2]

virtual void cycamore::Mixer::InitFrom ( cyclus::QueryableBackend * b)
inlinevirtual

◆ InitInv() [1/2]

void cycamore::Mixer::InitInv ( cyclus::Inventories & inv)
virtual

Definition at line 38 of file build/cycamore/mixer.cc.

References output, and streambufs.

◆ InitInv() [2/2]

virtual void cycamore::Mixer::InitInv ( cyclus::Inventories & inv)
virtual

◆ RecordPosition() [1/2]

void cycamore::Mixer::RecordPosition ( )
private

Records an agent's latitude and longitude to the output db.

Definition at line 206 of file build/cycamore/mixer.cc.

References latitude, and longitude.

Referenced by Mixer().

◆ RecordPosition() [2/2]

void cycamore::Mixer::RecordPosition ( )
private

Records an agent's latitude and longitude to the output db.

◆ schema()

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

Definition at line 224 of file build/cycamore/mixer.h.

◆ Snapshot()

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

◆ SnapshotInv() [1/2]

cyclus::Inventories cycamore::Mixer::SnapshotInv ( )
virtual

Definition at line 20 of file build/cycamore/mixer.cc.

References output, and streambufs.

◆ SnapshotInv() [2/2]

virtual cyclus::Inventories cycamore::Mixer::SnapshotInv ( )
virtual

◆ Tick() [1/2]

void cycamore::Mixer::Tick ( )
virtual

Definition at line 100 of file build/cycamore/mixer.cc.

References mixing_ratios, out_commod, output, streambufs, and throughput.

◆ Tick() [2/2]

virtual void cycamore::Mixer::Tick ( )
virtual

◆ Tock() [1/2]

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

Definition at line 32 of file build/cycamore/mixer.h.

◆ Tock() [2/2]

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

Definition at line 36 of file src/mixer.h.

Friends And Related Symbol Documentation

◆ MixerTest

MixerTest
friend

Definition at line 25 of file build/cycamore/mixer.h.

Member Data Documentation

◆ coordinates

cyclus::toolkit::Position cycamore::Mixer::coordinates
private

Definition at line 439 of file build/cycamore/mixer.h.

◆ cycpp_shape_latitude

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

Definition at line 428 of file build/cycamore/mixer.h.

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

◆ cycpp_shape_longitude

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

Definition at line 435 of file build/cycamore/mixer.h.

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

◆ cycpp_shape_out_buf_size

std::vector<int> cycamore::Mixer::cycpp_shape_out_buf_size
protected

Definition at line 400 of file build/cycamore/mixer.h.

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

◆ cycpp_shape_out_commod

std::vector<int> cycamore::Mixer::cycpp_shape_out_commod
protected

Definition at line 393 of file build/cycamore/mixer.h.

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

◆ cycpp_shape_output

std::vector<int> cycamore::Mixer::cycpp_shape_output
protected

Definition at line 406 of file build/cycamore/mixer.h.

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

◆ cycpp_shape_streams_

std::vector<int> cycamore::Mixer::cycpp_shape_streams_
protected

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

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

◆ cycpp_shape_throughput

std::vector<int> cycamore::Mixer::cycpp_shape_throughput
protected

Definition at line 413 of file build/cycamore/mixer.h.

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

◆ in_buf_sizes

std::vector< double > cycamore::Mixer::in_buf_sizes
protected

◆ in_commods

std::vector< std::map< std::string, double > > cycamore::Mixer::in_commods
protected

Definition at line 381 of file build/cycamore/mixer.h.

Referenced by EnterNotify(), and GetMatlRequests().

◆ latitude

double cycamore::Mixer::latitude
private

Definition at line 427 of file build/cycamore/mixer.h.

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

◆ longitude

double cycamore::Mixer::longitude
private

Definition at line 434 of file build/cycamore/mixer.h.

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

◆ mixing_ratios

std::vector< double > cycamore::Mixer::mixing_ratios
protected

◆ out_buf_size

double cycamore::Mixer::out_buf_size
protected

◆ out_commod

std::string cycamore::Mixer::out_commod
protected

◆ output

cyclus::toolkit::ResBuf< cyclus::Material > cycamore::Mixer::output
protected

◆ req_inventories_

std::map< cyclus::Request< cyclus::Material > *, std::string > cycamore::Mixer::req_inventories_
protected

Definition at line 419 of file build/cycamore/mixer.h.

Referenced by AcceptMatlTrades(), and GetMatlRequests().

◆ sell_policy

cyclus::toolkit::MatlSellPolicy cycamore::Mixer::sell_policy
protected

Definition at line 422 of file build/cycamore/mixer.h.

Referenced by EnterNotify().

◆ streambufs

std::map< std::string, cyclus::toolkit::ResBuf< cyclus::Material > > cycamore::Mixer::streambufs
protected

◆ streams_

std::vector< std::pair< std::pair< double, double >, std::map< std::string, double > > > cycamore::Mixer::streams_
protected

◆ throughput

double cycamore::Mixer::throughput
protected

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