![]() |
CYCLUS
|
This is a manager class that manages a set of commodities.
Those commodities have a certain demand function associated with them and a list of producers who can produce the commodities.
The SupplyDemandManager simply keeps track of this information and provides the demand and supply of a commodity at a given time. What to do with this information is left to the user of the SupplyDemandManager.
Definition at line 23 of file supply_demand_manager.h.
#include <supply_demand_manager.h>
Public Member Functions | |
| double | Demand (Commodity &commodity, int time) |
| SymFunction::Ptr | DemandFunction (Commodity &commodity) |
| bool | ManagesCommodity (Commodity &commodity) |
| void | RegisterCommodity (Commodity &commodity, SymFunction::Ptr demand) |
| void | RegisterProducerManager (CommodityProducerManager *cpm) |
| double | Supply (Commodity &commodity) |
| SupplyDemandManager (Agent *agent=NULL) | |
| void | UnregisterProducerManager (CommodityProducerManager *cpm) |
| virtual | ~SupplyDemandManager () |
Public Member Functions inherited from cyclus::toolkit::AgentManaged | |
| Agent * | agent () const |
| AgentManaged (Agent *agent=NULL) | |
|
inline |
Definition at line 25 of file supply_demand_manager.h.
|
inlinevirtual |
Definition at line 26 of file supply_demand_manager.h.
|
inline |
The demand for a commodity at a given time.
| commodity | the commodity |
| time | the time |
Definition at line 56 of file supply_demand_manager.h.
|
inline |
Returns the demand function for a commodity.
| commodity | the commodity being queried |
Definition at line 62 of file supply_demand_manager.h.
|
inline |
| commodity | the commodity in question |
Definition at line 38 of file supply_demand_manager.h.
|
inline |
Register a new commodity with the manager, along with all the necessary information.
| commodity | the commodity |
| demand | a smart pointer to the demand function |
Definition at line 32 of file supply_demand_manager.h.
|
inline |
Adds a commodity producer manager to the set of producer managers.
Definition at line 43 of file supply_demand_manager.h.
| double cyclus::toolkit::SupplyDemandManager::Supply | ( | Commodity & | commodity | ) |
Returns the current supply of a commodity.
| commodity | the commodity |
Definition at line 9 of file supply_demand_manager.cc.
|
inline |
Removes a commodity producer manager from the set of producer managers.
Definition at line 49 of file supply_demand_manager.h.