Package org.opentcs.data.order
Klasse OrderSequence
- Alle implementierten Schnittstellen:
Serializable
Describes a process spanning multiple
TransportOrder
s which are to be executed
subsequently by the same Vehicle
.
The most important rules for order sequence processing are:
- Only transport orders that have not yet been activated may be added to an order sequence. Allowing them to be added at a later point of time would imply that, due to concurrency in the kernel, a transport order might happen to be dispatched at the same time or shortly after it is added to a sequence, regardless of if its predecessors in the sequence have already been finished or not.
- The intendedVehicle of a transport order being added to an order sequence must be
the same as that of the sequence itself.
If it is
null
in the sequence, a vehicle that will process all orders in the sequence will be chosen automatically once the first order in the sequence is dispatched. - If an order sequence is marked as complete and all transport orders belonging to it
have arrived in state
FINISHED
orFAILED
, it will be marked as finished implicitly. - If a transport order belonging to an order sequence fails and the sequence's failureFatal flag is set, all subsequent orders in the sequence will automatically be considered (and marked as) failed, too, and the order sequence will implicitly be marked as complete (and finished).
- Siehe auch:
-
Feldübersicht
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungint
Returns the index of the order that was last finished in the sequence, or -1, if none was finished, yet.Returns a reference to the vehicle that is intended to process this order sequence.Returns the next order in the sequence that hasn't been finished, yet.Returns the list of orders making up this sequence.Returns a reference to the vehicle currently processing this sequence.getType()
Returns this order sequence's type.boolean
Indicates whether this order sequence is complete and will not be extended by more orders.boolean
Indicates whether the failure of a single order in this sequence implies that all subsequent orders in this sequence are to be considered failed, too.boolean
Indicates whether this order sequence has been processed completely.withComplete
(boolean complete) Creates a copy of this object, with the given complete flag.withFailureFatal
(boolean failureFatal) Creates a copy of this object, with the given failure-fatal flag.withFinished
(boolean finished) Creates a copy of this object, with the given finished flag.withFinishedIndex
(int finishedIndex) Creates a copy of this object, with the given finished index.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.Creates a copy of this object, with the given order.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.Creates a copy of this object, with the given type.Von Klasse geerbte Methoden org.opentcs.data.TCSObject
equals, getHistory, getName, getProperties, getProperty, getReference, hashCode, listWithoutNullValues, mapWithoutNullValues, propertiesWith, setWithoutNullValues, toString
-
Konstruktordetails
-
OrderSequence
Creates a new OrderSequence.- Parameter:
name
- This sequence's name.
-
-
Methodendetails
-
withProperty
Beschreibung aus Klasse kopiert:TCSObject
Creates a copy of this object, with the given property integrated.- Angegeben von:
withProperty
in KlasseTCSObject<OrderSequence>
- 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<OrderSequence>
- 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<OrderSequence>
- 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<OrderSequence>
- Parameter:
history
- The history.- Gibt zurück:
- A copy of this object, with the given history.
-
getType
Returns this order sequence's type.- Gibt zurück:
- This order sequence's type.
-
withType
Creates a copy of this object, with the given type.- Parameter:
type
- The type to be set in the copy.- Gibt zurück:
- A copy of this object, differing in the given value.
-
getOrders
Returns the list of orders making up this sequence.- Gibt zurück:
- The list of orders making up this sequence.
-
withOrder
Creates a copy of this object, with the given order.- Parameter:
order
- The value to be set in the copy.- Gibt zurück:
- A copy of this object, differing in the given value.
-
getNextUnfinishedOrder
Returns the next order in the sequence that hasn't been finished, yet.- Gibt zurück:
null
if this sequence has been finished already or currently doesn't have any unfinished orders, else the order after the one that was last finished.
-
getFinishedIndex
public int getFinishedIndex()Returns the index of the order that was last finished in the sequence, or -1, if none was finished, yet.- Gibt zurück:
- the index of the order that was last finished in the sequence.
-
withFinishedIndex
Creates a copy of this object, with the given finished index.- Parameter:
finishedIndex
- The value to be set in the copy.- Gibt zurück:
- A copy of this object, differing in the given value.
-
isComplete
public boolean isComplete()Indicates whether this order sequence is complete and will not be extended by more orders.- Gibt zurück:
true
if, and only if, this order sequence is complete and will not be extended by more orders.
-
withComplete
Creates a copy of this object, with the given complete flag.- Parameter:
complete
- The value to be set in the copy.- Gibt zurück:
- A copy of this object, differing in the given value.
-
isFinished
public boolean isFinished()Indicates whether this order sequence has been processed completely. (Note that processed completely does not necessarily mean finished successfully; it is possible that one or more transport orders belonging to this sequence have failed.)- Gibt zurück:
true
if, and only if, this order sequence has been processed completely.
-
withFinished
Creates a copy of this object, with the given finished flag.- Parameter:
finished
- The value to be set in the copy.- Gibt zurück:
- A copy of this object, differing in the given value.
-
isFailureFatal
public boolean isFailureFatal()Indicates whether the failure of a single order in this sequence implies that all subsequent orders in this sequence are to be considered failed, too.- Gibt zurück:
true
if, and only if, the failure of an order in this sequence implies the failure of all subsequent orders.
-
withFailureFatal
Creates a copy of this object, with the given failure-fatal flag.- Parameter:
failureFatal
- 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 order sequence.- Gibt zurück:
- A reference to the vehicle that is intended to process this
order sequence. If this sequence 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 sequence.- Gibt zurück:
- A reference to the vehicle currently processing this sequence. If
this sequence has not been processed, yet,
null
is returned.
-
withProcessingVehicle
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.
-