CYCAMORE
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for cycamore::Mixer:
Collaboration graph
[legend]

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. More...
 
void RecordPosition ()
 Records an agent's latitude and longitude to the output db. More...
 

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 17 of file _tmp_build/cycamore/mixer.h.

Constructor & Destructor Documentation

◆ Mixer() [1/2]

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

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

References RecordPosition().

Referenced by cycamore::ConstructMixer().

Here is the call graph for this function:

◆ ~Mixer() [1/2]

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

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

References Tick().

Here is the call graph for this function:

◆ Mixer() [2/2]

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

◆ ~Mixer() [2/2]

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

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

References Tick().

Here is the call graph for this function:

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 178 of file _tmp_build/cycamore/mixer.cc.

References req_inventories_, streambufs, and cycamore::string.

Referenced by Tock().

◆ 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 283 of file _tmp_build/cycamore/mixer.h.

◆ Clone()

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

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

References InitFrom().

Here is the call graph for this function:

◆ 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 133 of file _tmp_build/cycamore/mixer.cc.

References in_commods, mixing_ratios, req_inventories_, streambufs, and cycamore::string.

Referenced by Tock().

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

virtual void cycamore::Mixer::InitFrom ( cycamore::Mixer m)
inlinevirtual

◆ InitFrom() [2/2]

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

◆ InitInv() [1/2]

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

◆ InitInv() [2/2]

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

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

References output, and streambufs.

Referenced by Snapshot(), and Tock().

◆ RecordPosition() [1/2]

void cycamore::Mixer::RecordPosition ( )
private

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

◆ RecordPosition() [2/2]

void cycamore::Mixer::RecordPosition ( )
private

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

Definition at line 208 of file _tmp_build/cycamore/mixer.cc.

References latitude, longitude, and cycamore::string.

Referenced by Mixer(), and Tock().

◆ schema()

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

Definition at line 222 of file _tmp_build/cycamore/mixer.h.

◆ Snapshot()

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

◆ SnapshotInv() [1/2]

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

◆ SnapshotInv() [2/2]

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

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

References output, and streambufs.

Referenced by Snapshot(), and Tock().

◆ Tick() [1/2]

void cycamore::Mixer::Tick ( )
virtual

◆ Tick() [2/2]

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

◆ Tock() [1/2]

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

Definition at line 30 of file _tmp_build/cycamore/mixer.h.

References AcceptMatlTrades(), EnterNotify(), and GetMatlRequests().

Here is the call graph for this function:

◆ Tock() [2/2]

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

Friends And Related Function Documentation

◆ MixerTest

MixerTest
friend

Definition at line 23 of file _tmp_build/cycamore/mixer.h.

Member Data Documentation

◆ coordinates

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

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

Referenced by Tock().

◆ cycpp_shape_latitude

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

Definition at line 423 of file _tmp_build/cycamore/mixer.h.

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

◆ cycpp_shape_longitude

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

Definition at line 430 of file _tmp_build/cycamore/mixer.h.

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

◆ cycpp_shape_out_buf_size

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

Definition at line 395 of file _tmp_build/cycamore/mixer.h.

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

◆ cycpp_shape_out_commod

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

Definition at line 388 of file _tmp_build/cycamore/mixer.h.

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

◆ cycpp_shape_output

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

Definition at line 401 of file _tmp_build/cycamore/mixer.h.

Referenced by InfileToDb(), and InitFrom().

◆ cycpp_shape_streams_

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

Definition at line 372 of file _tmp_build/cycamore/mixer.h.

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

◆ cycpp_shape_throughput

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

Definition at line 408 of file _tmp_build/cycamore/mixer.h.

Referenced by InfileToDb(), 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 376 of file _tmp_build/cycamore/mixer.h.

Referenced by EnterNotify(), GetMatlRequests(), and Tock().

◆ latitude

double cycamore::Mixer::latitude
private

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

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

◆ longitude

double cycamore::Mixer::longitude
private

Definition at line 429 of file _tmp_build/cycamore/mixer.h.

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

◆ 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 414 of file _tmp_build/cycamore/mixer.h.

Referenced by AcceptMatlTrades(), GetMatlRequests(), and Tock().

◆ sell_policy

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

Definition at line 417 of file _tmp_build/cycamore/mixer.h.

Referenced by EnterNotify(), and Tock().

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