CYCLUS
Public Member Functions | Public Attributes | List of all members
cyclus::ExchangeContext< T > Class Template Reference

Detailed Description

template<class T>
class cyclus::ExchangeContext< T >

The ExchangeContext is designed to provide an ease-of-use interface for querying and reaggregating information regarding requests and bids of a resource exchange.

The ExchangeContext is used by a ResourceExchange or related class to provide introspection into the requests and bids it collects. Specifically, this class is designed to assist in phases of the Dynamic Resource Exchange. The second phase, Response to Request for Bids, is assisted by grouping requests by commodity type. The third phase, preference adjustment, is assisted by grouping bids by the requester being responded to.

Definition at line 41 of file exchange_context.h.

#include <exchange_context.h>

Public Member Functions

void AddBid (Bid< T > *pb)
 
void AddBidPortfolio (const typename BidPortfolio< T >::Ptr port)
 
void AddRequest (Request< T > *pr)
 
void AddRequestPortfolio (const typename RequestPortfolio< T >::Ptr port)
 

Public Attributes

std::set< Trader * > bidders
 
std::vector< typename BidPortfolio< T >::Ptr > bids
 
std::map< Request< T > *, std::vector< Bid< T > * > > bids_by_request
 
CommodMap< T >::type commod_requests
 
std::set< Trader * > requesters
 
std::vector< typename RequestPortfolio< T >::Ptr > requests
 
std::map< Trader *, typename PrefMap< T >::type > trader_prefs
 

Member Function Documentation

template<class T>
void cyclus::ExchangeContext< T >::AddBid ( Bid< T > *  pb)
inline

adds a bid to the appropriate containers, default trade preference between request and bid is set

Parameters
pbthe bid

Definition at line 77 of file exchange_context.h.

template<class T>
void cyclus::ExchangeContext< T >::AddBidPortfolio ( const typename BidPortfolio< T >::Ptr  port)
inline

adds a bid to the context

Definition at line 63 of file exchange_context.h.

template<class T>
void cyclus::ExchangeContext< T >::AddRequest ( Request< T > *  pr)
inline

Adds an individual request.

Definition at line 56 of file exchange_context.h.

template<class T>
void cyclus::ExchangeContext< T >::AddRequestPortfolio ( const typename RequestPortfolio< T >::Ptr  port)
inline

adds a request to the context

Definition at line 44 of file exchange_context.h.

Member Data Documentation

template<class T>
std::set<Trader*> cyclus::ExchangeContext< T >::bidders

known bidders

Definition at line 98 of file exchange_context.h.

template<class T>
std::vector<typename BidPortfolio<T>::Ptr> cyclus::ExchangeContext< T >::bids

a reference to an exchange's set of bids

Definition at line 92 of file exchange_context.h.

template<class T>
std::map< Request<T>*, std::vector<Bid<T>*> > cyclus::ExchangeContext< T >::bids_by_request

maps request to all bids for request

Definition at line 105 of file exchange_context.h.

template<class T>
CommodMap<T>::type cyclus::ExchangeContext< T >::commod_requests

maps commodity name to requests for that commodity

Definition at line 101 of file exchange_context.h.

template<class T>
std::set<Trader*> cyclus::ExchangeContext< T >::requesters

known requesters

Definition at line 95 of file exchange_context.h.

template<class T>
std::vector<typename RequestPortfolio<T>::Ptr> cyclus::ExchangeContext< T >::requests

a reference to an exchange's set of requests

Definition at line 89 of file exchange_context.h.

template<class T>
std::map<Trader*, typename PrefMap<T>::type> cyclus::ExchangeContext< T >::trader_prefs

maps commodity name to requests for that commodity

Definition at line 108 of file exchange_context.h.


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