Klasse TransportOrder

java.lang.Object
org.opentcs.data.TCSObject<TransportOrder>
org.opentcs.data.order.TransportOrder
Alle implementierten Schnittstellen:
Serializable

public class TransportOrder extends TCSObject<TransportOrder> implements Serializable
Represents a sequence of movements and operations that are to be executed by a Vehicle.

A TransportOrder basically encapsulates a list of DriveOrder instances.

Transport orders may depend on other transport orders in the systems, which means they may not be processed before the orders they depend on have been processed.

Siehe auch:
  • Felddetails

    • ROUTE_STEP_INDEX_DEFAULT

      public static final int ROUTE_STEP_INDEX_DEFAULT
      A value indicating that no route steps have been travelled for a drive order, yet.
      Siehe auch:
  • Konstruktordetails

    • TransportOrder

      public TransportOrder(String name, List<DriveOrder> driveOrders)
      Creates a new TransportOrder.
      Parameter:
      name - This transport order's name.
      driveOrders - A list of drive orders to be processed when processing this transport order.
  • Methodendetails

    • withProperty

      public TransportOrder 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<TransportOrder>
      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 TransportOrder 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<TransportOrder>
      Parameter:
      properties - The properties.
      Gibt zurück:
      A copy of this object, with the given properties.
    • withHistoryEntry

      public TransportOrder 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<TransportOrder>
      Parameter:
      entry - The history entry to be integrated.
      Gibt zurück:
      A copy of this object, with the given history entry integrated.
    • withHistory

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

      public String getType()
      Retruns this transport order's type.
      Gibt zurück:
      This transport order's type.
    • withType

      public TransportOrder withType(String type)
      Creates a copy of this obejct, with the given type.
      Parameter:
      type - The tpye to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getState

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

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

      public TransportOrder withState(@Nonnull TransportOrder.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.
    • getCreationTime

      public Instant getCreationTime()
      Returns this transport order's creation time.
      Gibt zurück:
      This transport order's creation time.
    • withCreationTime

      public TransportOrder withCreationTime(Instant creationTime)
      Creates a copy of this object, with the given creation time.
      Parameter:
      creationTime - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getDeadline

      public Instant getDeadline()
      Returns this transport order's deadline. If the value of transport order's deadline was not changed, the initial value Instant.MAX is returned.
      Gibt zurück:
      This transport order's deadline or the initial deadline value.Instant.MAX, if the deadline was not changed.
    • withDeadline

      public TransportOrder withDeadline(Instant deadline)
      Creates a copy of this object, with the given deadline.
      Parameter:
      deadline - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getFinishedTime

      public Instant getFinishedTime()
      Returns the point of time at which this transport order was finished. If the transport order has not been finished, yet, Instant.MAX is returned.
      Gibt zurück:
      The point of time at which this transport order was finished, or Instant.MAX, if the transport order has not been finished, yet.
    • withFinishedTime

      public TransportOrder withFinishedTime(Instant finishedTime)
      Creates a copy of this object, with the given finished time.
      Parameter:
      finishedTime - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getIntendedVehicle

      @Nullable public TCSObjectReference<Vehicle> getIntendedVehicle()
      Returns a reference to the vehicle that is intended to process this transport order.
      Gibt zurück:
      A reference to the vehicle that is intended to process this transport order. If this order is free to be processed by any vehicle, null is returned.
    • withIntendedVehicle

      public TransportOrder withIntendedVehicle(@Nullable TCSObjectReference<Vehicle> intendedVehicle)
      Creates a copy of this object, with the given intended vehicle.
      Parameter:
      intendedVehicle - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getProcessingVehicle

      @Nullable public TCSObjectReference<Vehicle> getProcessingVehicle()
      Returns a reference to the vehicle currently processing this transport order.
      Gibt zurück:
      A reference to the vehicle currently processing this transport order. If this transport order is not currently being processed, null is returned.
    • withProcessingVehicle

      public TransportOrder withProcessingVehicle(@Nullable TCSObjectReference<Vehicle> processingVehicle)
      Creates a copy of this object, with the given processing vehicle.
      Parameter:
      processingVehicle - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getDependencies

      public Set<TCSObjectReference<TransportOrder>> getDependencies()
      Returns the set of transport orders this order depends on.
      Gibt zurück:
      The set of transport orders this order depends on.
    • withDependencies

      public TransportOrder withDependencies(@Nonnull Set<TCSObjectReference<TransportOrder>> dependencies)
      Creates a copy of this object, with the given dependencies.
      Parameter:
      dependencies - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getPastDriveOrders

      @Nonnull public List<DriveOrder> getPastDriveOrders()
      Returns a list of DriveOrders that have been processed already.
      Gibt zurück:
      A list of DriveOrders that have been processed already.
    • getFutureDriveOrders

      @Nonnull public List<DriveOrder> getFutureDriveOrders()
      Returns a list of DriveOrders that still need to be processed.
      Gibt zurück:
      A list of DriveOrders that still need to be processed.
    • withDriveOrders

      public TransportOrder withDriveOrders(@Nonnull List<DriveOrder> driveOrders)
      Creates a copy of this object, with the given drive orders.
      Parameter:
      driveOrders - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getCurrentDriveOrder

      @Nullable public DriveOrder getCurrentDriveOrder()
      Returns the current drive order, or null, if no drive order is currently being processed.
      Gibt zurück:
      the current drive order, or null, if no drive order is currently being processed.
    • getAllDriveOrders

      @Nonnull public List<DriveOrder> getAllDriveOrders()
      Returns a list of all drive orders, i.e. the past, current and future drive orders.
      Gibt zurück:
      A list of all drive orders, i.e. the past, current and future drive orders. If no drive orders exist, the returned list is empty.
    • getPeripheralReservationToken

      @Nullable public String getPeripheralReservationToken()
      Returns an optional token for reserving peripheral devices while processing this transport order.
      Gibt zurück:
      An optional token for reserving peripheral devices while processing this transport order.
    • withPeripheralReservationToken

      public TransportOrder withPeripheralReservationToken(@Nullable String peripheralReservationToken)
      Creates a copy of this object, with the given reservation token.
      Parameter:
      peripheralReservationToken - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getCurrentDriveOrderIndex

      public int getCurrentDriveOrderIndex()
      Returns the index of the currently processed drive order.
      Gibt zurück:
      The index of the currently processed drive order.
    • withCurrentDriveOrderIndex

      public TransportOrder withCurrentDriveOrderIndex(int currentDriveOrderIndex)
      Creates a copy of this object, with the given drive order index.
      Parameter:
      currentDriveOrderIndex - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getCurrentRouteStepIndex

      public int getCurrentRouteStepIndex()
      Returns the index of the last route step travelled for the currently processed drive order.
      Gibt zurück:
      The index of the last route step travelled for the currently processed drive order.
    • withCurrentRouteStepIndex

      public TransportOrder withCurrentRouteStepIndex(int currentRouteStepIndex)
      Creates a copy of this object, with the given route step index.
      Parameter:
      currentRouteStepIndex - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • withCurrentDriveOrderState

      public TransportOrder withCurrentDriveOrderState(@Nonnull DriveOrder.State driveOrderState)
      Creates a copy of this object, with the given current drive order state.
      Parameter:
      driveOrderState - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getWrappingSequence

      @Nullable public TCSObjectReference<OrderSequence> getWrappingSequence()
      Returns the order sequence this order belongs to, or null, if it doesn't belong to any sequence.
      Gibt zurück:
      The order sequence this order belongs to, or null, if it doesn't belong to any sequence.
    • withWrappingSequence

      public TransportOrder withWrappingSequence(@Nullable TCSObjectReference<OrderSequence> wrappingSequence)
      Creates a copy of this object, with the given wrapping sequence.
      Parameter:
      wrappingSequence - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • isDispensable

      public boolean isDispensable()
      Checks if this order is dispensable.
      Gibt zurück:
      true if, and only if, this order is dispensable.
    • withDispensable

      public TransportOrder withDispensable(boolean dispensable)
      Creates a copy of this object, with the given dispensable flag.
      Parameter:
      dispensable - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • toString

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