Package org.eclipse.mosaic.lib.routing
Class RoutingResponse
java.lang.Object
org.eclipse.mosaic.lib.routing.RoutingResponse
Class containing the response for a routing request.
Gathers information in one object.
-
Constructor Summary
ConstructorsConstructorDescriptionRoutingResponse
(CandidateRoute bestRoute, List<CandidateRoute> alternativeRoutes) Creates a routing response to the routing request with the bestCandidateRoute
and the alternative routes. -
Method Summary
Modifier and TypeMethodDescriptionfinal List<CandidateRoute>
Returns alternative route(s) excluding the best one.final CandidateRoute
Returns the "best" route in regards to the given cost function.
-
Constructor Details
-
RoutingResponse
Creates a routing response to the routing request with the bestCandidateRoute
and the alternative routes.- Parameters:
bestRoute
- The best route based on the cost function.alternativeRoutes
- List of alternative routes.
-
-
Method Details
-
getAlternativeRoutes
Returns alternative route(s) excluding the best one.- Returns:
- List for alternative routes in addition to the best route.
-
getBestRoute
Returns the "best" route in regards to the given cost function. Alternative routes can be obtained via getAlternativeRoutes().- Returns:
- The best route in terms of costs.
-