AnyLogic AnyLogic
Expand
Font size
All Implemented Interfaces:
AggregatableAnimationElement, AnimationStaticLocationProvider, HasLevel, IMarkupLibraryDescriptor, INetworkMarkupElement, INode<Node,​Path>, LevelElement, LevelMarkup, com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor, com.anylogic.engine.markup.material_handling.INodeDescriptor<Agent>, SVGElement, java.io.Serializable
Direct Known Subclasses:
AreaNode, NetworkPortImpl, PointNode

public abstract class Node
extends NetworkMarkupElement
implements INode<Node,​Path>, com.anylogic.engine.markup.material_handling.INodeDescriptor<Agent>, LevelMarkup
Implementation of INode for network in continuous space.
Author:
AnyLogic North America, LLC https://anylogic.com
See Also:
Serialized Form

Constructor Summary

Constructors 
Node()  
Node​(Agent owner)  
Node​(Agent owner, ShapeDrawMode drawMode, boolean isPublic, java.awt.Paint fillColor, boolean limitSpeed, double maxSpeedInMPS, PathEnd<Path>... pathEnds)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
Node​(Agent owner, ShapeDrawMode drawMode, boolean isPublic, java.awt.Paint fillColor, PathEnd<Path>... pathEnds)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
Constructor Description

Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods 
void addConnection​(Path path, PathEndType type)  
java.lang.Class<? extends ExtAgentWithSpatialMetrics> getCompatibleAgentExtensionClass()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Path getConnection​(int index)
Returns connection of this node with another node by index.
int getConnectionsCount()
Amount of the node's connections to other nodes.
java.awt.Color getFillColor()
Returns the fill color of the shape, or null if shape has no fill color or has textured fill (in this case getFillTexture() should be used instead)
Texture getFillTexture()
Returns the fill texture of the shape, if the shape has fill texture
abstract java.awt.Color getLineColor()
Returns the line color of the markup element, or null if markup element has no line color or has textured line (in this case getLineTexture() should be used instead)
abstract Texture getLineTexture()
Returns the line texture of the markup element, if the markup element has line texture
com.anylogic.engine.markup.material_handling.INodeDescriptor<Agent> getMaterialLibraryDescriptor()  
double getMaxSpeed​(SpeedUnits units)
Returns max allowed speed in this node in specified speed units
int getNumberOfTransporters()
Returns the number of path-guided transporters inside node which is a part of a network.
double getTransferDistance​(Path path1, Path path2)  
Position getTransferPositionByPercent​(Path path1, Path path2, double percent, Position out)  
Agent getTransporter​(int index)
Returns the path-guided transporter with specified index inside the node which is a part of a network.
java.util.List<Agent> getTransporters()
Returns the list of path-guided transporters inside the node which is a part of a network.
abstract double getZ()
Returns the z coordinate of the node.
boolean isLimitSpeed()
Return true if speed is limited in this node, false otherwise
void setFillColor​(java.awt.Color fillColor)
Sets the fill color of the shape.
void setFillColor​(java.awt.Paint fillColor)
Sets the fill color (or Texture) of the shape.
void setLimitSpeed​(boolean limitSpeed)
Enables speed limit in this node if the argument is true, disables it if the argument is false The element should be uninitialized
abstract void setLineColor​(java.awt.Color lineColor)
Sets the line color of the markup element.
abstract void setLineColor​(java.awt.Paint lineColor)
Sets the line color (or Texture) of the markup element.
void setMaxSpeed​(double maxSpeed, SpeedUnits units)
Sets the maximum allowed speed in specified units
Modifier and Type Method Description

Methods inherited from class com.anylogic.engine.markup.NetworkMarkupElement

getDrawMode, getLevel, getNearestPoint, getNearestPoint, getNearestPoint, getNearestPoint, getNearestPoint, getNetwork, setLevel

Methods inherited from class com.anylogic.engine.markup.MarkupShape

contains, error, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isPublic, onClick, remove, setDrawMode, setOwner

Methods inherited from class com.anylogic.engine.markup.AbstractMarkup

discardOwner, executeUserAction, findSVGElement, getName, getSVGId, initializeInternal, isVisible, onAggregatorInitialized, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setVisible, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement

initializeInternal, onAggregatorVisibilityChanged, postInitialize

Methods inherited from interface com.anylogic.engine.markup.AnimationStaticLocationProvider

getPosition, getSpace

Methods inherited from interface com.anylogic.engine.markup.HasLevel

getLevel

Methods inherited from interface com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor

getMarkup, setMarkup

Methods inherited from interface com.anylogic.engine.markup.INetworkMarkupElement

contains, getNearestPoint, getNetwork, getSpace, randomPointInside, randomPointInside, randomPointInside, randomPointInside

Methods inherited from interface com.anylogic.engine.markup.INode

getName

Methods inherited from interface com.anylogic.engine.markup.LevelElement

setLevel

Constructor Detail

Node

public Node()

Node

public Node​(Agent owner)

Node

@SafeVarargs
@Deprecated
public Node​(Agent owner,
            ShapeDrawMode drawMode,
            boolean isPublic,
            java.awt.Paint fillColor,
            PathEnd<Path>... pathEnds)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
Parameters:
owner -
drawMode -
isPublic -
fillColor -
pathEnds -

Node

@SafeVarargs
@Deprecated
public Node​(Agent owner,
            ShapeDrawMode drawMode,
            boolean isPublic,
            java.awt.Paint fillColor,
            boolean limitSpeed,
            double maxSpeedInMPS,
            PathEnd<Path>... pathEnds)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
