This object allows user to define a layer in the simulated environment, representing a “floor” for pedestrians, i.e. the surface on which pedestrians can walk. This surface can be either limited by some walls or not limited (“universe”). Walls are objects, which pedestrians cannot cross. They are part of a ground, which means that one wall cannot be used by multiple grounds. 

Each Pedestrian Library model uses at least one ground, which is created automatically and named groundDefault. This object can be used to define additional grounds with their own walls set, or attach walls to the automatically generated ground.

Since grounds are independent, using multiple “small” grounds is generally faster than a single “big” ground, especially with high-detailed walls configuration. 

All pedestrian markup shapes belong to some ground.


Name – The name of the ground. The name is used to identify the ground.Ignore – If selected, the ground is excluded from the model.

Visible on upper level – If selected, the ground is visible at runtime.  

Lock – If selected, the ground shapes are locked. Locked shapes do not react to mouse clicks - it is impossible to select them in the graphical editor until you unlock them.  

Visible – Here you specify whether the ground shapes are visible on animation at model runtime, or not. Using the control, choose yes or no

Z level – Here you can define the Z-coordinate for this ground (in meters).

To create a new ground

  1. Add a markup shape to your model and go to its Properties view. 
  2. In the Position and size section, select [new ground] for the Ground parameter.

  1. AnyLogic will create a new ground and open its properties for you to edit its name, etc.

To move pedestrian flow from one ground to another, use the PedChangeGround object.


You can dynamically modify the ground properties at model runtime using the following functions. 


double getZ() - Returns the Z-coordinate for this ground.


boolean isVisible() - Returns true if the ground is currently visible; returns false otherwise.

void setVisible(boolean v) - Makes the ground visible if the v value is true; makes the ground invisible if the v value is false. Note that making the ground invisible will hide the markup elements belonging to it.


Collection<Agent> getPeds() - Returns the unmodifiable list of pedestrians in this ground.

int size() - Returns the current number of pedestrians in this ground.

Markup elements

List<AreaNode> getAreas() - Returns the list of areas belonging to this ground (including the areas that are part of the  Service with Area elements). 

List<ServiceBase<?,?>> getServices() - Returns the list of Services belonging to this ground.

List<EscalatorGroup> getEscalators() - Returns the list of Escalator Groups belonging to this ground.

List<Pathway> getPathways() - Returns the list of  Pathways belonging to this ground.

List<TargetLine> getTargetLines() - Returns the list of  Target lines belonging to this ground.

List<AbstractWall> getWalls() - Returns the list of walls belonging to this ground.

DensityMap getDensityMap() - Returns the  Pedestrian Density Map element belonging to this ground.

void setDensityMap(DensityMap densityMap) - Assigns the selected  Pedestrian Density Map element to this ground.

List<PedFlowStatistics> getPedFlowStatistics() - Returns the list of the  Ped Flow Statistics elements belonging to this ground.

Related topics

 Pedestrian Library

 Selecting markup shapes

 API reference: Ground class