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

#include <agent.h>

Inheritance diagram for MaxMovePolicy< CellType >:
Inheritance graph
[legend]
Collaboration diagram for MaxMovePolicy< 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 MaxMovePolicy< CellType >

MovePolicyFunction implementation: selects the cell with the maximum utility from the mobility field. If several cells have the same maximum utility, a random cell is chosen among them.

Member Function Documentation

◆ selectCell()

template<typename CellType >
CellType * MaxMovePolicy< 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: