AnyLogic
Expand
Font size

Point node

Nodes and paths are space markup elements that define the locations of agents in the space. Together they compose a network. In the network, node defines a place where agents may reside, while paths define the routes that agents may take when moving between nodes.

To add a point node

  1. Drag the  Point node element from the  Space Markup palette to the graphical diagram.

Point node in its default state can host only one agent at a time. If you need to draw an area where multiple agents can reside at the same time, we suggest using  Rectangular node or  Polygonal node instead.

Point node as intersection

When you draw a network and connect paths at any angle that is not 180 degrees, AnyLogic creates a point node at the place where the paths connect. These automatically drawn nodes serve as intersections: inside they have paths that define permitted movement directions through the node. Such intersections can accept more than one agent passing through at the same time.

In case of path-guided transporters, the size of the point node plays an important role in resolving possible collisions. By changing the node’s radius you can create or solve bottlenecks in your network. For example, you can increase the node’s radius so that transporters can pass each other at the intersection without pausing to resolve a collision.

To resize point node

  1. In the graphical editor, select the point node you want to resize.
  2. Drag the square handle on the border of the node until you achieve the intended size, then release the handle.

Properties

General

Name — The name of the node. The name is used to identify and access the node from code.

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

Visible on upper agent — If selected, the node is also visible on the upper agent where this agent lives.

Lock — If selected, the node 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.

Speed limit for transporters — If selected, limits the speed of transporters in this node to the specified level.

Color — Shape’s color.

Position and size

Level — Level to which this element belongs.

X — X-coordinate of the area’s start point.

Y — Y-coordinate of the area’s start point.

Z — [Enabled if Show in: 3D only option is selected] Z-coordinate of the area, in meters. The value is relative to the Z-coordinate of the area’s level.

Radius — The radius of the point node.

Advanced

Show in — Here you can choose whether you want the shape to be shown both In 2D and 3D animation, or in 2D only, or in 3D only.

Show name — If selected, the shape’s name is displayed on the graphical diagram.

Functions

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

Position
Function Description
double getX() Returns the X coordinate of the node (namely, the coordinate of its upper left corner).
double getY() Returns the Y coordinate of the node (namely, the coordinate of its upper left corner).
double getZ() Returns the Z coordinate of the node (namely, the coordinate of its upper left corner).
Point getXYZ() Returns the (X, Y, Z) coordinates of the given point.
Level
Function Description
Level getLevel() Returns the level on which this node is located.
Visibility
Function Description
boolean isVisible() Returns true if the node is visible; returns false otherwise.
void setVisible(boolean v) Sets the visibility of the node.

v — visibility. If v is true — the node is set to be visible, if it is false — not visible.
Color
Function Description
Color getLineColor() Returns the color of the node, or null if the node has no color or is textured (in this case use getFillTexture() to get the node’s texture).
Texture getLineTexture() Returns the texture of the node or null if the node has no texture or is colored (in this case use getLineColor() to get the node’s color).
void setLineColor (Color lineColor) Sets the color of the node.

lineColor — the new color, if null, the node is not drawn.
void setLineColor (Paint lineColor) Sets the color (or Texture) of the node.

fillColor — the new color, if null, the node is not drawn.
Network
Function Description
Network getNetwork() Returns the network this markup element belongs to or null if this element is not a part of a network.
int getConnectionsCount() Returns the number of the node’s connections with other nodes.
Path getConnection(int index) Returns the connection between this node and another node by the provided index.

index — the index of required connection in range (0, this.getConnectionsCount() - 1).
Removal
Function Description
void remove() Removes the node from the presentation. If the node is not a part of presentation, the function does nothing.
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?