1#ifndef CYCLUS_SRC_FACILITY_H_
2#define CYCLUS_SRC_FACILITY_H_
105 virtual std::string
str();
108 virtual std::set<RequestPortfolio<Material>::Ptr>
110 return std::set<RequestPortfolio<Material>::Ptr>();
114 virtual std::set<RequestPortfolio<Product>::Ptr>
116 return std::set<RequestPortfolio<Product>::Ptr>();
120 virtual std::set<BidPortfolio<Material>::Ptr>
122 return std::set<BidPortfolio<Material>::Ptr>();
126 virtual std::set<BidPortfolio<Product>::Ptr>
128 return std::set<BidPortfolio<Product>::Ptr>();
143 std::cout <<
"in material facility getmatltrades\n";
The abstract base class used by all types of agents that live and interact in a simulation.
Agent * parent() const
Returns parent of this agent. Returns NULL if the agent has no parent.
A simulation context provides access to necessary simulation-global functions and state.
DbInit provides an interface for agents to record data to the output db that automatically injects th...
The Facility class is the abstract class/interface used by all facility agents.
virtual void Decommission()
decommissions the facility, default behavior is for the facility to delete itself
virtual void EnterNotify()
Called to give the agent an opportunity to register for services.
virtual void AdjustMatlPrefs(PrefMap< Material >::type &prefs)
default implementation for material preferences.
virtual std::string str()
every agent should be able to print a verbose description
virtual void InfileToDb(InfileTree *qe, DbInit di)
Translates info for the agent from an input file to the database by reading parameters from the passe...
virtual void AdjustProductPrefs(PrefMap< Product >::type &prefs)
default implementation for material preferences.
virtual void Build(Agent *parent)
builds the facility in the simulation
virtual std::set< BidPortfolio< Material >::Ptr > GetMatlBids(CommodMap< Material >::type &commod_requests)
default implementation for material requests
virtual void AcceptProductTrades(const std::vector< std::pair< Trade< Product >, Product::Ptr > > &responses)
default implementation for product trade acceptance
virtual std::set< RequestPortfolio< Material >::Ptr > GetMatlRequests()
default implementation for material requests
virtual void InitFrom(QueryableBackend *b)
Intializes an agent's internal state from the database.
virtual std::set< BidPortfolio< Product >::Ptr > GetProductBids(CommodMap< Product >::type &commod_requests)
default implementation for product requests
virtual void GetProductTrades(const std::vector< Trade< Product > > &trades, std::vector< std::pair< Trade< Product >, Product::Ptr > > &responses)
default implementation for responding to product trades
virtual void AcceptMatlTrades(const std::vector< std::pair< Trade< Material >, Material::Ptr > > &responses)
default implementation for material trade acceptance
virtual std::set< RequestPortfolio< Product >::Ptr > GetProductRequests()
default implementation for product requests
virtual void Snapshot(DbInit di)
Snapshots agent-internal state to the database via the DbInit var di.
virtual bool CheckDecommissionCondition()
facilities over write this method if a condition must be met before their destructors can be called
virtual void GetMatlTrades(const std::vector< Trade< Material > > &trades, std::vector< std::pair< Trade< Material >, Material::Ptr > > &responses)
default implementation for responding to material trades
A class for extracting information from a given XML parser.
boost::shared_ptr< Material > Ptr
boost::shared_ptr< Product > Ptr
Interface implemented by backends that support rudimentary querying.
The TimeListener class is an inheritable class for any Agent that requires knowlege of ticks and tock...
A simple API for agents that wish to exchange resources in the simulation.
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters
std::map< std::string, std::vector< Request< T > * > > type
std::map< Request< T > *, std::map< Bid< T > *, double > > type
A Trade is a simple container that associates a request for a resource with a bid for that resource.