CYCLUS
|
The Facility class is the abstract class/interface used by all facility agents.
This is all that is known externally about facilities
The Facility type plays a primary role in Cyclus. A Facility facility is where offers and requests are generated and transmitted to a ResourceExchange and where shipments of material, issued by the exchange, are executed. The algorithms to determine what offers and requests are issued and how material shipments are handled are the primary differentiators between different Facility implementations.
Like all agent implementations, there are a number of implementations that are distributed as part of the core Cyclus application as well as implementations contributed by third-party developers. The links below describe additional parameters necessary for the complete definition of a facility of that implementation.
Developers are encouraged to add to this list and create pages that describe the detailed behavior of these agents.
Collaborators are encouraged to add to this list and link to external pages that describe how to get the agents and the detailed behavior
Definition at line 68 of file facility.h.
#include <facility.h>
Additional Inherited Members | |
Protected Member Functions inherited from cyclus::Agent | |
virtual std::string | InformErrorMsg (std::string msg) |
void | InitFrom (Agent *m) |
Protected Attributes inherited from cyclus::Agent | |
std::string | kind_ |
Protected Attributes inherited from cyclus::Trader | |
Agent * | manager_ |
cyclus::Facility::Facility | ( | Context * | ctx | ) |
Definition at line 16 of file facility.cc.
|
virtual |
Definition at line 20 of file facility.cc.
|
inlinevirtual |
default implementation for material trade acceptance
Reimplemented from cyclus::Trader.
Definition at line 155 of file facility.h.
|
inlinevirtual |
default implementation for product trade acceptance
Reimplemented from cyclus::Trader.
Definition at line 160 of file facility.h.
default implementation for material preferences.
Reimplemented from cyclus::Agent.
Definition at line 132 of file facility.h.
default implementation for material preferences.
Reimplemented from cyclus::Agent.
Definition at line 135 of file facility.h.
builds the facility in the simulation
parent | the parent of this facility |
Reimplemented from cyclus::Agent.
Definition at line 27 of file facility.cc.
|
virtual |
facilities over write this method if a condition must be met before their destructors can be called
Definition at line 55 of file facility.cc.
|
virtual |
decommissions the facility, default behavior is for the facility to delete itself
Reimplemented from cyclus::Agent.
Definition at line 45 of file facility.cc.
|
virtual |
Called to give the agent an opportunity to register for services.
Reimplemented from cyclus::Agent.
Definition at line 31 of file facility.cc.
|
inlinevirtual |
default implementation for material requests
Reimplemented from cyclus::Trader.
Definition at line 121 of file facility.h.
|
inlinevirtual |
default implementation for material requests
Reimplemented from cyclus::Trader.
Definition at line 109 of file facility.h.
|
inlinevirtual |
default implementation for responding to material trades
trades | all trades in which this trader is the supplier |
responses | a container to populate with responses to each trade |
Reimplemented from cyclus::Trader.
Definition at line 140 of file facility.h.
|
inlinevirtual |
default implementation for product requests
Reimplemented from cyclus::Trader.
Definition at line 127 of file facility.h.
|
inlinevirtual |
default implementation for product requests
Reimplemented from cyclus::Trader.
Definition at line 115 of file facility.h.
|
inlinevirtual |
default implementation for responding to product trades
trades | all trades in which this trader is the supplier |
responses | a container to populate with responses to each trade |
Reimplemented from cyclus::Trader.
Definition at line 149 of file facility.h.
|
inlinevirtual |
Translates info for the agent from an input file to the database by reading parameters from the passed InfileTree (parsed from xml) and recording data via the DbInit variable.
The simulation id and agent id are automatically injected in all data transfered to the database through DbInit. This function must be implemented by all agents. This function must call the superclass' InfileToDb function before doing any other work.
Agent parameters in the InfileTree are scoped in the "agent/*‍/" path. The superclass InitFrom expects the scope InfileTree passed to it to be unchanged from the agent's InfileTree arg.
Example:
Reimplemented from cyclus::Agent.
Definition at line 75 of file facility.h.
Copy module members from a source agent Any facility subclassing facility agent should invoke their own InitFrom method, calling Facility's first!
m | the agent to copy from |
Definition at line 23 of file facility.cc.
|
inlinevirtual |
Intializes an agent's internal state from the database.
Appropriate simulation id, agent id, and time filters are automatically included in all queries. If the agent is a direct subclass of the Agent class, than it should NOT call its superclass' InitFrom(QueryableBackend*) function. If, however, it is a subclasses other Agent subclasses (e.g. subclass of Facility, Region, etc.), then it MUST call its superclass' InitFrom(QueryableBackend*) function. Example:
Reimplemented from cyclus::Agent.
Definition at line 78 of file facility.h.
Snapshots agent-internal state to the database via the DbInit var di.
The simulation id , agent id, and the simulation time are automatically injected in all information transfered to the database through DbInit. If the agent is a direct subclass of the Agent class, than it should NOT call its superclass' Snapshot function. If, however, it subclasses other Agent subclasses (e.g. subclass of Facility, Region, etc.), then it MUST call its superclass' Snapshot function. Example:
Implements cyclus::Agent.
Definition at line 81 of file facility.h.
|
virtual |
every agent should be able to print a verbose description
Reimplemented from cyclus::Agent.
Definition at line 37 of file facility.cc.