fpmas-metamodel 1.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
MetaCell Class Referenceabstract

#include <cell.h>

Inheritance diagram for MetaCell:
Inheritance graph
[legend]

Public Member Functions

 MetaCell ()=default
 
 MetaCell (float utility, std::size_t cell_size)
 
 MetaCell (float utility, const std::vector< char > &data)
 
float getUtility () const
 
const std::vector< char > & getData () const
 
void update_edge_weights ()
 
virtual void read_all_cell ()=0
 
virtual void read_one_cell ()=0
 
virtual void write_all_cell ()=0
 
virtual void write_one_cell ()=0
 
virtual void read_all_write_one_cell ()=0
 
virtual void read_all_write_all_cell ()=0
 
virtual const fpmas::api::model::AgentNode * cellNode () const =0
 

Static Public Attributes

static float cell_edge_weight
 

Detailed Description

A generic MetaCell class, that defines features common for both MetaGridCells and MetaGraphCells.

Constructor & Destructor Documentation

◆ MetaCell() [1/3]

MetaCell::MetaCell ( )
default

Default generated MetaCell constructor, for internal use only.

◆ MetaCell() [2/3]

MetaCell::MetaCell ( float  utility,
std::size_t  cell_size 
)
inline

MetaCell constructor.

The vector of dummy data is allocated and default initialized with the specified count of elements.

Parameters
utilityUtility of the cell
cell_sizeSize of the vector of dummy data

◆ MetaCell() [3/3]

MetaCell::MetaCell ( float  utility,
const std::vector< char > &  data 
)
inline

MetaCell constructor.

Parameters
utilityUtility of the cell
dataVector of dummy data

Member Function Documentation

◆ getUtility()

float MetaCell::getUtility ( ) const
inline

Utility associated to this cell.

◆ getData()

const std::vector< char > & MetaCell::getData ( ) const
inline

Dummy data used to emulate different serialisation sizes.

See also
ModelConfig::cell_size

◆ update_edge_weights()

void MetaCell::update_edge_weights ( )

Sets the weight of outgoing CELL_SUCCESSOR edges to cell_edge_weight+[count of agents located in the cell].

This can be useful to better handle the DistributedMoveAlgorithm with graph based load balancing algorithms.

See also
ModelConfig::dynamic_cell_edge_weights

◆ read_all_cell()

virtual void MetaCell::read_all_cell ( )
pure virtual

Interactions::READ_ALL behavior implementation.

◆ read_one_cell()

virtual void MetaCell::read_one_cell ( )
pure virtual

Interactions::READ_ONE behavior implementation.

◆ write_all_cell()

virtual void MetaCell::write_all_cell ( )
pure virtual

Interactions::WRITE_ALL behavior implementation.

◆ write_one_cell()

virtual void MetaCell::write_one_cell ( )
pure virtual

Interactions::WRITE_ONE behavior implementation.

◆ read_all_write_one_cell()

virtual void MetaCell::read_all_write_one_cell ( )
pure virtual

Interactions::READ_ALL_WRITE_ONE behavior implementation.

◆ read_all_write_all_cell()

virtual void MetaCell::read_all_write_all_cell ( )
pure virtual

Interactions::READ_ALL_WRITE_ALL behavior implementation.

◆ cellNode()

virtual const fpmas::api::model::AgentNode * MetaCell::cellNode ( ) const
pure virtual

Returns a pointer to the node containing the cell.

Implemented in MetaGridCell, and MetaGraphCell.

Member Data Documentation

◆ cell_edge_weight

float MetaCell::cell_edge_weight
static

Default weight of CELL_SUCCESSOR edges.


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