1#ifndef FPMAS_ENVIRONMENT_API_H
2#define FPMAS_ENVIRONMENT_API_H
10namespace fpmas {
namespace api {
namespace model {
120 template<
typename CellType>
137 virtual bool contains(CellType* root, CellType* cell)
const = 0;
176 virtual std::size_t
radius(CellType* origin)
const = 0;
233 template<
typename CellType>
236 static_assert(std::is_base_of<api::model::Cell, CellType>::value,
237 "CellType must extend api::model::Cell");
375 template<
typename CellType>
401 std::vector<CellType*> cells) = 0;
418 template<
typename CellType>
class SpatialModel;
424 template<
typename CellType>
454 template<
typename CellType>
478 template<
typename _CellType>
506 virtual std::vector<CellType*>
cells() = 0;
567 template<
typename CellType>
583 virtual std::vector<CellType*>
build(
595 virtual std::vector<CellType*>
build(
606 template<
typename CellType>
655 template<
typename CellType>
668 virtual std::size_t
countAt(CellType* cell) = 0;
684 template<
typename CellType,
typename MappingCellType>
687 std::is_base_of<MappingCellType, CellType>::value,
688 "MappingCellType must be a base of CellType"
Definition: communication.h:251
Definition: distributed_id.h:89
Definition: spatial_model.h:32
virtual void updatePerceptions(AgentGroup &group)=0
virtual void handleNewLocation()=0
virtual void handlePerceive()=0
virtual void handleMove()=0
Definition: spatial_model.h:568
virtual std::vector< CellType * > build(SpatialModel< CellType > &spatial_model, GroupList groups) const =0
virtual std::vector< CellType * > build(SpatialModel< CellType > &spatial_model) const =0
Definition: spatial_model.h:90
virtual std::vector< Cell * > successors()=0
Definition: spatial_model.h:425
virtual api::scheduler::JobList jobs() const =0
Definition: spatial_model.h:376
virtual void init(api::communication::MpiCommunicator &comm, std::vector< api::model::SpatialAgent< CellType > * > agents, std::vector< CellType * > cells)=0
Definition: spatial_model.h:455
virtual DistributedMoveAlgorithm< CellType > & distributedMoveAlgorithm()=0
Definition: spatial_model.h:121
virtual bool contains(CellType *root, CellType *cell) const =0
virtual std::size_t radius(CellType *origin) const =0
Definition: spatial_model.h:185
virtual void handleNewPerceive()=0
virtual void handleNewMove()=0
Definition: spatial_model.h:685
virtual void build(SpatialModel< CellType > &model, GroupList groups, std::function< SpatialAgent< CellType > *()> factory, SpatialAgentMapping< MappingCellType > &agent_mapping)=0
virtual void build(SpatialModel< CellType > &model, GroupList groups, SpatialAgentFactory< CellType > &factory, SpatialAgentMapping< MappingCellType > &agent_mapping)=0
Definition: spatial_model.h:607
virtual SpatialAgent< CellType > * build()=0
Definition: spatial_model.h:656
virtual std::size_t countAt(CellType *cell)=0
Definition: spatial_model.h:234
virtual void moveTo(DistributedId id)=0
virtual const Range< CellType > & mobilityRange() const =0
virtual CellType * locationCell() const =0
virtual void initLocation(Cell *cell)=0
virtual const Range< CellType > & perceptionRange() const =0
CellType Cell
Definition: spatial_model.h:237
virtual void moveTo(Cell *cell)=0
virtual DistributedId locationId() const =0
Definition: spatial_model.h:479
virtual void add(CellType *cell)=0
_CellType CellType
Definition: spatial_model.h:484
virtual MoveAgentGroup< CellType > & buildMoveGroup(GroupId id, const Behavior &behavior)=0
virtual AgentGroup & cellGroup()=0
virtual const AgentGroup & cellGroup() const =0
virtual std::vector< CellType * > cells()=0
int LayerId
Definition: edge.h:13
int GroupId
Definition: model.h:78
SpatialModelLayers
Definition: spatial_model.h:17
std::vector< std::reference_wrapper< AgentGroup > > GroupList
Definition: model.h:833
std::vector< std::reference_wrapper< const Job > > JobList
Definition: scheduler.h:215