fpmas-metamodel 1.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
RandomMovePolicy< CellType > Struct Template Reference

#include <agent.h>

Inheritance diagram for RandomMovePolicy< CellType >:
Inheritance graph
[legend]
Collaboration diagram for RandomMovePolicy< CellType >:
Collaboration graph
[legend]

Public Member Functions

CellType * selectCell (fpmas::model::Neighbors< CellType > &mobility_field) const override
 
virtual CellType * selectCell (fpmas::model::Neighbors< CellType > &mobility_field) const =0
 

Detailed Description

template<typename CellType>
struct RandomMovePolicy< CellType >

MovePolicyFunction implementation: selects a random cell from the mobility field.

The probability to select each cell is proportional to its utility.

Member Function Documentation

◆ selectCell()

template<typename CellType >
CellType * RandomMovePolicy< CellType >::selectCell ( fpmas::model::Neighbors< CellType > &  mobility_field) const
overridevirtual

Selects a cell to move from the specified mobility field.

Parameters
mobility_fieldMobility field of an agent
Returns
Pointer to the selected cell

Implements MovePolicyFunction< CellType >.


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