1#ifndef CYCLUS_SRC_BID_H_
2#define CYCLUS_SRC_BID_H_
4#include <boost/shared_ptr.hpp>
5#include <boost/weak_ptr.hpp>
14template <
class T>
class BidPortfolio;
21template <
class T>
class Bid {
58 std::numeric_limits<double>::quiet_NaN(),
package);
74 std::numeric_limits<double>::quiet_NaN(),
package);
81 inline boost::shared_ptr<T>
offer()
const {
return offer_; }
90 inline bool exclusive()
const {
return exclusive_; }
139 boost::shared_ptr<T> offer_;
141 boost::weak_ptr<BidPortfolio<T>> portfolio_;
boost::shared_ptr< BidPortfolio< T > > Ptr
A Bid encapsulates all the information required to communicate a bid response to a request for a reso...
Request< T > * request() const
double preference() const
static Bid< T > * Create(Request< T > *request, boost::shared_ptr< T > offer, Trader *bidder, typename BidPortfolio< T >::Ptr portfolio, bool exclusive=false, Package::Ptr package=Package::unpackaged())
a factory method for a bid
static Bid< T > * Create(Request< T > *request, boost::shared_ptr< T > offer, Trader *bidder, bool exclusive, double preference, Package::Ptr package=Package::unpackaged())
a factory method for a bid for a bid without a portfolio
static Bid< T > * Create(Request< T > *request, boost::shared_ptr< T > offer, Trader *bidder, bool exclusive=false, Package::Ptr package=Package::unpackaged())
a factory method for a bid for a bid without a portfolio
BidPortfolio< T >::Ptr portfolio()
boost::shared_ptr< T > offer() const
static Bid< T > * Create(Request< T > *request, boost::shared_ptr< T > offer, Trader *bidder, typename BidPortfolio< T >::Ptr portfolio, bool exclusive, double preference)
a factory method for a bid
static Ptr & unpackaged()
boost::shared_ptr< Package > Ptr
A Request encapsulates all the information required to communicate the needs of an agent in the Dynam...
A simple API for agents that wish to exchange resources in the simulation.
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