AnyLogic 9
Expand
Font size

Wall

A Wall is a space markup shape used to define exterior and interior walls in pedestrian simulation models. To draw some enclosed areas inside, use Rectangular wall and Circular wall elements.

You can draw a wall of any shape. Wall can contain either linear and curved segments.

To draw a wall

  1. Click the  Wall element in the Space Markup section of the  Pedestrian Library palette.
    The drawing mode is activated. You can now draw the wall in the graphical editor point by point.
  2. Click in the graphical editor to place the first point of the wall. Click again to add additional points.
    To draw a curved segment, hold down the left mouse button while placing a point and move the mouse until the curve has the desired shape.
  3. Double-click to place the last point of the wall.

Properties

General

Name — The name of the wall. The name is used to identify the wall.

Show name — If selected, the name of the wall is displayed on the graphical diagram.

Lock — If selected, the wall is locked. Locked elements do not respond to mouse clicks, and they cannot be selected in the graphical editor until you unlock them. This is often needed when you want to prevent the element from being edited while other elements are placed over it.

Ignore — If selected, the wall is excluded from the model.

Appearance

Line color — The color of the shape. Used as the outline color. If the Fill type is other than No fill, also used as the fill color.

Line width — The width of the wall.

Fill type — The fill style. From the drop-down list, select No fill, Solid area, or Hatched area.

Position and size

Level — The level to which this wall belongs.

X — The X-coordinate of the wall’s start point.

Y — The Y-coordinate of the wall’s start point.

Z — [Enabled if Show in 3D option is selected] The Z-coordinate of the wall’s start point.

Z-Height — The height of the wall, in meters. The value is relative to the Z-coordinate of the wall’s level.

Points

The table located in the Points property section allows you to view and set the coordinates of the wall’s turning points.

The coordinates are relative, not absolute. The first point always has coordinates (0, 0, 0) that cannot be changed.

Other rows of the table define relative coordinates of the successive points. The coordinates of each point are actually offsets of the corresponding point from the start point along the X, Y (and optionally Z) axes correspondingly.

Visibility and presentation

Visible — If selected, the wall is visible during animation at model runtime.

Show in — Select whether the shape is displayed in both 2D and 3D animation, 2D only, or 3D only.

Agent presentation — If selected, the wall is also visible on the upper-level agent that hosts the agent containing this wall.

Drawing linear and curved segments

To add a linear segment while drawing a wall

  1. Simply click and drag to achieve the desired length.

To add a curved segment while drawing a wall

  1. Press and hold down the left mouse button. Move the mouse while holding the button down.
  2. Release the left mouse button when you have the segment of the desired shape.

Functions

You can dynamically modify the wall properties at model runtime using the API.

Size
Function Description
double length() Returns the length of the wall (in pixels) calculated in 3D space.
double getZHeight() Returns the Z-height of the wall (in pixels).
void setZHeight(double zHeight) Sets the Z-height of the wall.

zHeight — the new height of the wall (in pixels)
Points
Function Description
double getNearestPoint(double x, double y, Point out) Calculates the point in this wall nearest to the given (x, y) point and writes the result to the output Point object. Returns the square of the distance to the point. All calculations are performed in the horizontal XY-projection (that is, z-coordinates are treated as zeros).

x — the x coordinate of the point
y — the y coordinate of the point
out — the output point to write result to
double getNearestPoint(double x, double y, double z, Point out) Calculates the point in this wall nearest to the given (x, y, z) point and writes the result to the output Point object. Returns the square of the distance to the point.

x — the x coordinate of the point
y — the y coordinate of the point
z — the z coordinate of the point
out — the output point to write result to
Segments
Function Description
int getSegmentCount() Returns the number of the wall’s segments.
MarkupSegment getSegment(int index) Returns the segment by the provided index.

index — the segment index, starting from zero up until the number of segments -1
Visibility
Function Description
boolean isVisible() Returns true if the wall is visible; returns false otherwise.
void setVisible(boolean v) Sets the visibility of the wall.

v — visibility. If v is true — the wall is set to be visible, if it is false — not visible.
Color and texture
Function Description
Color getColor() Returns the color of the wall, or null if the wall has no color or uses a texture (in this case use getTexture() to get the wall’s texture).
Texture getTexture() Returns the texture of the wall or null if the wall has no texture but uses a color (in this case use getColor() to get the wall’s color).
void setColor(Color color) Sets the color of the wall.

color — the new color
void setColor(Paint color) Sets the color (or texture) of the wall.

color — the new texture
Appearance
Function Description
double getLineWidth() Returns the width of the wall outline.
void setLineWidth(double width) Sets the width of the wall outline; 0 means the thinnest possible outline.

width — the new width of the wall outline
WallFillingType getFillingType() Returns the filling type of the wall.

Valid values:
WallFillingType.WALL_FILL_NONE — No fill
WallFillingType.WALL_FILL_SOLID — Solid fill
WallFillingType.WALL_FILL_HATCHED — Hatched area
void setFillingType(WallFillingType fillingType) Sets the filling type of the wall.

fillingType — new filling type
Valid values:
WallFillingType.WALL_FILL_NONE — No fill
WallFillingType.WALL_FILL_SOLID — Solid fill
WallFillingType.WALL_FILL_HATCHED — Hatched area
Level
Function Description
Level getLevel() Returns the level where this wall is located.
Removal
Function Description
void remove() Removes the wall from the presentation. If the wall is not a part of presentation, the function does nothing. Note, that removal from the presentation does not necessarily mean removing from the model logic, since logical networks and routes may have been created before the removal and survive it.
How can we improve this article?