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)
Computes routes for the given vehicle from a source point to a set of destination points.void
updatePathLock(TCSObjectReference<Path> ref, boolean locked)
Updates a path's lock state.void
updateRoutingTopology()
Notifies the router that the topology has changed in a significant way and needs to be re-evaluated.
-
Method Details
-
updatePathLock
void updatePathLock(TCSObjectReference<Path> ref, boolean locked) throws ObjectUnknownException, KernelRuntimeExceptionUpdates a path's lock state.- 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
Notifies the router that the topology has changed in a significant way and needs to be re-evaluated.- 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) throws KernelRuntimeExceptionComputes routes for the given vehicle from a source point to a set of destination points.- 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.
-