Target line

Target line is used to graphically define the following things in pedestrian dynamics models:

 To draw a straight target line

  1. Drag the  Target Line element from the  Space Markup palette to the graphical diagram. 

 To draw a target line of complex form

  1. Double-click the  Target Line  element in the Space Markup section of the  Pedestrian Library palette.
  2. The icon of the element should turn into . It means that the drawing mode is activated and now you can draw target line in the graphical editor point by point.
  3. Click in the graphical editor to put the first point of the target line. Do more clicks where you want to place line's salient point. Add the last point with double-clicking.



Name – The name of the shape. The name is used to identify and access the shape from code.

Ignore – If selected, the shape is excluded from the model.

Visible on upper level – If selected, the wall is also visible on the upper level where this agent lives.

Lock – If selected, the wall shape is 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 shape is visible on animation at model runtime, or not. Using the control, choose yes or no.

Line color – The line color.

Position and size

Ground – The ground this target line belongs to. 

X – X-coordinate of the polyline (its start point).

Y – Y-coordinate of the polyline (its start point).


The table located in the Points property section enables users to view and adjust coordinates of target line points.  

Here you define relative coordinates, not the absolute ones. The first point always has coordinates (0,0) that can not be changed.
Other rows of the table define relative coordinates of the successive points. Coordinates of each point are actually offsets of the corresponding point from the start point along X and Y axes correspondingly.


Show in 3D - If selected, the shape will be displayed both in 2D and 3D animation.

Show name – If selected, the shape's name is displayed on the graphical diagram.


You can dynamically modify the target line properties at model runtime using the following API.



double getX()

Returns the X coordinate of the target line.

double getY()

Returns the Y coordinate of the target line.

void setPos(double x, double y)

Sets new coordinates for the target line. 

x - the new value of the X coordinate.
y - the new value of the Y coordinate.

Length, points



double length()

Returns the length of the target line (in pixels).

int getNPoints()

Returns the number of salient points of the target line.

double getPointDx( int i )

Returns the X-coordinate of the particular point of the target line relative to its start point.

i - the index of the point (starting from 0)

double getPointDy( int i )

Returns the Y-coordinate of the particular point of the target line relative to its start point.

i - the index of the point (starting from 0)




boolean isVisible()

Returns true if the target line is visible; returns false otherwise.

void setVisible(boolean v)

Sets the visibility of the target line.

Parameter: v - visibility. If v is true - the target line is set to be visible, if it is false - not visible.




Color getColor()

Returns the color of the target line, or null if the target line has no color.

void setColor(Color color)

Sets the color of the target line.

Parameter: color - the new color




Ground getGround()

Returns the ground where this target line is located, or null if the target line does not belong to any ground.