CYCLUS
|
The ResourceExchange class manages the communication for the supply and demand of resources in a simulation.
At any given timestep, there are three main phases involved:
For example, assuming a simulation Context, ctx, and resource type, ResourceType:
Definition at line 61 of file resource_exchange.h.
#include <resource_exchange.h>
Public Member Functions | |
void | AddAllBids () |
void | AddAllRequests () |
void | AdjustAll () |
bool | Empty () |
ExchangeContext< T > & | ex_ctx () |
ResourceExchange (Context *ctx) | |
|
inline |
default constructor
ctx | the simulation context |
Definition at line 66 of file resource_exchange.h.
|
inline |
queries traders and collects all responses to requests for bids
Definition at line 86 of file resource_exchange.h.
|
inline |
queries traders and collects all requests for bids
Definition at line 75 of file resource_exchange.h.
|
inline |
adjust preferences for requests given bid responses
Definition at line 97 of file resource_exchange.h.
|
inline |
return true if this is an empty exchange (i.e., no requests exist, therefore no bids)
Definition at line 111 of file resource_exchange.h.
|
inline |
Definition at line 70 of file resource_exchange.h.