CYCLUS
|
A Request encapsulates all the information required to communicate the needs of an agent in the Dynamic Resource Exchange, including the commodity it needs as well as a resource specification for that commodity.
A Request is templated its resource.
#include <request.h>
Public Types | |
typedef std::function< double(boost::shared_ptr< T >)> | cost_function_t |
Public Member Functions | |
std::string | commodity () const |
cost_function_t | cost_function () const |
bool | exclusive () const |
RequestPortfolio< T >::Ptr | portfolio () const |
double | preference () const |
Trader * | requester () const |
boost::shared_ptr< T > | target () const |
Static Public Member Functions | |
static Request< T > * | Create (boost::shared_ptr< T > target, Trader *requester, std::string commodity, double preference, bool exclusive, cost_function_t cost_function) |
static Request< T > * | Create (boost::shared_ptr< T > target, Trader *requester, std::string commodity="", double preference=kDefaultPref, bool exclusive=false) |
static Request< T > * | Create (boost::shared_ptr< T > target, Trader *requester, typename RequestPortfolio< T >::Ptr portfolio, std::string commodity, double preference, bool exclusive, cost_function_t cost_function) |
static Request< T > * | Create (boost::shared_ptr< T > target, Trader *requester, typename RequestPortfolio< T >::Ptr portfolio, std::string commodity="", double preference=kDefaultPref, bool exclusive=false) |
typedef std::function<double(boost::shared_ptr<T>)> cyclus::Request< T >::cost_function_t |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
a factory method for a request
target | the target resource associated with this request |
requester | the requester |
portfolio | the porftolio of which this request is a part |
commodity | the commodity associated with this request |
preference | the preference associated with this request (relative to others in the portfolio) |
exclusive | a flag denoting that this request must be met exclusively, i.e., in its entirety by a single offer |
cost_function | a standard function object that returns the cost of a potential resource when called. |
|
inlinestatic |
a factory method for a request
target | the target resource associated with this request |
requester | the requester |
portfolio | the porftolio of which this request is a part |
commodity | the commodity associated with this request |
preference | the preference associated with this request (relative to others in the portfolio) |
exclusive | a flag denoting that this request must be met exclusively, i.e., in its entirety by a single offer |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |