CYCLUS
Loading...
Searching...
No Matches
cyclus::Trader Class Reference

Detailed Description

A simple API for agents that wish to exchange resources in the simulation.

A Trader is a mixin class designed for agents that wish to exchange resources. It defines the API for the querying of requests, offers, and the corresponding exchanges.

Definition at line 24 of file trader.h.

#include <trader.h>

Inheritance diagram for cyclus::Trader:
cyclus::Facility cyclus::toolkit::MatlBuyPolicy cyclus::toolkit::MatlSellPolicy

Public Member Functions

virtual void AcceptMatlTrades (const std::vector< std::pair< Trade< Material >, Material::Ptr > > &responses)
 
virtual void AcceptProductTrades (const std::vector< std::pair< Trade< Product >, Product::Ptr > > &responses)
 
virtual void AdjustMatlPrefs (PrefMap< Material >::type &prefs)
 
virtual void AdjustProductPrefs (PrefMap< Product >::type &prefs)
 
virtual std::set< BidPortfolio< Material >::Ptr > GetMatlBids (CommodMap< Material >::type &commod_requests)
 
virtual std::set< RequestPortfolio< Material >::Ptr > GetMatlRequests ()
 
virtual void GetMatlTrades (const std::vector< Trade< Material > > &trades, std::vector< std::pair< Trade< Material >, Material::Ptr > > &responses)
 
virtual std::set< BidPortfolio< Product >::Ptr > GetProductBids (CommodMap< Product >::type &commod_requests)
 
virtual std::set< RequestPortfolio< Product >::Ptr > GetProductRequests ()
 
virtual void GetProductTrades (const std::vector< Trade< Product > > &trades, std::vector< std::pair< Trade< Product >, Product::Ptr > > &responses)
 
virtual Agentmanager ()
 
 Trader (Agent *manager)
 

Protected Attributes

Agentmanager_
 

Constructor & Destructor Documentation

◆ Trader()

cyclus::Trader::Trader ( Agent * manager)
inline

Definition at line 26 of file trader.h.

Member Function Documentation

◆ AcceptMatlTrades()

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

default implementation for material trade acceptance

Reimplemented in cyclus::Facility, and cyclus::toolkit::MatlBuyPolicy.

Definition at line 78 of file trader.h.

◆ AcceptProductTrades()

virtual void cyclus::Trader::AcceptProductTrades ( const std::vector< std::pair< Trade< Product >, Product::Ptr > > & responses)
inlinevirtual

default implementation for product trade acceptance

Reimplemented in cyclus::Facility.

Definition at line 83 of file trader.h.

◆ AdjustMatlPrefs()

virtual void cyclus::Trader::AdjustMatlPrefs ( PrefMap< Material >::type & prefs)
inlinevirtual

default implementation for material preferences.

Reimplemented in cyclus::Facility.

Definition at line 57 of file trader.h.

◆ AdjustProductPrefs()

virtual void cyclus::Trader::AdjustProductPrefs ( PrefMap< Product >::type & prefs)
inlinevirtual

default implementation for material preferences.

Reimplemented in cyclus::Facility.

Definition at line 60 of file trader.h.

◆ GetMatlBids()

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

default implementation for material requests

Reimplemented in cyclus::Facility, and cyclus::toolkit::MatlSellPolicy.

Definition at line 46 of file trader.h.

◆ GetMatlRequests()

virtual std::set< RequestPortfolio< Material >::Ptr > cyclus::Trader::GetMatlRequests ( )
inlinevirtual

default implementation for material requests

Reimplemented in cyclus::Facility, and cyclus::toolkit::MatlBuyPolicy.

Definition at line 34 of file trader.h.

◆ GetMatlTrades()

virtual void cyclus::Trader::GetMatlTrades ( const std::vector< Trade< Material > > & trades,
std::vector< std::pair< Trade< Material >, Material::Ptr > > & responses )
inlinevirtual

default implementation for responding to material trades

Parameters
tradesall trades in which this trader is the supplier
responsesa container to populate with responses to each trade

Reimplemented in cyclus::Facility, and cyclus::toolkit::MatlSellPolicy.

Definition at line 65 of file trader.h.

◆ GetProductBids()

virtual std::set< BidPortfolio< Product >::Ptr > cyclus::Trader::GetProductBids ( CommodMap< Product >::type & commod_requests)
inlinevirtual

default implementation for product requests

Reimplemented in cyclus::Facility.

Definition at line 52 of file trader.h.

◆ GetProductRequests()

virtual std::set< RequestPortfolio< Product >::Ptr > cyclus::Trader::GetProductRequests ( )
inlinevirtual

default implementation for product requests

Reimplemented in cyclus::Facility.

Definition at line 40 of file trader.h.

◆ GetProductTrades()

virtual void cyclus::Trader::GetProductTrades ( const std::vector< Trade< Product > > & trades,
std::vector< std::pair< Trade< Product >, Product::Ptr > > & responses )
inlinevirtual

default implementation for responding to product trades

Parameters
tradesall trades in which this trader is the supplier
responsesa container to populate with responses to each trade

Reimplemented in cyclus::Facility.

Definition at line 72 of file trader.h.

◆ manager()

virtual Agent * cyclus::Trader::manager ( )
inlinevirtual

Definition at line 28 of file trader.h.

Member Data Documentation

◆ manager_

Agent* cyclus::Trader::manager_
protected

Definition at line 88 of file trader.h.


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