fpmas-metamodel 1.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
MetaAgentBase Class Referenceabstract

#include <agent.h>

Inheritance diagram for MetaAgentBase:
Inheritance graph
[legend]

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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MetaAgentBase() [1/2]

MetaAgentBase::MetaAgentBase ( )
inline

MetaAgentBase default constructor. The contacts list is initialized empty.

◆ MetaAgentBase() [2/2]

MetaAgentBase::MetaAgentBase ( const std::deque< DistributedId > &  contacts)
inline

MetaAgentBase constructor.

Parameters
contactsInitial list of contacts

Member Function Documentation

◆ contacts() [1/2]

std::deque< DistributedId > & MetaAgentBase::contacts ( )
protected

Non-const contacts() access, that can only be used internally during agent behaviors.

◆ is_in_contacts()

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.

◆ agentNode()

virtual const fpmas::api::model::AgentNode * MetaAgentBase::agentNode ( ) const
pure virtual

◆ contacts() [2/2]

const std::deque< DistributedId > & MetaAgentBase::contacts ( ) const

Current contacts of the agent.

Member Data Documentation

◆ max_contacts

std::size_t MetaAgentBase::max_contacts
static

Maximum number of contacts.

◆ range_size

std::size_t MetaAgentBase::range_size
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.

◆ contact_weight

float MetaAgentBase::contact_weight
static

Weight of edges between contacts.

◆ move_policy

MovePolicy MetaAgentBase::move_policy
static

The MovePolicy used to chose where all agents need to move at each time step.


The documentation for this class was generated from the following file: