fpmas 1.6
Protected Member Functions | List of all members
fpmas::api::model::GridAgent< GridCellType > Class Template Reference

#include <grid.h>

Inheritance diagram for fpmas::api::model::GridAgent< GridCellType >:
Inheritance graph
[legend]
Collaboration diagram for fpmas::api::model::GridAgent< GridCellType >:
Collaboration graph
[legend]

Protected Member Functions

virtual void moveTo (DiscretePoint point)=0
 
- Protected Member Functions inherited from fpmas::api::model::SpatialAgent< GridCellType >
virtual void moveTo (DistributedId id)=0
 
virtual void moveTo (Cell *cell)=0
 
virtual void moveTo (DiscretePoint point)=0
 

Additional Inherited Members

- Public Types inherited from fpmas::api::model::SpatialAgent< GridCellType >
typedef GridCellType Cell
 
- Public Member Functions inherited from fpmas::api::model::SpatialAgent< GridCellType >
virtual DistributedId locationId () const=0
 
virtual GridCellType * locationCell () const=0
 
virtual void initLocation (Cell *cell)=0
 
virtual const Range< GridCellType > & mobilityRange () const=0
 
virtual const Range< GridCellType > & perceptionRange () const=0
 
- Public Member Functions inherited from fpmas::api::model::Agent
virtual GroupId groupId () const =0
 
virtual std::vector< GroupIdgroupIds () const =0
 
virtual void setGroupId (GroupId id)=0
 
virtual void addGroupId (GroupId id)=0
 
virtual void removeGroupId (GroupId id)=0
 
virtual AgentGroupgroup ()=0
 
virtual const AgentGroupgroup () const =0
 
virtual std::vector< AgentGroup * > groups ()=0
 
virtual std::vector< const AgentGroup * > groups () const =0
 
virtual void setGroup (AgentGroup *group)=0
 
virtual void addGroup (AgentGroup *group)=0
 
virtual void removeGroup (AgentGroup *group)=0
 
virtual void setGroupPos (api::model::GroupId gid, std::list< Agent * >::iterator pos)=0
 
virtual std::list< Agent * >::iterator getGroupPos (api::model::GroupId gid) const =0
 
virtual TypeId typeId () const =0
 
virtual Agentcopy () const =0
 
virtual void copyAssign (Agent *agent)=0
 
virtual void moveAssign (Agent *agent)=0
 
virtual AgentNodenode ()=0
 
virtual const AgentNodenode () const =0
 
virtual void setNode (AgentNode *node)=0
 
virtual Modelmodel ()=0
 
virtual const Modelmodel () const =0
 
virtual void setModel (Model *model)=0
 
virtual AgentTasktask ()=0
 
virtual const AgentTasktask () const =0
 
virtual void setTask (AgentTask *task)=0
 
virtual AgentTasktask (GroupId id)=0
 
virtual const AgentTasktask (GroupId id) const =0
 
virtual void setTask (GroupId id, AgentTask *task)=0
 
virtual const std::unordered_map< GroupId, AgentTask * > & tasks ()=0
 
virtual void act ()=0
 
- Public Member Functions inherited from fpmas::api::model::SpatialAgentBehavior
virtual void handleNewMove ()=0
 
virtual void handleNewPerceive ()=0
 
- Public Member Functions inherited from fpmas::api::model::GridAgentBase
virtual DiscretePoint locationPoint () const =0
 
- Public Member Functions inherited from fpmas::api::model::RandomAgent
virtual api::random::Generator< std::FPMAS_AGENT_RNG::result_type > & rd ()=0
 
virtual void seed (std::FPMAS_AGENT_RNG::result_type seed)=0
 

Detailed Description

template<typename GridCellType>
class fpmas::api::model::GridAgent< GridCellType >

SpatialAgent API extension to represent agents moving on a Grid.

The GridAgent notably provides methods to move or locate the agent using DiscretePoint coordinates.

The specified GridCellType is required to extend GridCell.

Member Function Documentation

◆ moveTo()

template<typename GridCellType >
virtual void fpmas::api::model::GridAgentBase::moveTo ( DiscretePoint  point)
protectedvirtual

Moves to the Cell at the specified point.

Notice that it is assumed that at most one GridCell can be located at each point.

If no Cell at point can be found in the current mobility field, an OutOfMobilityFieldException is thrown.

Parameters
pointdiscrete coordinates
Exceptions
OutOfMobilityFieldException

Implements fpmas::api::model::GridAgentBase.


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