fpmas 1.6
Classes | Typedefs | Enumerations | Functions
fpmas::api::model Namespace Reference

Classes

class  Agent
 
class  AgentGroup
 
class  AgentPtr
 
class  AgentTask
 
class  Behavior
 
class  Cell
 
class  CellBehavior
 
class  CellNetworkBuilder
 
struct  DiscretePoint
 
class  DistributedMoveAlgorithm
 
class  EndCondition
 
class  GridAgent
 
class  GridAgentBase
 
class  GridCell
 
class  GridCellFactory
 
class  Model
 
class  MoveAgentGroup
 
class  OutOfFieldException
 
class  OutOfMobilityFieldException
 
class  RandomAgent
 
class  Range
 
class  SpatialAgent
 
class  SpatialAgentBehavior
 
class  SpatialAgentBuilder
 
class  SpatialAgentFactory
 
class  SpatialAgentMapping
 
class  SpatialModel
 

Typedefs

typedef api::graph::DistributedNode< AgentPtr > AgentNode
 
typedef api::graph::DistributedEdge< AgentPtr > AgentEdge
 
typedef api::graph::DistributedGraph< AgentPtr > AgentGraph
 
typedef api::graph::SetLocalNodeEvent< AgentPtr > SetAgentLocalEvent
 
typedef api::graph::DistributedGraph< AgentPtr >::SetLocalNodeCallback SetAgentLocalCallback
 
typedef api::graph::SetDistantNodeEvent< AgentPtr > SetAgentDistantEvent
 
typedef api::graph::DistributedGraph< AgentPtr >::SetDistantNodeCallback SetAgentDistantCallback
 
typedef int GroupId
 
typedef std::type_index TypeId
 
typedef api::utils::PtrWrapper< api::model::Agent > WeakAgentPtr
 
typedef std::vector< std::reference_wrapper< AgentGroup > > GroupList
 
using LoadBalancing = fpmas::api::graph::LoadBalancing< AgentPtr >
 
typedef long DiscreteCoordinate
 
typedef SpatialAgentMapping< GridCell > GridAgentMapping
 

Enumerations

enum  SpatialModelLayers : fpmas::api::graph::LayerId {
  CELL_SUCCESSOR = -1 , LOCATION = -2 , MOVE = -3 , PERCEIVE = -4 ,
  PERCEPTION = -5 , NEW_LOCATION = -6 , NEW_MOVE = -7 , NEW_PERCEIVE = -8
}
 

Functions

float euclidian_distance (const DiscretePoint &p1, const DiscretePoint &p2)
 
bool operator< (const DiscretePoint &p1, const DiscretePoint &p2)
 
bool operator== (const DiscretePoint &p1, const DiscretePoint &p2)
 
bool operator!= (const DiscretePoint &p1, const DiscretePoint &p2)
 
std::ostream & operator<< (std::ostream &os, const DiscretePoint &point)
 
bool operator< (const GridCell &c1, const GridCell &c2)
 

Detailed Description

Agent model API namespace.

Typedef Documentation

◆ AgentNode

AgentNode type.

◆ AgentEdge

AgentEdge type.

◆ AgentGraph

AgentGraph type.

◆ SetAgentLocalEvent

Event triggered when an Agent is set LOCAL.

◆ SetAgentLocalCallback

Callback API used to handle SetAgentLocalEvent instances.

◆ SetAgentDistantEvent

Event triggered when an Agent is set DISTANT.

◆ SetAgentDistantCallback

Callback API used to handle SetAgentDistantEvent instances.

◆ GroupId

Group ID type.

◆ TypeId

typedef std::type_index fpmas::api::model::TypeId

Agent type ID type.

◆ WeakAgentPtr

A pointer wrapper around a polymorphic Agent type.

Contrary to AgentPtr, this pointer does not include any automatic memory management.

◆ GroupList

typedef std::vector<std::reference_wrapper<AgentGroup> > fpmas::api::model::GroupList

A type used to represent lists of AgentGroups.

◆ LoadBalancing

AgentPtr LoadBalancing specialization.

◆ DiscreteCoordinate

Integer coordinate type.

◆ GridAgentMapping

SpatialAgentMapping specialization for grid based models.

Enumeration Type Documentation

◆ SpatialModelLayers

Predefined graph layers reserved by FPMAS to implement the DistributedMoveAlgorithm. Does not conflict with the FPMAS_DEFINE_GROUPS macro.

Function Documentation

◆ euclidian_distance()

float fpmas::api::model::euclidian_distance ( const DiscretePoint &  p1,
const DiscretePoint &  p2 
)

Computes the euclidian distance between p1 and p2.

◆ operator<() [1/2]

bool fpmas::api::model::operator< ( const DiscretePoint &  p1,
const DiscretePoint &  p2 
)

Default DiscretePoint comparison operator.

p1 and p2 are first compared againt the x coordinate, and compared againt the y coordinate iff p1.x == p2.x.

◆ operator==()

bool fpmas::api::model::operator== ( const DiscretePoint &  p1,
const DiscretePoint &  p2 
)

Checks the equality of two DiscretePoints.

p1 and p2 are equals if and only if their two coordinates are equal.

Returns
true iff p1 and p2 are equal

◆ operator!=()

bool fpmas::api::model::operator!= ( const DiscretePoint &  p1,
const DiscretePoint &  p2 
)

Equivalent to !(p1==p2).

◆ operator<<()

std::ostream & fpmas::api::model::operator<< ( std::ostream &  os,
const DiscretePoint &  point 
)

DiscretePoint stream output operator.

Parameters
osoutput stream
pointpoint to insert
Returns
os

◆ operator<() [2/2]

bool fpmas::api::model::operator< ( const GridCell &  c1,
const GridCell &  c2 
)

Default GridCell comparison operator.

Effectively compares GridCell::location().