fpmas-metamodel 1.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CellsUtilityOutput Class Reference

#include <output.h>

Inheritance diagram for CellsUtilityOutput:
Inheritance graph
[legend]
Collaboration diagram for CellsUtilityOutput:
Collaboration graph
[legend]

Public Member Functions

 CellsUtilityOutput (BasicMetaModel &model, std::size_t grid_width, std::size_t grid_height)
 
void dump () override
 

Detailed Description

Dumps the current grid to a grid.json file on the process 0 as a 2 dimension array such as json[y][x] contains the utility of the grid cell at (x,y).

Since the utility of the cells is currently static, it is not relevant to periodically schedule this output, but dump() or job() can be used to perform an utility output at the beginning of the simulation.

Constructor & Destructor Documentation

◆ CellsUtilityOutput()

CellsUtilityOutput::CellsUtilityOutput ( BasicMetaModel model,
std::size_t  grid_width,
std::size_t  grid_height 
)
inline

CellsUtilityOutput constructor.

Parameters
modelMetaModel from which cells are gathered
grid_widthWidth of the grid
grid_heightHeight of the grid

Member Function Documentation

◆ dump()

void CellsUtilityOutput::dump ( )
override

Dumps data from the MetaModel to the grid.json file.

Must be called on all processes.


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