fpmas 1.6
Public Member Functions | List of all members
fpmas::api::model::SpatialAgentBehavior Class Referenceabstract

#include <spatial_model.h>

Inheritance diagram for fpmas::api::model::SpatialAgentBehavior:
Inheritance graph
[legend]

Public Member Functions

virtual void handleNewMove ()=0
 
virtual void handleNewPerceive ()=0
 

Detailed Description

Predefined SpatialAgent behaviors specifically used in the context of the DistributedMoveAlgorithm.

Member Function Documentation

◆ handleNewMove()

virtual void fpmas::api::model::SpatialAgentBehavior::handleNewMove ( )
pure virtual

Handles links on the NEW_MOVE layer.

Crops the current mobility field according to the current mobility range of the agent.

For each outgoing edge on the NEW_MOVE layer:

  • if agent->mobilityRange().contains(agent->locationCell(), edge->getTargetNode()), edge is replaced by an edge on the MOVE layer.
  • else, the edge is just unlinked.

Implemented in fpmas::model::SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > >, and fpmas::model::SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType >.

◆ handleNewPerceive()

virtual void fpmas::api::model::SpatialAgentBehavior::handleNewPerceive ( )
pure virtual

Handles links on the NEW_PERCEIVE layer.

Crops the current perception field according to the current perception range of the agent.

For each outgoing edge on the NEW_PERCEIVE layer:

  • if agent->perceptionRange().contains(agent->locationCell(), edge->getTargetNode()), edge is replaced by an edge on the PERCEIVE layer.
  • else, the edge is just unlinked.

Implemented in fpmas::model::SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > >, and fpmas::model::SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType >.


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