fpmas-metamodel 1.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
MetaGraphModel< SyncMode > Class Template Reference

#include <metamodel.h>

Inheritance diagram for MetaGraphModel< SyncMode >:
Inheritance graph
[legend]
Collaboration diagram for MetaGraphModel< SyncMode >:
Collaboration graph
[legend]

Public Member Functions

void buildCells (const ModelConfig &config) override
 
void buildAgents (const ModelConfig &config) override
 
virtual std::string getName () const =0
 
virtual fpmas::api::model::Model & getModel ()=0
 
virtual fpmas::api::model::AgentGroup & cellGroup ()=0
 
virtual fpmas::api::model::AgentGroup & agentGroup ()=0
 
virtual DotOutputgetDotOutput ()=0
 
virtual BasicMetaModelinit ()=0
 
virtual void run ()=0
 

Detailed Description

template<template< typename > class SyncMode>
class MetaGraphModel< SyncMode >

A generic MetaModel extension where Spatial Agents are moving on an arbitrary graph.

Agents randomly move to out neighbors of their location cells.

Member Function Documentation

◆ buildCells()

template<template< typename > class SyncMode>
void MetaGraphModel< SyncMode >::buildCells ( const ModelConfig config)
overridevirtual

Builds a graph according to the specified config.environment:

  • SMALL_WORLD
  • RANDOM
  • CLUSTERED In any case, config.num_cells nodes are built, with an average output degree of config.output_degree.

The parameter config.p is passed to the SMALL_WORLD graph builder to determine the proportion of edges to relink in the Small-World build process.

Parameters
configModel configuration

Implements MetaModel< SpatialModel< SyncMode, MetaGraphCell >, MetaGraphAgent >.

◆ buildAgents()

template<template< typename > class SyncMode>
void MetaGraphModel< SyncMode >::buildAgents ( const ModelConfig config)
overridevirtual

Builds GraphAgents on the spatial graph.

A total of num_cells*config.occupation_rate agents are randomly and uniformly initialized on the spatial graph.

Parameters
configModel configuration

Implements MetaModel< SpatialModel< SyncMode, MetaGraphCell >, MetaGraphAgent >.


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