1#ifndef CYCLUS_SRC_EXCHANGE_CONTEXT_H_
2#define CYCLUS_SRC_EXCHANGE_CONTEXT_H_
26 typedef std::map<Request<T>*, std::map<Bid<T>*,
double> >
type;
33 typedef std::map<std::string, std::vector<Request<T>*> >
type;
55 const std::vector<Request<T>*>&
vr =
port->requests();
56 typename std::vector<Request<T>*>::const_iterator
it;
74 const std::set<Bid<T>*>&
vr =
port->bids();
75 typename std::set<Bid<T>*>::const_iterator
it;
98 std::vector<typename RequestPortfolio<T>::Ptr>
requests;
101 std::vector<typename BidPortfolio<T>::Ptr>
bids;
113 std::map< Request<T>*, std::vector<Bid<T>*> >
boost::shared_ptr< BidPortfolio< T > > Ptr
A Bid encapsulates all the information required to communicate a bid response to a request for a reso...
boost::shared_ptr< RequestPortfolio< T > > Ptr
A Request encapsulates all the information required to communicate the needs of an agent in the Dynam...
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters
Request< T > * request_ptr
std::map< std::string, std::vector< Request< T > * > > type
The ExchangeContext is designed to provide an ease-of-use interface for querying and reaggregating in...
std::vector< typename BidPortfolio< T >::Ptr > bids
a reference to an exchange's set of bids
void AddBid(Bid< T > *pb)
adds a bid to the appropriate containers, default trade preference between request and bid is set
void AddRequest(Request< T > *pr)
Adds an individual request.
std::map< Trader *, typename PrefMap< T >::type > trader_prefs
maps commodity name to requests for that commodity
std::map< Request< T > *, std::vector< Bid< T > * > > bids_by_request
maps request to all bids for request
std::vector< typename RequestPortfolio< T >::Ptr > requests
a reference to an exchange's set of requests
void AddBidPortfolio(const typename BidPortfolio< T >::Ptr port)
adds a bid to the context
std::set< Trader * > requesters
known requesters
void AddRequestPortfolio(const typename RequestPortfolio< T >::Ptr port)
adds a request to the context
CommodMap< T >::type commod_requests
maps commodity name to requests for that commodity
std::set< Trader * > bidders
known bidders
std::map< Request< T > *, std::map< Bid< T > *, double > > type
Request< T > * request_ptr