Class Path

java.lang.Object
All Implemented Interfaces:
java.io.Serializable

public class Path
extends TCSResource<Path>
implements java.io.Serializable
Describes a connection between two Points which a Vehicle may traverse.
See Also:
Serialized Form
  • Constructor Details

    • Path

      public Path​(java.lang.String name, TCSObjectReference<Point> sourcePoint, TCSObjectReference<Point> destinationPoint)
      Creates a new Path.
      Parameters:
      name - The new path's name.
      sourcePoint - A reference to this path's starting point.
      destinationPoint - A reference to this path's destination point.
  • Method Details

    • withProperty

      public Path withProperty​(java.lang.String key, java.lang.String value)
      Description copied from class: TCSObject
      Creates a copy of this object, with the given property integrated.
      Specified by:
      withProperty in class TCSObject<Path>
      Parameters:
      key - The key of the property to be changed.
      value - The new value of the property, or null, if the property is to be removed.
      Returns:
      A copy of this object, with the given property integrated.
    • withProperties

      public Path withProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
      Description copied from class: TCSObject
      Creates a copy of this object, with the given properties.
      Specified by:
      withProperties in class TCSObject<Path>
      Parameters:
      properties - The properties.
      Returns:
      A copy of this object, with the given properties.
    • withHistoryEntry

      public TCSObject<Path> withHistoryEntry​(ObjectHistory.Entry entry)
      Description copied from class: TCSObject
      Creates a copy of this object, with the given history entry integrated.
      Specified by:
      withHistoryEntry in class TCSObject<Path>
      Parameters:
      entry - The history entry to be integrated.
      Returns:
      A copy of this object, with the given history entry integrated.
    • withHistory

      public TCSObject<Path> withHistory​(ObjectHistory history)
      Description copied from class: TCSObject
      Creates a copy of this object, with the given history.
      Specified by:
      withHistory in class TCSObject<Path>
      Parameters:
      history - The history.
      Returns:
      A copy of this object, with the given history.
    • getLength

      public long getLength()
      Return the length of this path (in mm).
      Returns:
      The length of this path (in mm).
    • withLength

      public Path withLength​(long length)
      Creates a copy of this object, with the given length.
      Parameters:
      length - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getSourcePoint

      public TCSObjectReference<Point> getSourcePoint()
      Returns a reference to the point which this path originates in.
      Returns:
      A reference to the point which this path originates in.
    • getDestinationPoint

      public TCSObjectReference<Point> getDestinationPoint()
      Returns a reference to the point which this path ends in.
      Returns:
      A reference to the point which this path ends in.
    • getMaxVelocity

      public int getMaxVelocity()
      Return the maximum allowed forward velocity (in mm/s) for this path.
      Returns:
      The maximum allowed forward velocity (in mm/s). A value of 0 means forward movement is not allowed on this path.
    • withMaxVelocity

      public Path withMaxVelocity​(int maxVelocity)
      Creates a copy of this object, with the given maximum velocity.
      Parameters:
      maxVelocity - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getMaxReverseVelocity

      public int getMaxReverseVelocity()
      Return the maximum allowed reverse velocity (in mm/s) for this path.
      Returns:
      The maximum allowed reverse velocity (in mm/s). A value of 0 means reverse movement is not allowed on this path.
    • withMaxReverseVelocity

      public Path withMaxReverseVelocity​(int maxReverseVelocity)
      Creates a copy of this object, with the given maximum reverse velocity.
      Parameters:
      maxReverseVelocity - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getPeripheralOperations

      public java.util.List<PeripheralOperation> getPeripheralOperations()
      Returns the peripheral operations to be performed when a vehicle travels along this path.
      Returns:
      The peripheral operations to be performed when a vehicle travels along this path.
    • withPeripheralOperations

      public Path withPeripheralOperations​(@Nonnull java.util.List<PeripheralOperation> peripheralOperations)
      Creates a copy of this object, with the given peripheral operations.
      Parameters:
      peripheralOperations - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • isLocked

      public boolean isLocked()
      Return the lock status of this path (i.e. whether this path my be used by vehicles or not).
      Returns:
      true if this path is currently locked (i.e. it may not be used by vehicles), else false.
    • withLocked

      public Path withLocked​(boolean locked)
      Creates a copy of this object, with the given locked flag.
      Parameters:
      locked - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getVehicleEnvelopes

      public java.util.Map<java.lang.String,​Envelope> getVehicleEnvelopes()
      Returns a map of envelope keys to envelopes that vehicles traversing this path may occupy.
      Returns:
      A map of envelope keys to envelopes that vehicles traversing this path may occupy.
    • withVehicleEnvelopes

      public Path withVehicleEnvelopes​(java.util.Map<java.lang.String,​Envelope> vehicleEnvelopes)
      Creates a copy of this object, with the given vehicle envelopes.
      Parameters:
      vehicleEnvelopes - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getLayout

      public Path.Layout getLayout()
      Returns the information regarding the grahical representation of this path.
      Returns:
      The information regarding the grahical representation of this path.
    • withLayout

      public Path withLayout​(Path.Layout layout)
      Creates a copy of this object, with the given layout.
      Parameters:
      layout - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • isNavigableForward

      public boolean isNavigableForward()
      Checks whether this path is navigable in forward direction.
      Returns:
      true if, and only if, this path is not locked and its maximum forward velocity is not zero.
    • isNavigableReverse

      public boolean isNavigableReverse()
      Checks whether this path is navigable in backward/reverse direction.
      Returns:
      true if, and only if, this path is not locked and its maximum reverse velocity is not zero.
    • isNavigableTo

      public boolean isNavigableTo​(TCSObjectReference<Point> navPoint) throws java.lang.IllegalArgumentException
      Checks whether this path is navigable towards the given point.
      Parameters:
      navPoint - The point.
      Returns:
      If navPoint is this path's destination point, returns isNavigableForward(); if navPoint is this path's source point, returns isNavigableReverse().
      Throws:
      java.lang.IllegalArgumentException - If the given point is neither the source point nor the destination point of this path.