CYCLUS
|
A BidPortfolio is a collection of bids as responses to requests for resources and associated constraints on those bids.
A BidPortfolio contains all the information corresponding to a bidder's response to resource requests. It is a light wrapper around the set of bids and constraints for a given bidder, guaranteeing a single bidder per portfolio. Responses are grouped by the bidder. Constraints are assumed to act over the entire set of possible bids.
Definition at line 32 of file bid_portfolio.h.
#include <bid_portfolio.h>
Public Types | |
typedef boost::shared_ptr< BidPortfolio< T > > | Ptr |
Public Member Functions | |
Bid< T > * | AddBid (Request< T > *request, boost::shared_ptr< T > offer, Trader *bidder, bool exclusive, double preference) |
Bid< T > * | AddBid (Request< T > *request, boost::shared_ptr< T > offer, Trader *bidder, bool exclusive=false) |
void | AddConstraint (const CapacityConstraint< T > &c) |
Trader * | bidder () const |
BidPortfolio () | |
const std::set< Bid< T > * > & | bids () const |
std::string | commodity () const |
const std::set< CapacityConstraint< T > > & | constraints () const |
~BidPortfolio () | |
typedef boost::shared_ptr<BidPortfolio<T> > cyclus::BidPortfolio< T >::Ptr |
Definition at line 34 of file bid_portfolio.h.
|
inline |
default constructor
Definition at line 37 of file bid_portfolio.h.
|
inline |
deletes all bids associated with it
Definition at line 40 of file bid_portfolio.h.
|
inline |
add a bid to the portfolio
request | the request being responded to by this bid |
offer | the resource being offered in response to the request |
bidder | the bidder |
exclusive | indicates whether the bid is exclusive |
preference | sets the preference of the bid on a request bid arc. |
KeyError | if a bid is added from a different bidder than the original |
Definition at line 56 of file bid_portfolio.h.
|
inline |
add a bid to the portfolio
request | the request being responded to by this bid |
offer | the resource being offered in response to the request |
bidder | the bidder |
exclusive | indicates whether the bid is exclusive |
KeyError | if a bid is added from a different bidder than the original |
Definition at line 79 of file bid_portfolio.h.
|
inline |
add a capacity constraint associated with the portfolio
c | the constraint to add |
Definition at line 87 of file bid_portfolio.h.
|
inline |
Definition at line 93 of file bid_portfolio.h.
Definition at line 99 of file bid_portfolio.h.
|
inline |
Definition at line 96 of file bid_portfolio.h.
|
inline |
Definition at line 102 of file bid_portfolio.h.