![]() |
fpmas 1.6
|
#include <spatial_model.h>
Public Member Functions | |
virtual std::vector< CellType * > | build (SpatialModel< CellType > &spatial_model) const =0 |
virtual std::vector< CellType * > | build (SpatialModel< CellType > &spatial_model, GroupList groups) const =0 |
CellNetworkBuilder API.
The main purpose of a CellNetworkBuilder is to generate some Cells according to specific environment properties (for example, a grid with a specified size or a geographic environment loaded from an OSM file), and to add it to a predefined SpatialModel in order to build a Cell network. In consequence, successor relations between Cells are also assumed to be built by the CellNetworkBuilder.
The CellNetworkBuilder is however allowed to instantiate and link any other type of Agent that might be relevant in the context of the built environment.
The construction of the SpatialModel might be distributed, so that the instantiation of all Cells are not handled by a single process, but this is not required.
The distributed instantiation of user defined SpatialAgents on the built Cell network can be handled using a SpatialAgentBuilder.
|
pure virtual |
Builds a Cell network into the specified spatial_model
.
Built Cells are added to the SpatialModel using the SpatialModel::add() method.
The method also perform synchronizations on the underlying spatial_model
graph to ensure that all links created are properly committed and synchronized upon return.
spatial_model | spatial model in which cells will be added |
Implemented in fpmas::model::CellNetworkBuilder< CellType >, and fpmas::model::detail::GridBuilder< CellType >.
|
pure virtual |
Same as build(spatial_model)
, but also adds built cells to groups
, in order to assign behaviors to cells.
spatial_model | spatial model in which cells will be added |
groups | groups to which built cells will be added |
Implemented in fpmas::model::CellNetworkBuilder< CellType >, and fpmas::model::detail::GridBuilder< CellType >.