![]() |
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 60 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 65 of file resource_exchange.h.
|
inline |
queries traders and collects all responses to requests for bids
Definition at line 80 of file resource_exchange.h.
|
inline |
queries traders and collects all requests for bids
Definition at line 70 of file resource_exchange.h.
|
inline |
adjust preferences for requests given bid responses
Definition at line 90 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 102 of file resource_exchange.h.
|
inline |
Definition at line 67 of file resource_exchange.h.