![]() |
Construct version 5.4.1
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 |
Function called once before any simulation cycles begin. More... | |
void | think (void) override |
First function called in a simulation cycle. More... | |
void | cleanup (void) override |
Function called after the Model::communicate functions in a simulation cycle. More... | |
virtual float | get_expertise (unsigned int agent, unsigned int location) |
virtual const CommunicationMedium * | get_medium (unsigned int agent) |
![]() | |
Model (Construct *_construct, const std::string &name) | |
Constructor for all models in Construct. More... | |
Model (const std::string &name) | |
Constructor for the PlaceHolder model. 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 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 |
![]() | |
Construct *const | construct |
GraphManager *const | graph_manager |
NodesetManager *const | ns_manager |
Random *const | random |
const std::string | name |
Name of the model. Set by the Model constructor. | |
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.
|
overridevirtual |
Function called after the Model::communicate functions in a simulation cycle.
End of cycle calculations are done during this function. Model::cleanup is called after GraphManager::push_deltas is called.
Reimplemented from Model.
|
overridevirtual |
Function called once before any simulation cycles begin.
Reimplemented from Model.
|
overridevirtual |
First function called in a simulation cycle.
Messages are typically created in this function.
Reimplemented from Model.