public class

AreaService

extends EnvironmentService
java.lang.Object
   ↳ uk.ac.imperial.presage2.core.environment.EnvironmentService
     ↳ uk.ac.imperial.presage2.util.location.area.AreaService

Class Overview

Global environment service to get the simulation Area as defined by the environment and provided through HasArea.

Usage

If you're extending AbstractEnvironment simply add an instance of this service to the global environment services in initialiseGlobalEnvironmentServices().

Summary

[Expand]
Inherited Fields
From class uk.ac.imperial.presage2.core.environment.EnvironmentService
Public Constructors
AreaService(EnvironmentSharedStateAccess sharedState, HasArea area)
Public Methods
void addToCell(int x, int y, int z, UUID aid)
Set<UUID> getCell(int x, int y, int z)
Get the cell corresponding to the coordinates x,y,z.
int getSizeX()
int getSizeY()
int getSizeZ()
boolean isCellArea()
Returns true if Cells are being used instead of basic Locations.
void removeFromCell(int x, int y, int z, UUID aid)
[Expand]
Inherited Methods
From class uk.ac.imperial.presage2.core.environment.EnvironmentService
From class java.lang.Object

Public Constructors

public AreaService (EnvironmentSharedStateAccess sharedState, HasArea area)

Public Methods

public void addToCell (int x, int y, int z, UUID aid)

public Set<UUID> getCell (int x, int y, int z)

Get the cell corresponding to the coordinates x,y,z. This cell contains the set of agents currently in this cell.

public int getSizeX ()

public int getSizeY ()

public int getSizeZ ()

public boolean isCellArea ()

Returns true if Cells are being used instead of basic Locations.

public void removeFromCell (int x, int y, int z, UUID aid)