Klasse Vehicle

java.lang.Object
org.opentcs.data.TCSObject<Vehicle>
org.opentcs.data.model.Vehicle
Alle implementierten Schnittstellen:
Serializable

public class Vehicle extends TCSObject<Vehicle> implements Serializable
Describes a vehicle's current state.
Siehe auch:
  • Felddetails

    • PREFERRED_ADAPTER

      public static final String PREFERRED_ADAPTER
      The key for a property to store the class name of the preferred communication adapter (factory) for this vehicle.
      Siehe auch:
  • Konstruktordetails

    • Vehicle

      public Vehicle(String name)
      Creates a new vehicle.
      Parameter:
      name - The new vehicle's name.
  • Methodendetails

    • withProperty

      public Vehicle withProperty(String key, String value)
      Beschreibung aus Klasse kopiert: TCSObject
      Creates a copy of this object, with the given property integrated.
      Angegeben von:
      withProperty in Klasse TCSObject<Vehicle>
      Parameter:
      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.
      Gibt zurück:
      A copy of this object, with the given property integrated.
    • withProperties

      public Vehicle withProperties(Map<String,String> properties)
      Beschreibung aus Klasse kopiert: TCSObject
      Creates a copy of this object, with the given properties.
      Angegeben von:
      withProperties in Klasse TCSObject<Vehicle>
      Parameter:
      properties - The properties.
      Gibt zurück:
      A copy of this object, with the given properties.
    • withHistoryEntry

      public TCSObject<Vehicle> withHistoryEntry(ObjectHistory.Entry entry)
      Beschreibung aus Klasse kopiert: TCSObject
      Creates a copy of this object, with the given history entry integrated.
      Angegeben von:
      withHistoryEntry in Klasse TCSObject<Vehicle>
      Parameter:
      entry - The history entry to be integrated.
      Gibt zurück:
      A copy of this object, with the given history entry integrated.
    • withHistory

      public TCSObject<Vehicle> withHistory(ObjectHistory history)
      Beschreibung aus Klasse kopiert: TCSObject
      Creates a copy of this object, with the given history.
      Angegeben von:
      withHistory in Klasse TCSObject<Vehicle>
      Parameter:
      history - The history.
      Gibt zurück:
      A copy of this object, with the given history.
    • getEnergyLevel

      public int getEnergyLevel()
      Returns this vehicle's remaining energy (in percent of the maximum).
      Gibt zurück:
      This vehicle's remaining energy.
    • withEnergyLevel

      public Vehicle withEnergyLevel(int energyLevel)
      Creates a copy of this object, with the given energy level.
      Parameter:
      energyLevel - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • isEnergyLevelCritical

      public boolean isEnergyLevelCritical()
      Checks whether the vehicle's energy level is critical.
      Gibt zurück:
      true if, and only if, the vehicle's energy level is critical.
    • isEnergyLevelDegraded

      public boolean isEnergyLevelDegraded()
      Checks whether the vehicle's energy level is degraded (not good any more).
      Gibt zurück:
      true if, and only if, the vehicle's energy level is degraded.
    • isEnergyLevelGood

      public boolean isEnergyLevelGood()
      Checks whether the vehicle's energy level is good.
      Gibt zurück:
      true if, and only if, the vehicle's energy level is good.
    • isEnergyLevelFullyRecharged

      public boolean isEnergyLevelFullyRecharged()
      Checks whether the vehicle's energy level is fully recharged.
      Gibt zurück:
      true if, and only if, the vehicle's energy level is fully recharged.
    • isEnergyLevelSufficientlyRecharged

      public boolean isEnergyLevelSufficientlyRecharged()
      Checks whether the vehicle's energy level is sufficiently recharged.
      Gibt zurück:
      true if, and only if, the vehicle's energy level is sufficiently recharged.
    • getEnergyLevelCritical

      @Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public int getEnergyLevelCritical()
      Veraltet.
      Returns this vehicle's critical energy level (in percent of the maximum). The critical energy level is the one at/below which the vehicle should be recharged.
      Gibt zurück:
      This vehicle's critical energy level.
    • withEnergyLevelCritical

      @Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public Vehicle withEnergyLevelCritical(int energyLevelCritical)
      Creates a copy of this object, with the given critical energy level.
      Parameter:
      energyLevelCritical - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getEnergyLevelGood

      @Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public int getEnergyLevelGood()
      Veraltet.
      Returns this vehicle's good energy level (in percent of the maximum). The good energy level is the one at/above which the vehicle can be dispatched again when charging.
      Gibt zurück:
      This vehicle's good energy level.
    • withEnergyLevelGood

      @Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public Vehicle withEnergyLevelGood(int energyLevelGood)
      Creates a copy of this object, with the given good energy level.
      Parameter:
      energyLevelGood - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getEnergyLevelFullyRecharged

      @Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public int getEnergyLevelFullyRecharged()
      Veraltet.
      Returns this vehicle's energy level for being fully recharged (in percent of the maximum).
      Gibt zurück:
      This vehicle's fully recharged threshold.
    • withEnergyLevelFullyRecharged

      @Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public Vehicle withEnergyLevelFullyRecharged(int energyLevelFullyRecharged)
      Creates a copy of this object, with the given fully recharged energy level.
      Parameter:
      energyLevelFullyRecharged - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getEnergyLevelSufficientlyRecharged

      @Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public int getEnergyLevelSufficientlyRecharged()
      Veraltet.
      Returns this vehicle's energy level for being sufficiently recharged (in percent of the maximum).
      Gibt zurück:
      This vehicle's sufficiently recharged energy level.
    • withEnergyLevelSufficientlyRecharged

      @Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public Vehicle withEnergyLevelSufficientlyRecharged(int energyLevelSufficientlyRecharged)
      Creates a copy of this object, with the given sufficiently recharged energy level.
      Parameter:
      energyLevelSufficientlyRecharged - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getEnergyLevelThresholdSet

      public Vehicle.EnergyLevelThresholdSet getEnergyLevelThresholdSet()
      Returns this vehicle's energy level threshold set.
      Gibt zurück:
      This vehicle's energy level threshold set.
    • withEnergyLevelThresholdSet

      public Vehicle withEnergyLevelThresholdSet(Vehicle.EnergyLevelThresholdSet energyLevelThresholdSet)
      Creates a copy of this object, with the given EnergyLevelThresholdSet.
      Parameter:
      energyLevelThresholdSet - The new EnergyLevelThresholdSet.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getRechargeOperation

      public String getRechargeOperation()
      Returns the operation that the vehicle's current communication adapter accepts as a command to recharge the vehicle.
      Gibt zurück:
      The operation that the vehicle's current communication adapter accepts as a command to recharge the vehicle.
    • withRechargeOperation

      public Vehicle withRechargeOperation(String rechargeOperation)
      Creates a copy of this object, with the given recharge operation.
      Parameter:
      rechargeOperation - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getLoadHandlingDevices

      public List<LoadHandlingDevice> getLoadHandlingDevices()
      Returns the current (state of the) load handling devices of this vehicle.
      Gibt zurück:
      The current (state of the) load handling devices of this vehicle.
    • withLoadHandlingDevices

      public Vehicle withLoadHandlingDevices(List<LoadHandlingDevice> loadHandlingDevices)
      Creates a copy of this object, with the given load handling devices.
      Parameter:
      loadHandlingDevices - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getMaxVelocity

      public int getMaxVelocity()
      Returns this vehicle's maximum velocity (in mm/s).
      Gibt zurück:
      This vehicle's maximum velocity (in mm/s).
    • withMaxVelocity

      public Vehicle withMaxVelocity(int maxVelocity)
      Creates a copy of this object, with the given maximum velocity.
      Parameter:
      maxVelocity - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getMaxReverseVelocity

      public int getMaxReverseVelocity()
      Returns this vehicle's maximum reverse velocity (in mm/s).
      Gibt zurück:
      This vehicle's maximum reverse velocity (in mm/s).
    • withMaxReverseVelocity

      public Vehicle withMaxReverseVelocity(int maxReverseVelocity)
      Creates a copy of this object, with the given maximum reverse velocity.
      Parameter:
      maxReverseVelocity - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getState

      public Vehicle.State getState()
      Returns this vehicle's current state.
      Gibt zurück:
      This vehicle's current state.
    • hasState

      public boolean hasState(Vehicle.State otherState)
      Checks if this vehicle's current state is equal to the given one.
      Parameter:
      otherState - The state to compare to this vehicle's one.
      Gibt zurück:
      true if, and only if, the given state is equal to this vehicle's one.
    • withState

      public Vehicle withState(Vehicle.State state)
      Creates a copy of this object, with the given state.
      Parameter:
      state - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getProcState

      public Vehicle.ProcState getProcState()
      Returns this vehicle's current processing state.
      Gibt zurück:
      This vehicle's current processing state.
    • getIntegrationLevel

      public Vehicle.IntegrationLevel getIntegrationLevel()
      Returns this vehicle's integration level.
      Gibt zurück:
      This vehicle's integration level.
    • withIntegrationLevel

      public Vehicle withIntegrationLevel(Vehicle.IntegrationLevel integrationLevel)
      Creates a copy of this object, with the given integration level.
      Parameter:
      integrationLevel - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • isPaused

      public boolean isPaused()
      Indicates whether this vehicle is paused.
      Gibt zurück:
      Whether this vehicle is paused.
    • withPaused

      public Vehicle withPaused(boolean paused)
      Creates a copy of this object, with the given paused state.
      Parameter:
      paused - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • hasProcState

      public boolean hasProcState(Vehicle.ProcState otherState)
      Checks if this vehicle's current processing state is equal to the given one.
      Parameter:
      otherState - The state to compare to this vehicle's one.
      Gibt zurück:
      true if, and only if, the given state is equal to this vehicle's one.
    • withProcState

      public Vehicle withProcState(Vehicle.ProcState procState)
      Creates a copy of this object, with the given processing state.
      Parameter:
      procState - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getBoundingBox

      public BoundingBox getBoundingBox()
      Returns the vehicle's current bounding box (in mm).

      The bounding box is oriented so that its longitudinal axis runs parallel to the longitudinal axis of the vehicle. For the reference point offset, positive x values indicate an offset in the forward direction of the vehicle, positive y values an offset towards the left-hand side.

      Gibt zurück:
      The vehicle's current bounding box (in mm).
    • withBoundingBox

      public Vehicle withBoundingBox(BoundingBox boundingBox)
      Creates a copy of this object, with the given bounding box (in mm).

      The bounding box is oriented so that its longitudinal axis runs parallel to the longitudinal axis of the vehicle. For the reference point offset, positive x values indicate an offset in the forward direction of the vehicle, positive y values an offset towards the left-hand side.

      Parameter:
      boundingBox - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getLength

      @Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public int getLength()
      Veraltet.
      Use getBoundingBox() instead.
      Returns this vehicle's current length.
      Gibt zurück:
      this vehicle's current length.
    • withLength

      @Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public Vehicle withLength(int length)
      Veraltet.
      Creates a copy of this object, with the given length.
      Parameter:
      length - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getTransportOrder

      public TCSObjectReference<TransportOrder> getTransportOrder()
      Returns a reference to the transport order this vehicle is currently processing.
      Gibt zurück:
      A reference to the transport order this vehicle is currently processing, or null, if it is not processing any transport order at the moment.
    • withTransportOrder

      public Vehicle withTransportOrder(TCSObjectReference<TransportOrder> transportOrder)
      Creates a copy of this object, with the given transport order.
      Parameter:
      transportOrder - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getOrderSequence

      public TCSObjectReference<OrderSequence> getOrderSequence()
      Returns a reference to the order sequence this vehicle is currently processing.
      Gibt zurück:
      A reference to the order sequence this vehicle is currently processing, or null, if it is not processing any order sequence at the moment.
    • withOrderSequence

      public Vehicle withOrderSequence(TCSObjectReference<OrderSequence> orderSequence)
      Creates a copy of this object, with the given order sequence.
      Parameter:
      orderSequence - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getAllowedOrderTypes

      public Set<String> getAllowedOrderTypes()
      Returns the set of order types this vehicle is allowed to process.
      Gibt zurück:
      The set of order types this vehicle is allowed to process.
    • withAllowedOrderTypes

      public Vehicle withAllowedOrderTypes(Set<String> allowedOrderTypes)
      Creates a copy of this object, with the given set of allowed order types.
      Parameter:
      allowedOrderTypes - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getClaimedResources

      public List<Set<TCSResourceReference<?>>> getClaimedResources()
      Returns the resources this vehicle has claimed for future allocation.
      Gibt zurück:
      The resources this vehicle has claimed for future allocation.
    • withClaimedResources

      public Vehicle withClaimedResources(List<Set<TCSResourceReference<?>>> claimedResources)
      Creates a copy of this object, with the given claimed resources.
      Parameter:
      claimedResources - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getAllocatedResources

      public List<Set<TCSResourceReference<?>>> getAllocatedResources()
      Returns the resources this vehicle has allocated.
      Gibt zurück:
      The resources this vehicle has allocated.
    • withAllocatedResources

      public Vehicle withAllocatedResources(List<Set<TCSResourceReference<?>>> allocatedResources)
      Creates a copy of this object, with the given allocated resources.
      Parameter:
      allocatedResources - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getCurrentPosition

      public TCSObjectReference<Point> getCurrentPosition()
      Returns a reference to the point this vehicle currently occupies.
      Gibt zurück:
      A reference to the point this vehicle currently occupies, or null, if this vehicle's position is unknown or the vehicle is currently not in the system.
    • withCurrentPosition

      public Vehicle withCurrentPosition(TCSObjectReference<Point> currentPosition)
      Creates a copy of this object, with the given current position.
      Parameter:
      currentPosition - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getNextPosition

      public TCSObjectReference<Point> getNextPosition()
      Returns a reference to the point this vehicle is expected to be seen at next.
      Gibt zurück:
      A reference to the point this vehicle is expected to be seen at next, or null, if this vehicle's next position is unknown.
    • withNextPosition

      public Vehicle withNextPosition(TCSObjectReference<Point> nextPosition)
      Creates a copy of this object, with the given next position.
      Parameter:
      nextPosition - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getPrecisePosition

      @Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public Triple getPrecisePosition()
      Veraltet.
      Use getPose() instead.
      Returns the vehicle's position in world coordinates [mm], independent from logical positions/point names. May be null if the vehicle hasn't provided a precise position.
      Gibt zurück:
      The vehicle's precise position in mm.
    • withPrecisePosition

      @Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public Vehicle withPrecisePosition(Triple precisePosition)
      Veraltet.
      Use withPose(Pose) instead.
      Creates a copy of this object, with the given precise position.
      Parameter:
      precisePosition - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getOrientationAngle

      @Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public double getOrientationAngle()
      Veraltet.
      Use getPose() instead.
      Returns the vehicle's current orientation angle (-360..360). May be Double.NaN if the vehicle hasn't provided an orientation angle.
      Gibt zurück:
      The vehicle's current orientation angle.
    • withOrientationAngle

      @Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public Vehicle withOrientationAngle(double orientationAngle)
      Veraltet.
      Use withPose(Pose) instead.
      Creates a copy of this object, with the given orientation angle.
      Parameter:
      orientationAngle - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getPose

      @Nonnull public Pose getPose()
      Returns the vehicle's pose containing the precise position and orientation angle.
      Gibt zurück:
      The vehicle's pose.
    • withPose

      public Vehicle withPose(@Nonnull Pose pose)
      Creates a copy of this object, with the given pose.
      Parameter:
      pose - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getEnvelopeKey

      @ScheduledApiChange(when="7.0", details="Envelope key will become non-null.") @Nullable public String getEnvelopeKey()
      Returns the key for selecting the envelope to be used for resources the vehicle occupies.
      Gibt zurück:
      The key for selecting the envelope to be used for resources the vehicle occupies.
    • withEnvelopeKey

      @ScheduledApiChange(when="7.0", details="Envelope key will become non-null.") public Vehicle withEnvelopeKey(@Nullable String envelopeKey)
      Creates a copy of this object, with the given envelope key.
      Parameter:
      envelopeKey - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getLayout

      public Vehicle.Layout getLayout()
      Returns the information regarding the graphical representation of this vehicle.
      Gibt zurück:
      The information regarding the graphical representation of this vehicle.
    • withLayout

      public Vehicle withLayout(Vehicle.Layout layout)
      Creates a copy of this object, with the given layout.
      Parameter:
      layout - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • isProcessingOrder

      public boolean isProcessingOrder()
      Checks if this vehicle is currently processing any transport order.
      Gibt zurück:
      true if, and only if, this vehicle is currently processing a transport order.
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse TCSObject<Vehicle>