![]() |
fpmas 1.6
|
#include <model.h>
Public Member Functions | |
virtual GroupId | groupId () const =0 |
virtual std::vector< GroupId > | groupIds () const =0 |
virtual void | setGroupId (GroupId id)=0 |
virtual void | addGroupId (GroupId id)=0 |
virtual void | removeGroupId (GroupId id)=0 |
virtual AgentGroup * | group ()=0 |
virtual const AgentGroup * | group () 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 Agent * | copy () const =0 |
virtual void | copyAssign (Agent *agent)=0 |
virtual void | moveAssign (Agent *agent)=0 |
virtual AgentNode * | node ()=0 |
virtual const AgentNode * | node () const =0 |
virtual void | setNode (AgentNode *node)=0 |
virtual Model * | model ()=0 |
virtual const Model * | model () const =0 |
virtual void | setModel (Model *model)=0 |
virtual AgentTask * | task ()=0 |
virtual const AgentTask * | task () const =0 |
virtual void | setTask (AgentTask *task)=0 |
virtual AgentTask * | task (GroupId id)=0 |
virtual const AgentTask * | task (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 |
Generic Agent API.
Agents in a simulation are assumed to take advantage of polymorphism : a single type is used to store Agents in an api::graph::DistributedGraph (more precisely, AgentPtr is used), but pointed Agents might have different types and implement different the act() functions to produce different behaviors.
|
pure virtual |
This method is deprecated and will be removed in a next release. Use groupIds() instead.
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Returns ids of AgentGroups to which the Agent belong.
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
This method is deprecated and will be removed in a next release. Use addGroupId() instead.
id | agent group id |
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Adds id
to this Agent's group ids.
id | agent group id |
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Removes id
from this Agent's group ids.
id | agent group id |
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
This method is deprecated and will be removed in a next release. Use groups() instead.
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
This method is deprecated and will be removed in a next release. Use groups() instead.
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Returns a list of AgentGroups to which this Agent belong.
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Returns a list of AgentGroups to which this Agent belong.
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
This method is deprecated and will be removed in a next release. Use addGroup() instead.
group | agent group |
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Adds group
to the list of AgentGroups to which this Agent belong.
group | agent group |
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Removes group
from the list of AgentGroups to wich this Agent belong.
Morever, the entry corresponding to this group
's id is removed from tasks().
group | agent group |
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Sets a list position associated to the group represented by gid
, that can be retrieved with getGroupPos().
There is no specific requirement about those methods, that can be used or not. However, AgentGroup implementations can take advantage of this feature to optimize Agent insertion and removal in constant time, using an std::list as an internal data structure.
gid | group ID |
pos | list iterator that references the current Agent within the group associated to gid |
|
pure virtual |
Retrieves a list position that was previously stored using setGroupPos().
gid | group ID |
gid
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Returns the ID of the type of this Agent.
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Allocates a new Agent pointer, considered as a copy of the current Agent.
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Copies the specified agent to this.
agent | agent to copy from |
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Moves the specified agent into this.
The specified agent
is assumed to be an updated version of this agent.
In the move process, the following fields of "this" host agent keep unchanged, and so are not moved from agent
to this :
Other fields are moved according to implementation defined rules.
agent | agent to move |
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Returns a pointer to the AgentNode that contains this Agent.
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Returns a pointer to the AgentNode that contains this Agent.
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Sets the internal pointer of the AgentNode that contains this Agent.
node | pointer to wrapping AgentNode |
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Returns a pointer to the Model that contains this Agent.
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Returns a pointer to the Model that contains this Agent.
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Sets the internal pointer of the Model that contains this Agent.
model | pointer to Model |
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Returns a pointer to the AgentTask associated to this Agent, that is used to execute the Agent.
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Returns a pointer to the AgentTask associated to this Agent, that is used to execute the Agent.
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Sets the AgentTask associated to this Agent.
task | agent task |
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
Returns the AgentTask associated to this Agent in the AgentGroup corresponding to id
.
Behavior is undefined if the Agent does not belong to an AgentGroup with the specified id
.
id | group id |
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
Returns the AgentTask associated to this Agent in the AgentGroup corresponding to id
.
Behavior is undefined if the Agent does not belong to an AgentGroup with the specified id
.
id | group id |
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
Sets the AgentTask associated to this Agent in the AgentGroup corresponding to id
.
Behavior is undefined if the Agent does not belong to an AgentGroup with the specified id
.
id | group id |
task | agent task |
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Returns a map containing all the tasks associated to this Agent in the AgentGroups to which it belongs.
Exactly one task is associated to the agent in each group.
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.
|
pure virtual |
Executes the default behavior of the Agent.
This will be remove in a next release, use api::model::Behavior instead to use arbitrary functions as behaviors.
Implemented in fpmas::model::detail::AgentBase< api::model::Cell, GraphCell, GraphCellBase< GraphCell, GraphCell > >, fpmas::model::detail::AgentBase< api::model::Cell, GraphCellType, GraphCellBase< GraphCellType, GraphCellType > >, fpmas::model::detail::AgentBase< api::model::GridAgent< model::GridCell >, AgentType, SpatialAgentBase< api::model::GridAgent< model::GridCell >, AgentType, model::GridCell, GridAgent< AgentType, model::GridCell, AgentType > > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCell, GridCellBase< GridCell, GridCell > >, fpmas::model::detail::AgentBase< api::model::GridCell, GridCellType, GridCellBase< GridCellType, GridCellType > >, and fpmas::model::detail::AgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, SpatialAgentBase< api::model::SpatialAgent< api::model::Cell >, AgentType, api::model::Cell, AgentType > >.