Interface RouterService
public interface RouterService
Provides methods concerning the
Router.-
Method Summary
Modifier and TypeMethodDescriptioncomputeRoutes(TCSObjectReference<Vehicle> vehicleRef, TCSObjectReference<Point> sourcePointRef, Set<TCSObjectReference<Point>> destinationPointRefs, Set<TCSResourceReference<?>> resourcesToAvoid) Deprecated.default Map<TCSObjectReference<Point>, Set<Route>> computeRoutes(TCSObjectReference<Vehicle> vehicleRef, TCSObjectReference<Point> sourcePointRef, Set<TCSObjectReference<Point>> destinationPointRefs, Set<TCSResourceReference<?>> resourcesToAvoid, int maxRoutesPerDestinationPoint) Computes possible routes for the given vehicle from a source point to a set of destination points.voidNotifies the router that the topology has changed with respect to the given paths and needs to be re-evaluated.
-
Method Details
-
updateRoutingTopology
Notifies 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 Map<TCSObjectReference<Point>,Route> computeRoutes(TCSObjectReference<Vehicle> vehicleRef, TCSObjectReference<Point> sourcePointRef, Set<TCSObjectReference<Point>> destinationPointRefs, Set<TCSResourceReference<?>> resourcesToAvoid) throws KernelRuntimeException Deprecated.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.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.
-
computeRoutes
@ScheduledApiChange(when="7.0", details="Default implementation will be removed.") default Map<TCSObjectReference<Point>,Set<Route>> computeRoutes(TCSObjectReference<Vehicle> vehicleRef, TCSObjectReference<Point> sourcePointRef, Set<TCSObjectReference<Point>> destinationPointRefs, Set<TCSResourceReference<?>> resourcesToAvoid, int maxRoutesPerDestinationPoint) throws KernelRuntimeException Computes possible 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.maxRoutesPerDestinationPoint- The maximum number of routes to compute for each destination point.- Returns:
- A map of destination points to a corresponding set of computed routes. If no routes could be determined for a specific destination point, the corresponding set is empty.
- Throws:
KernelRuntimeException- In case there is an exception executing this method.
-
computeRoutes(TCSObjectReference, TCSObjectReference, Set, Set, int)instead.