Parameters:
owner -
drawMode -
isPublic -
fillColor -
limitSpeed -
maxSpeedInMPS -
pathEnds -

Method Detail

getMaterialLibraryDescriptor

@AnyLogicInternalAPI
public com.anylogic.engine.markup.material_handling.INodeDescriptor<Agent> getMaterialLibraryDescriptor()

addConnection

public void addConnection​(Path path,
                          PathEndType type)
Specified by:
addConnection in interface INode<Node,​Path>

isLimitSpeed

public boolean isLimitSpeed()
Return true if speed is limited in this node, false otherwise

setLimitSpeed

public void setLimitSpeed​(boolean limitSpeed)
Enables speed limit in this node if the argument is true, disables it if the argument is false The element should be uninitialized
Parameters:
limitSpeed - argument flag

getMaxSpeed

public double getMaxSpeed​(SpeedUnits units)
Returns max allowed speed in this node in specified speed units
Parameters:
units - speed units
Returns:
max speed

setMaxSpeed

public void setMaxSpeed​(double maxSpeed,
                        SpeedUnits units)
Sets the maximum allowed speed in specified units
Parameters:
maxSpeed - new max speed
units - speed units

getZ

public abstract double getZ()
Returns the z coordinate of the node.
Returns:
the z coordinate of the node

getConnectionsCount

public final int getConnectionsCount()
Description copied from interface: INode
Amount of the node's connections to other nodes.
Specified by:
getConnectionsCount in interface INode<Node,​Path>
Returns:
number of connections

getConnection

public final Path getConnection​(int index)
Description copied from interface: INode
Returns connection of this node with another node by index.
Specified by:
getConnection in interface INode<Node,​Path>
Parameters:
index - the index of required connection in range (0, this.getConnectionsCount() - 1)
Returns:
instance of com.anylogic.engine.markup.IPath interface

getTransferDistance

@AnyLogicInternalAPI
public final double getTransferDistance​(Path path1,
                                        Path path2)
Specified by:
getTransferDistance in interface INode<Node,​Path>

setLineColor

public abstract void setLineColor​(java.awt.Color lineColor)
Sets the line color of the markup element.
Parameters:
lineColor - the new line color, null = do not draw the markup element line

setLineColor

public abstract void setLineColor​(java.awt.Paint lineColor)
Sets the line color (or Texture) of the markup element.
Specified by:
setLineColor in interface INode<Node,​Path>
Parameters:
lineColor - the new line color, null = do not draw the markup element line

getLineColor

public abstract java.awt.Color getLineColor()
Returns the line color of the markup element, or null if markup element has no line color or has textured line (in this case getLineTexture() should be used instead)
Specified by:
getLineColor in interface INode<Node,​Path>
Returns:
the line color of the markup element

getLineTexture

public abstract Texture getLineTexture()
Returns the line texture of the markup element, if the markup element has line texture
Specified by:
getLineTexture in interface INode<Node,​Path>
Returns:
the line texture of the markup element

setFillColor

public void setFillColor​(java.awt.Color fillColor)
Sets the fill color of the shape.
Parameters:
fillColor - the new fill color, null = do not fill the shape

setFillColor

public void setFillColor​(java.awt.Paint fillColor)
Sets the fill color (or Texture) of the shape.
Specified by:
setFillColor in interface INode<Node,​Path>
Parameters:
fillColor - the new fill color, null = do not fill the shape

getFillColor

public java.awt.Color getFillColor()
Returns the fill color of the shape, or null if shape has no fill color or has textured fill (in this case getFillTexture() should be used instead)
Specified by:
getFillColor in interface INode<Node,​Path>
Returns:
the fill color of the shape

getFillTexture

public Texture getFillTexture()
Returns the fill texture of the shape, if the shape has fill texture
Specified by:
getFillTexture in interface INode<Node,​Path>
Returns:
the fill texture of the shape

getTransferPositionByPercent

@AnyLogicInternalAPI
public Position getTransferPositionByPercent​(Path path1,
                                             Path path2,
                                             double percent,
                                             Position out)
Specified by:
getTransferPositionByPercent in interface INode<Node,​Path>

getCompatibleAgentExtensionClass

@AnyLogicInternalAPI
public final java.lang.Class<? extends ExtAgentWithSpatialMetrics> getCompatibleAgentExtensionClass()
Description copied from interface: INode
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Specified by:
getCompatibleAgentExtensionClass in interface INode<Node,​Path>

getTransporters

public java.util.List<Agent> getTransporters()
Returns the list of path-guided transporters inside the node which is a part of a network.
Specified by:
getTransporters in interface com.anylogic.engine.markup.material_handling.INodeDescriptor<Agent>
Returns:
list of path-guided transporters inside node.

getNumberOfTransporters

public int getNumberOfTransporters()
Returns the number of path-guided transporters inside node which is a part of a network.
Specified by:
getNumberOfTransporters in interface com.anylogic.engine.markup.material_handling.INodeDescriptor<Agent>
Returns:
number of path-guided transporters inside the node.

getTransporter

public Agent getTransporter​(int index)
Returns the path-guided transporter with specified index inside the node which is a part of a network.
Specified by:
getTransporter in interface com.anylogic.engine.markup.material_handling.INodeDescriptor<Agent>
Returns:
path-guided transporter with a specified index.
How can we improve this article?