![]() |
Construct version 5.3.9
An agent based modeling framework
|
Model that updates the trust in peices of knowledge. More...
Public Member Functions | |
KnowledgeTrust (const dynet::ParameterMap ¶meters, Construct *construct) | |
Loads the networks and parses parameters. More... | |
void | initialize (void) |
Moves the model to the front of the model list to ensure this model's communicate function is called first. More... | |
void | update (void) |
Add knowledge trust to knowledge items in messages if they do not already include them. More... | |
void | communicate (InteractionMessageQueue::iterator msg) |
Parses a message for knowledge trust and adds them to the relevant agent's transactive memory. More... | |
void | cleanup (void) |
Updates each agent's knowledge trust based on the agent's transactive memory. More... | |
![]() | |
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 (InteractionMessageQueue::iterator 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... | |
Public Attributes | |
float | rr |
The rate at which trusts can change. | |
const Graph< bool > & | knowledge_net = graph_manager->load_required(graph_names::knowledge, nodeset_names::agents, nodeset_names::knowledge) |
Pointer to the graph with name "knowledge network". | |
Graph< float > & | knowledge_trust_net |
Pointer to the graph with name "knowledge trust network". More... | |
Graph< std::map< unsigned int, float > > & | kttm |
Pointer to the graph with name "knowledge trust transactive memory network". More... | |
![]() | |
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. | |
Model that updates the trust in peices of knowledge.
KnowledgeTrust::KnowledgeTrust | ( | const dynet::ParameterMap & | parameters, |
Construct * | construct | ||
) |
Loads the networks and parses parameters.
If the trust and/or kttm networks were already loaded, for every element in the knowledge network that is false, the associated elements in the knowledge trust network are set to 0.5 and in the knowledge trust transactive memory network are removed.
Additionally, this model checks that the "agent" nodeset has attributes "can send knowledge trust" and "can receiver knowledge trust".
|
virtual |
Updates each agent's knowledge trust based on the agent's transactive memory.
Reimplemented from Model.
|
virtual |
Parses a message for knowledge trust and adds them to the relevant agent's transactive memory.
Reimplemented from Model.
|
virtual |
Moves the model to the front of the model list to ensure this model's communicate function is called first.
Reimplemented from Model.
|
virtual |
Add knowledge trust to knowledge items in messages if they do not already include them.
Reimplemented from Model.
Graph<float>& KnowledgeTrust::knowledge_trust_net |
Pointer to the graph with name "knowledge trust network".
Graph<std::map<unsigned int, float> >& KnowledgeTrust::kttm |
Pointer to the graph with name "knowledge trust transactive memory network".