AnyLogic
Expand
Font size
  • java.lang.Object
    • com.anylogic.engine.markup.ShortestPathData<N,​P>
Type Parameters:
N - network node, an instance of INode
P - network path, an instance of IPath
All Implemented Interfaces:
IPathData, java.io.Serializable
Direct Known Subclasses:
ContinuousShortestPathData, GISShortestPathData

public abstract class ShortestPathData<N extends INode<N,​P>,​P extends IPath<N>>
extends java.lang.Object
implements IPathData
This class keeps data to move an agent through a network.
Author:
AnyLogic North America, LLC https://anylogic.com
See Also:
Serialized Form

Field Summary

Fields 
double distance  
SimpleDirection fromDirection
Tells, where to go from (fromPath, fromOffset)
N fromNode  
double fromOffset  
P fromPath  
double fromX  
double fromY  
double fromZ  
INetwork<N,​P> network  
Point source  
double sourceRotation  
double sourceSegmentDistance  
double sourceVerticalRotation  
Point target  
double targetRotation  
double targetSegmentDistance  
double targetVerticalRotation  
SimpleDirection toDirectionReverse
Tells from which side we come to (toPath, toOffset), in terms of target POV (the 'reverse' word stands for it)
P toHubIncomingPath  
N toNode  
double toOffset  
P toPath  
double toX  
double toY  
double toZ  
Modifier and Type Field Description

Constructor Summary

Constructors 
ShortestPathData()  
Constructor Description

Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods 
abstract Position getFromTargetPosition​(double offset, Position out)
Returns the Position object that corresponds to the point that lies at a certain distance from target point in the direction to the end point
INetwork<N,​P> getNetwork()
Returns the network for this path data
abstract Position getToSourcePosition​(double offset, Position out)
Returns the Position object that corresponds to the point that lies at a certain distance from start point in the direction to source point
boolean isPlainMovement()
Checks if this shortest path data corresponds to plain movement
void reset()  
abstract void resetFromTargetDirection()
Resets the direction from target to the stored toPoint
abstract void resetToSourceDirection()
Resets the direction from the stored fromPoint to the source
abstract void setFromTargetDirection​(Point toPoint)
Sets the direction and rotations from the target point to the specified argument point
abstract void setToSourceDirection​(Point fromPoint)
Sets the direction and rotations from the specified argument point to the source point
Modifier and Type Method Description

Methods inherited from class java.lang.Object

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

Field Detail

fromPath

public P extends IPath<N> fromPath

fromOffset

public double fromOffset

fromNode

public N extends INode<N,​P> fromNode

fromX

public double fromX

fromY

public double fromY

fromZ

public double fromZ

fromDirection

public SimpleDirection fromDirection
Tells, where to go from (fromPath, fromOffset)

toPath

public P extends IPath<N> toPath

toOffset

public double toOffset

toNode

public N extends INode<N,​P> toNode

toX

public double toX

toY

public double toY

toZ

public double toZ

toDirectionReverse

public SimpleDirection toDirectionReverse
Tells from which side we come to (toPath, toOffset), in terms of target POV (the 'reverse' word stands for it)

toHubIncomingPath

public P extends IPath<N> toHubIncomingPath

distance

public double distance

source

public Point source

sourceRotation

public double sourceRotation

sourceVerticalRotation

public double sourceVerticalRotation

sourceSegmentDistance

public double sourceSegmentDistance

target

public Point target

targetRotation

public double targetRotation

targetVerticalRotation

public double targetVerticalRotation

targetSegmentDistance

public double targetSegmentDistance

network

public INetwork<N extends INode<N,​P>,​P extends IPath<N>> network

Constructor Detail

ShortestPathData

public ShortestPathData()

Method Detail

reset

public void reset()

getNetwork

public INetwork<N,​P> getNetwork()
Returns the network for this path data
Returns:
the network for this path data

isPlainMovement

public boolean isPlainMovement()
Checks if this shortest path data corresponds to plain movement
Returns:
true if this data corresponds to plain movement, false otherwise

setFromTargetDirection

public abstract void setFromTargetDirection​(Point toPoint)
Sets the direction and rotations from the target point to the specified argument point
Parameters:
toPoint - point to set direction to

setToSourceDirection

public abstract void setToSourceDirection​(Point fromPoint)
Sets the direction and rotations from the specified argument point to the source point
Parameters:
fromPoint - point to set direction from

resetFromTargetDirection

public abstract void resetFromTargetDirection()
Resets the direction from target to the stored toPoint

resetToSourceDirection

public abstract void resetToSourceDirection()
Resets the direction from the stored fromPoint to the source

getToSourcePosition

public abstract Position getToSourcePosition​(double offset,
                                             Position out)
Returns the Position object that corresponds to the point that lies at a certain distance from start point in the direction to source point
Parameters:
offset - the distance
out - output object, may be null
Returns:
position at offset from start point towards source point

getFromTargetPosition

public abstract Position getFromTargetPosition​(double offset,
                                               Position out)
Returns the Position object that corresponds to the point that lies at a certain distance from target point in the direction to the end point
Parameters:
offset - the distance
out - output object, may be null
Returns:
position at offset from target point towards end point
How can we improve this article?