![]() |
fpmas 1.6
|
#include <grid.h>
Public Member Functions | |
virtual DiscretePoint | locationPoint () const =0 |
Protected Member Functions | |
virtual void | moveTo (DiscretePoint point)=0 |
A non-templated GridAgent base class.
This notably allows the usage of moveTo(DiscretePoint) and locationPoint() methods from a dynamic_cast
from the api::model::Agent base, without the need for the CellType
template parameter.
|
protectedpure virtual |
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.
point | discrete coordinates |
OutOfMobilityFieldException |
Implemented in fpmas::model::GridAgent< AgentType, GridCellType, Derived >, fpmas::api::model::GridAgent< GridCellType >, and fpmas::api::model::GridAgent< model::GridCell >.
|
pure virtual |
Returns the current location of the GridAgent as discrete coordinates.
The behavior of this method is similar to the SpatialAgent::locationId() method: considering the moveTo(DiscretePoint) method, the agent can move using this kind of operations:
Implemented in fpmas::model::GridAgent< AgentType, GridCellType, Derived >.