fpmas-metamodel 1.0
|
#include <agent.h>
Public Member Functions | |
bool | is_in_contacts (DistributedId id) |
virtual const fpmas::api::model::AgentNode * | agentNode () const =0 |
MetaAgentBase () | |
MetaAgentBase (const std::deque< DistributedId > &contacts) | |
const std::deque< DistributedId > & | contacts () const |
Static Public Attributes | |
static std::size_t | max_contacts |
static std::size_t | range_size |
static float | contact_weight |
static MovePolicy | move_policy |
Protected Member Functions | |
std::deque< DistributedId > & | contacts () |
A generic MetaAgent class, that defines features common for both MetaGridAgents and MetaGraphAgents.
If config.agent_interactions
is set to CONTACTS in the MetaModel configuration, all agents maintain a contact list with which a link is kept, allowing agents in contact to interact even if they are geographically distant.
|
inline |
MetaAgentBase default constructor. The contacts list is initialized empty.
|
inline |
MetaAgentBase constructor.
contacts | Initial list of contacts |
|
protected |
Non-const contacts() access, that can only be used internally during agent behaviors.
bool MetaAgentBase::is_in_contacts | ( | DistributedId | id | ) |
Checks if the agent corresponding to id
is currently in the contacts list of this agent.
This method can safely be called on a DISTANT agent after a read operation.
|
pure virtual |
Returns a pointer to the node containing the agent.
Implemented in MetaAgent< AgentBase, PerceptionRange >, MetaAgent< SpatialAgent< MetaGraphAgent, MetaGraphCell >, GraphRange< MetaGraphCell > >, and MetaAgent< GridAgent< MetaGridAgent, MetaGridCell >, MooreRange< MooreGrid< MetaGridCell > > >.
const std::deque< DistributedId > & MetaAgentBase::contacts | ( | ) | const |
Current contacts of the agent.
|
static |
Maximum number of contacts.
|
static |
Perception and mobility range size. Currently, only a range size of 1 is supported for generic graph based spatial models, but can be set to arbitrary positive values for grid environments.
|
static |
Weight of edges between contacts.
|
static |
The MovePolicy used to chose where all agents need to move at each time step.