CYCLUS
Loading...
Searching...
No Matches
cyclus::BidPortfolio< T > Class Template Reference

Detailed Description

template<class T>
class cyclus::BidPortfolio< T >

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>

Inheritance diagram for cyclus::BidPortfolio< T >:

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)
 
Traderbidder () const
 
 BidPortfolio ()
 
const std::set< Bid< T > * > & bids () const
 
std::string commodity () const
 
const std::set< CapacityConstraint< T > > & constraints () const
 
 ~BidPortfolio ()
 

Member Typedef Documentation

◆ Ptr

template<class T >
typedef boost::shared_ptr<BidPortfolio<T> > cyclus::BidPortfolio< T >::Ptr

Definition at line 34 of file bid_portfolio.h.

Constructor & Destructor Documentation

◆ BidPortfolio()

template<class T >
cyclus::BidPortfolio< T >::BidPortfolio ( )
inline

default constructor

Definition at line 37 of file bid_portfolio.h.

◆ ~BidPortfolio()

template<class T >
cyclus::BidPortfolio< T >::~BidPortfolio ( )
inline

deletes all bids associated with it

Definition at line 40 of file bid_portfolio.h.

Member Function Documentation

◆ AddBid() [1/2]

template<class T >
Bid< T > * cyclus::BidPortfolio< T >::AddBid ( Request< T > * request,
boost::shared_ptr< T > offer,
Trader * bidder,
bool exclusive,
double preference )
inline

add a bid to the portfolio

Parameters
requestthe request being responded to by this bid
offerthe resource being offered in response to the request
bidderthe bidder
exclusiveindicates whether the bid is exclusive
preferencesets the preference of the bid on a request bid arc.
Exceptions
KeyErrorif a bid is added from a different bidder than the original

Definition at line 56 of file bid_portfolio.h.

◆ AddBid() [2/2]

template<class T >
Bid< T > * cyclus::BidPortfolio< T >::AddBid ( Request< T > * request,
boost::shared_ptr< T > offer,
Trader * bidder,
bool exclusive = false )
inline

add a bid to the portfolio

Parameters
requestthe request being responded to by this bid
offerthe resource being offered in response to the request
bidderthe bidder
exclusiveindicates whether the bid is exclusive
Exceptions
KeyErrorif a bid is added from a different bidder than the original

Definition at line 79 of file bid_portfolio.h.

◆ AddConstraint()

template<class T >
void cyclus::BidPortfolio< T >::AddConstraint ( const CapacityConstraint< T > & c)
inline

add a capacity constraint associated with the portfolio

Parameters
cthe constraint to add

Definition at line 87 of file bid_portfolio.h.

◆ bidder()

template<class T >
Trader * cyclus::BidPortfolio< T >::bidder ( ) const
inline
Returns
the agent associated with the portfolio. If no bids have been added, the bidder is NULL.

Definition at line 93 of file bid_portfolio.h.

◆ bids()

template<class T >
const std::set< Bid< T > * > & cyclus::BidPortfolio< T >::bids ( ) const
inline
Returns
const access to the bids

Definition at line 99 of file bid_portfolio.h.

◆ commodity()

template<class T >
std::string cyclus::BidPortfolio< T >::commodity ( ) const
inline
Returns
deprecated the commodity associated with the portfolio.

Definition at line 96 of file bid_portfolio.h.

◆ constraints()

template<class T >
const std::set< CapacityConstraint< T > > & cyclus::BidPortfolio< T >::constraints ( ) const
inline
Returns
the set of constraints over the bids

Definition at line 102 of file bid_portfolio.h.


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