AnyLogic
Expand
Font size
Type Parameters:
N - network node, an instance of INode
P - network path, an instance of IPath
All Implemented Interfaces:
IPathData, Serializable
Direct Known Subclasses:
ContinuousShortestPathData, GISShortestPathData

public abstract class ShortestPathData<N extends INode<N,P>,P extends IPath<N>>
extends 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

Modifier and TypeFieldDescription
doubledistance 
SimpleDirectionfromDirection
Tells, where to go from (fromPath, fromOffset)
NfromNode 
doublefromOffset 
PfromPath 
doublefromX 
doublefromY 
doublefromZ 
INetwork<N,P>network 
Pointsource 
doublesourceRotation 
doublesourceSegmentDistance 
doublesourceVerticalRotation 
Pointtarget 
doubletargetRotation 
doubletargetSegmentDistance 
doubletargetVerticalRotation 
SimpleDirectiontoDirectionReverse
Tells from which side we come to (toPath, toOffset), in terms of target POV (the 'reverse' word stands for it)
PtoHubIncomingPath 
NtoNode 
doubletoOffset 
PtoPath 
doubletoX 
doubletoY 
doubletoZ 

Constructor Summary

ConstructorDescription
ShortestPathData() 

Method Summary

Modifier and TypeMethodDescription
abstract PositiongetFromTargetPosition(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 PositiongetToSourcePosition(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
booleanisPlainMovement()
Checks if this shortest path data corresponds to plain movement
voidreset() 
abstract voidresetFromTargetDirection()
Resets the direction from target to the stored toPoint
abstract voidresetToSourceDirection()
Resets the direction from the stored fromPoint to the source
abstract voidsetFromTargetDirection(Point toPoint)
Sets the direction and rotations from the target point to the specified argument point
abstract voidsetToSourceDirection(Point fromPoint)
Sets the direction and rotations from the specified argument point to the source point

Methods inherited from class java.lang.Object

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

Field Details

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 Details

ShortestPathData

public ShortestPathData()

Method Details

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