Interface RouterService
public interface RouterService
Provides methods concerning the
Router
.-
Method Summary
Modifier and Type Method Description java.util.Map<TCSObjectReference<Point>,Route>
computeRoutes(TCSObjectReference<Vehicle> vehicleRef, TCSObjectReference<Point> sourcePointRef, java.util.Set<TCSObjectReference<Point>> destinationPointRefs)
java.util.Map<TCSObjectReference<Point>,Route>
computeRoutes(TCSObjectReference<Vehicle> vehicleRef, TCSObjectReference<Point> sourcePointRef, java.util.Set<TCSObjectReference<Point>> destinationPointRefs, java.util.Set<TCSResourceReference<?>> resourcesToAvoid)
Computes routes for the given vehicle from a source point to a set of destination points.void
updatePathLock(TCSObjectReference<Path> ref, boolean locked)
Deprecated.void
updateRoutingTopology()
Deprecated.UseupdateRoutingTopology(java.util.Set)
instead.default void
updateRoutingTopology(java.util.Set<TCSObjectReference<Path>> refs)
Notifies the router that the topology has changed with respect to the given paths and needs to be re-evaluated.
-
Method Details
-
updatePathLock
@Deprecated @ScheduledApiChange(when="6.0", details="Will be removed.") void updatePathLock(TCSObjectReference<Path> ref, boolean locked) throws ObjectUnknownException, KernelRuntimeExceptionDeprecated.Updates a path's lock state.If called within the kernel application, this method is supposed to be called only on the kernel executor thread.
- Parameters:
ref
- A reference to the path to be updated.locked
- Indicates whether the path is to be locked (true
) or unlocked (false
).- Throws:
ObjectUnknownException
- If the referenced path does not exist.KernelRuntimeException
- In case there is an exception executing this method.
-
updateRoutingTopology
@Deprecated @ScheduledApiChange(when="6.0", details="Will be removed.") void updateRoutingTopology() throws KernelRuntimeExceptionDeprecated.UseupdateRoutingTopology(java.util.Set)
instead.Notifies the router that the topology has changed in a significant way and needs to be re-evaluated.If called within the kernel application, this method is supposed to be called only on the kernel executor thread.
- Throws:
KernelRuntimeException
- In case there is an exception executing this method.
-
updateRoutingTopology
@ScheduledApiChange(when="6.0", details="Default implementation will be removed.") default void updateRoutingTopology(java.util.Set<TCSObjectReference<Path>> refs) throws KernelRuntimeExceptionNotifies the router that the topology has changed with respect to the given paths and needs to be re-evaluated.If called within the kernel application, this method is supposed to be called only on the kernel executor thread.
- Parameters:
refs
- References to paths that have changed in the routing topology. An empty set of path references results in the router updating the entire routing topology.- Throws:
KernelRuntimeException
- In case there is an exception executing this method.
-
computeRoutes
@Deprecated @ScheduledApiChange(when="6.0", details="Will be removed.") java.util.Map<TCSObjectReference<Point>,Route> computeRoutes(TCSObjectReference<Vehicle> vehicleRef, TCSObjectReference<Point> sourcePointRef, java.util.Set<TCSObjectReference<Point>> destinationPointRefs) throws KernelRuntimeExceptionDeprecated.Computes routes for the given vehicle from a source point to a set of destination points.If called within the kernel application, this method is supposed to be called only on the kernel executor thread.
- Parameters:
vehicleRef
- A reference to the vehicle to calculate the routes for.sourcePointRef
- A reference to the source point.destinationPointRefs
- A set of references to the destination points.- Returns:
- A map of destination points to the corresponding computed routes or
null
, if no route could be determined for a specific destination point. - Throws:
KernelRuntimeException
- In case there is an exception executing this method.
-
computeRoutes
java.util.Map<TCSObjectReference<Point>,Route> computeRoutes(TCSObjectReference<Vehicle> vehicleRef, TCSObjectReference<Point> sourcePointRef, java.util.Set<TCSObjectReference<Point>> destinationPointRefs, java.util.Set<TCSResourceReference<?>> resourcesToAvoid) throws KernelRuntimeExceptionComputes routes for the given vehicle from a source point to a set of destination points.If called within the kernel application, this method is supposed to be called only on the kernel executor thread.
- Parameters:
vehicleRef
- A reference to the vehicle to calculate the routes for.sourcePointRef
- A reference to the source point.destinationPointRefs
- A set of references to the destination points.resourcesToAvoid
- A set of references to resources that are to be avoided.- Returns:
- A map of destination points to the corresponding computed routes or
null
, if no route could be determined for a specific destination point. - Throws:
KernelRuntimeException
- In case there is an exception executing this method.
-