Package org.opentcs.data.model
Class Path
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Contains information regarding the grahical representation of a path. -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionPath
(String name, TCSObjectReference<Point> sourcePoint, TCSObjectReference<Point> destinationPoint) Creates a new Path. -
Method Summary
Modifier and TypeMethodDescriptionReturns a reference to the point which this path ends in.Returns the information regarding the grahical representation of this path.long
Return the length of this path (in mm).int
Return the maximum allowed reverse velocity (in mm/s) for this path.int
Return the maximum allowed forward velocity (in mm/s) for this path.Returns the peripheral operations to be performed when a vehicle travels along this path.Returns a reference to the point which this path originates in.Returns a map of envelope keys to envelopes that vehicles traversing this path may occupy.boolean
isLocked()
Return the lock status of this path (i.e.boolean
Checks whether this path is navigable in forward direction.boolean
Checks whether this path is navigable in backward/reverse direction.boolean
isNavigableTo
(TCSObjectReference<Point> navPoint) Checks whether this path is navigable towards the given point.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.withLayout
(Path.Layout layout) Creates a copy of this object, with the given layout.withLength
(long length) Creates a copy of this object, with the given length.withLocked
(boolean locked) Creates a copy of this object, with the given locked flag.withMaxReverseVelocity
(int maxReverseVelocity) Creates a copy of this object, with the given maximum reverse velocity.withMaxVelocity
(int maxVelocity) Creates a copy of this object, with the given maximum velocity.withPeripheralOperations
(List<PeripheralOperation> peripheralOperations) Creates a copy of this object, with the given peripheral operations.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.withVehicleEnvelopes
(Map<String, Envelope> vehicleEnvelopes) Creates a copy of this object, with the given vehicle envelopes.Methods inherited from class org.opentcs.data.model.TCSResource
getReference
Methods inherited from class org.opentcs.data.TCSObject
equals, getHistory, getName, getProperties, getProperty, hashCode, listWithoutNullValues, mapWithoutNullValues, propertiesWith, setWithoutNullValues, toString
-
Constructor Details
-
Path
public Path(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
Description copied from class:TCSObject
Creates a copy of this object, with the given property integrated.- Specified by:
withProperty
in classTCSObject<Path>
- Parameters:
key
- The key of the property to be changed.value
- The new value of the property, ornull
, if the property is to be removed.- Returns:
- A copy of this object, with the given property integrated.
-
withProperties
Description copied from class:TCSObject
Creates a copy of this object, with the given properties.- Specified by:
withProperties
in classTCSObject<Path>
- Parameters:
properties
- The properties.- Returns:
- A copy of this object, with the given properties.
-
withHistoryEntry
Description copied from class:TCSObject
Creates a copy of this object, with the given history entry integrated.- Specified by:
withHistoryEntry
in classTCSObject<Path>
- Parameters:
entry
- The history entry to be integrated.- Returns:
- A copy of this object, with the given history entry integrated.
-
withHistory
Description copied from class:TCSObject
Creates a copy of this object, with the given history.- Specified by:
withHistory
in classTCSObject<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
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
Returns a reference to the point which this path originates in.- Returns:
- A reference to the point which this path originates in.
-
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
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
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
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
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), elsefalse
.
-
withLocked
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
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
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
Returns the information regarding the grahical representation of this path.- Returns:
- The information regarding the grahical representation of this path.
-
withLayout
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.
-