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

Detailed Description

template<class T>
class cyclus::ResourceExchange< T >

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:

  1. Request for Bids Agents that demand resources of a given type post their
    demands to the exchange
  2. Response to Request for Bids Agents that supply resources of a given type respond to
    those requests
  3. Preference Adjustment Preferences for each request-bid pair are set, informing
    the evenutal soluation mechanism

For example, assuming a simulation Context, ctx, and resource type, ResourceType:

exchng.AddAllRequests();
exchng.AddAllBids();
exchng.AdjustAll();
The ResourceExchange class manages the communication for the supply and demand of resources in a simu...
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters

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)
 

Constructor & Destructor Documentation

◆ ResourceExchange()

template<class T >
cyclus::ResourceExchange< T >::ResourceExchange ( Context * ctx)
inline

default constructor

Parameters
ctxthe simulation context

Definition at line 66 of file resource_exchange.h.

Member Function Documentation

◆ AddAllBids()

template<class T >
void cyclus::ResourceExchange< T >::AddAllBids ( )
inline

queries traders and collects all responses to requests for bids

Definition at line 86 of file resource_exchange.h.

◆ AddAllRequests()

template<class T >
void cyclus::ResourceExchange< T >::AddAllRequests ( )
inline

queries traders and collects all requests for bids

Definition at line 75 of file resource_exchange.h.

◆ AdjustAll()

template<class T >
void cyclus::ResourceExchange< T >::AdjustAll ( )
inline

adjust preferences for requests given bid responses

Definition at line 97 of file resource_exchange.h.

◆ Empty()

template<class T >
bool cyclus::ResourceExchange< T >::Empty ( )
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.

◆ ex_ctx()

template<class T >
ExchangeContext< T > & cyclus::ResourceExchange< T >::ex_ctx ( )
inline

Definition at line 70 of file resource_exchange.h.


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