Package org.opentcs.data.order
Klasse TransportOrder
- Alle implementierten Schnittstellen:
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:
-
Verschachtelte Klassen - Übersicht
Modifizierer und TypKlasseBeschreibungstatic enum
This enumeration defines the various states a transport order may be in. -
Feldübersicht
Modifizierer und TypFeldBeschreibungstatic final int
A value indicating that no route steps have been travelled for a drive order, yet. -
Konstruktorübersicht
KonstruktorBeschreibungTransportOrder
(String name, List<DriveOrder> driveOrders) Creates a new TransportOrder. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns a list of all drive orders, i.e. the past, current and future drive orders.Returns this transport order's creation time.Returns the current drive order, ornull
, if no drive order is currently being processed.int
Returns the index of the currently processed drive order.int
Returns the index of the last route step travelled for the currently processed drive order.Returns this transport order's deadline.Returns the set of transport orders this order depends on.Returns the point of time at which this transport order was finished.Returns a list of DriveOrders that still need to be processed.Returns a reference to the vehicle that is intended to process this transport order.Returns a list of DriveOrders that have been processed already.Returns an optional token for reserving peripheral devices while processing this transport order.Returns a reference to the vehicle currently processing this transport order.getState()
Returns this transport order's current state.getType()
Retruns this transport order's type.Returns the order sequence this order belongs to, ornull
, if it doesn't belong to any sequence.boolean
hasState
(TransportOrder.State otherState) Checks if this transport order's current state is equal to the given one.boolean
Checks if this order is dispensable.toString()
withCreationTime
(Instant creationTime) Creates a copy of this object, with the given creation time.withCurrentDriveOrderIndex
(int currentDriveOrderIndex) Creates a copy of this object, with the given drive order index.withCurrentDriveOrderState
(DriveOrder.State driveOrderState) Creates a copy of this object, with the given current drive order state.withCurrentRouteStepIndex
(int currentRouteStepIndex) Creates a copy of this object, with the given route step index.withDeadline
(Instant deadline) Creates a copy of this object, with the given deadline.withDependencies
(Set<TCSObjectReference<TransportOrder>> dependencies) Creates a copy of this object, with the given dependencies.withDispensable
(boolean dispensable) Creates a copy of this object, with the given dispensable flag.withDriveOrders
(List<DriveOrder> driveOrders) Creates a copy of this object, with the given drive orders.withFinishedTime
(Instant finishedTime) Creates a copy of this object, with the given finished time.withHistory
(ObjectHistory history) Creates a copy of this object, with the given history.Creates a copy of this object, with the given history entry integrated.withIntendedVehicle
(TCSObjectReference<Vehicle> intendedVehicle) Creates a copy of this object, with the given intended vehicle.withPeripheralReservationToken
(String peripheralReservationToken) Creates a copy of this object, with the given reservation token.withProcessingVehicle
(TCSObjectReference<Vehicle> processingVehicle) Creates a copy of this object, with the given processing vehicle.withProperties
(Map<String, String> properties) Creates a copy of this object, with the given properties.withProperty
(String key, String value) Creates a copy of this object, with the given property integrated.withState
(TransportOrder.State state) Creates a copy of this object, with the given state.Creates a copy of this obejct, with the given type.withWrappingSequence
(TCSObjectReference<OrderSequence> wrappingSequence) Creates a copy of this object, with the given wrapping sequence.Von Klasse geerbte Methoden org.opentcs.data.TCSObject
equals, getHistory, getName, getProperties, getProperty, getReference, hashCode, listWithoutNullValues, mapWithoutNullValues, propertiesWith, setWithoutNullValues
-
Felddetails
-
ROUTE_STEP_INDEX_DEFAULT
public static final int ROUTE_STEP_INDEX_DEFAULTA value indicating that no route steps have been travelled for a drive order, yet.- Siehe auch:
-
-
Konstruktordetails
-
TransportOrder
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
Beschreibung aus Klasse kopiert:TCSObject
Creates a copy of this object, with the given property integrated.- Angegeben von:
withProperty
in KlasseTCSObject<TransportOrder>
- Parameter:
key
- The key of the property to be changed.value
- The new value of the property, ornull
, if the property is to be removed.- Gibt zurück:
- A copy of this object, with the given property integrated.
-
withProperties
Beschreibung aus Klasse kopiert:TCSObject
Creates a copy of this object, with the given properties.- Angegeben von:
withProperties
in KlasseTCSObject<TransportOrder>
- Parameter:
properties
- The properties.- Gibt zurück:
- A copy of this object, with the given properties.
-
withHistoryEntry
Beschreibung aus Klasse kopiert:TCSObject
Creates a copy of this object, with the given history entry integrated.- Angegeben von:
withHistoryEntry
in KlasseTCSObject<TransportOrder>
- Parameter:
entry
- The history entry to be integrated.- Gibt zurück:
- A copy of this object, with the given history entry integrated.
-
withHistory
Beschreibung aus Klasse kopiert:TCSObject
Creates a copy of this object, with the given history.- Angegeben von:
withHistory
in KlasseTCSObject<TransportOrder>
- Parameter:
history
- The history.- Gibt zurück:
- A copy of this object, with the given history.
-
getType
Retruns this transport order's type.- Gibt zurück:
- This transport order's type.
-
withType
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
Returns this transport order's current state.- Gibt zurück:
- This transport order's current state.
-
hasState
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
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
Returns this transport order's creation time.- Gibt zurück:
- This transport order's creation time.
-
withCreationTime
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
Returns this transport order's deadline. If the value of transport order's deadline was not changed, the initial valueInstant.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
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
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
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
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
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
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
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
Returns a list of DriveOrders that have been processed already.- Gibt zurück:
- A list of DriveOrders that have been processed already.
-
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
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
Returns the current drive order, ornull
, 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
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
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
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
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
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
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
Returns the order sequence this order belongs to, ornull
, 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
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
- Setzt außer Kraft:
toString
in KlasseTCSObject<TransportOrder>
-