Construct version 5.4.4
An agent based modeling framework
|
A model which allows agents to learn information based on their current location. More...
Public Member Functions | |
Location (Construct &construct) | |
void | initialize (void) override |
void | think (void) override |
void | cleanup (void) override |
virtual float | get_expertise (unsigned int agent, unsigned int location) |
virtual const CommunicationMedium * | get_medium (unsigned int agent) |
Public Member Functions inherited from Model | |
Model (Construct &_construct) | |
Constructor for all models in Construct. More... | |
virtual | ~Model (void) |
Virtual Deconstructor. More... | |
virtual void | initialize (void) |
Function called once before any simulation cycles begin. More... | |
virtual void | think (void) |
First function called in a simulation cycle. More... | |
virtual void | update (void) |
Function called after the think functions in a simulation cycle. More... | |
virtual bool | intercept (InteractionItem &item, unsigned int sender, unsigned int receiver, const CommunicationMedium *medium) |
Allows for models to effect change to items created by other models. More... | |
virtual void | communicate (const InteractionMessage &msg) |
Function called after the update functions in a simulation cycle. More... | |
virtual void | cleanup (void) |
Function called after the Model::communicate functions in a simulation cycle. More... | |
void | add_base_model_to_model_manager (const std::string &base_model_name) |
Adds a derived model under the name of the base model and disables the model manager from calling its functions. | |
Public Attributes | |
const Nodeset & | agents = ns_manager.get_nodeset(nodeset_names::agents) |
const Nodeset & | knowledge = ns_manager.get_nodeset(nodeset_names::knowledge) |
const Nodeset & | locations = ns_manager.get_nodeset(nodeset_names::loc) |
const Graph< bool > & | loc_adj = graph_manager.load_optional(graph_names::location_network, true, locations, sparse, locations, sparse) |
Graph< bool > & | current_loc = graph_manager.load_required(graph_names::current_loc, agents, locations) |
const Graph< bool > & | location_knowledge_net = graph_manager.load_optional(graph_names::loc_knowledge, true, locations, sparse, knowledge, sparse) |
const Graph< float > & | agent_location_learning_rate_net = graph_manager.load_optional(graph_names::loc_learning_rate, 1.0f, agents, sparse, locations, sparse) |
const Graph< float > & | knowledge_expertise = graph_manager.load_optional(graph_names::k_exp_wgt, 1.0f, agents, sparse, ns_manager.get_nodeset(nodeset_names::time), sparse) |
const Graph< float > & | location_preference = graph_manager.load_optional(graph_names::loc_preference, 1.0f, agents, sparse, locations, sparse) |
const Graph< bool > & | location_medium_access = graph_manager.load_optional(graph_names::loc_medium_access, true, locations, sparse, ns_manager.get_nodeset(nodeset_names::comm), sparse) |
Graph< bool > & | knowledge_net = graph_manager.load_required(graph_names::knowledge, agents, knowledge) |
const Graph< float > & | knowledge_importance = graph_manager.load_optional(graph_names::interact_k_wgt, 1.0f, agents, sparse, knowledge, sparse) |
const Graph< unsigned int > & | loc_limit = graph_manager.load_optional(graph_names::loc_learning_limit, 1u, agents, sparse, locations, sparse) |
const Graph< bool > & | active = graph_manager.load_optional(graph_names::active, true, agents, sparse, ns_manager.get_nodeset(nodeset_names::time), sparse) |
const Graph< float > & | knowledge_priority_network = graph_manager.load_optional(graph_names::k_priority, 1.0f, agents, sparse, knowledge, sparse) |
const Graph< bool > & | comm_access = graph_manager.load_optional(graph_names::comm_access, true, agents, sparse, ns_manager.get_nodeset(nodeset_names::comm), sparse) |
const Graph< float > & | comm_medium_prefs = graph_manager.load_optional(graph_names::comm_pref, 1.0f, agents, sparse, ns_manager.get_nodeset(nodeset_names::comm), sparse) |
std::vector< unsigned int > | _current_agent_locations |
std::vector< CommunicationMedium > | communication_mediums |
Tasks * | tasks = 0 |
Public Attributes inherited from Model | |
Construct & | construct |
GraphManager & | graph_manager |
NodesetManager & | ns_manager |
Random & | random |
bool | valid |
If member is false, the model's functions are not called. | |
A model which allows agents to learn information based on their current location.
Location::Location | ( | Construct & | construct | ) |
summary>
|
overridevirtual |
|
virtual |
summary>
|
overridevirtual |
|
overridevirtual |
std::vector<unsigned int> Location::_current_agent_locations |
summary>
const Graph<bool>& Location::active = graph_manager.load_optional(graph_names::active, true, agents, sparse, ns_manager.get_nodeset(nodeset_names::time), sparse) |
summary>
const Graph<float>& Location::agent_location_learning_rate_net = graph_manager.load_optional(graph_names::loc_learning_rate, 1.0f, agents, sparse, locations, sparse) |
summary>
const Nodeset& Location::agents = ns_manager.get_nodeset(nodeset_names::agents) |
summary>
const Graph<bool>& Location::comm_access = graph_manager.load_optional(graph_names::comm_access, true, agents, sparse, ns_manager.get_nodeset(nodeset_names::comm), sparse) |
summary>
std::vector<CommunicationMedium> Location::communication_mediums |
summary>
Graph<bool>& Location::current_loc = graph_manager.load_required(graph_names::current_loc, agents, locations) |
summary>
const Nodeset& Location::knowledge = ns_manager.get_nodeset(nodeset_names::knowledge) |
summary>
const Graph<float>& Location::knowledge_expertise = graph_manager.load_optional(graph_names::k_exp_wgt, 1.0f, agents, sparse, ns_manager.get_nodeset(nodeset_names::time), sparse) |
summary>
const Graph<float>& Location::knowledge_importance = graph_manager.load_optional(graph_names::interact_k_wgt, 1.0f, agents, sparse, knowledge, sparse) |
summary>
Graph<bool>& Location::knowledge_net = graph_manager.load_required(graph_names::knowledge, agents, knowledge) |
summary>
const Graph<float>& Location::knowledge_priority_network = graph_manager.load_optional(graph_names::k_priority, 1.0f, agents, sparse, knowledge, sparse) |
summary>
const Graph<bool>& Location::loc_adj = graph_manager.load_optional(graph_names::location_network, true, locations, sparse, locations, sparse) |
summary>
const Graph<unsigned int>& Location::loc_limit = graph_manager.load_optional(graph_names::loc_learning_limit, 1u, agents, sparse, locations, sparse) |
summary>
const Graph<bool>& Location::location_knowledge_net = graph_manager.load_optional(graph_names::loc_knowledge, true, locations, sparse, knowledge, sparse) |
summary>
const Graph<bool>& Location::location_medium_access = graph_manager.load_optional(graph_names::loc_medium_access, true, locations, sparse, ns_manager.get_nodeset(nodeset_names::comm), sparse) |
summary>
const Graph<float>& Location::location_preference = graph_manager.load_optional(graph_names::loc_preference, 1.0f, agents, sparse, locations, sparse) |
summary>
const Nodeset& Location::locations = ns_manager.get_nodeset(nodeset_names::loc) |
summary>
Tasks* Location::tasks = 0 |
summary>