Class RoutingResponse

java.lang.Object
org.eclipse.mosaic.lib.routing.RoutingResponse

public class RoutingResponse extends Object
Class containing the response for a routing request. Gathers information in one object.
  • Constructor Details

    • RoutingResponse

      public RoutingResponse(CandidateRoute bestRoute, List<CandidateRoute> alternativeRoutes)
      Creates a routing response to the routing request with the best CandidateRoute and the alternative routes.
      Parameters:
      bestRoute - The best route based on the cost function.
      alternativeRoutes - List of alternative routes.
  • Method Details

    • getAlternativeRoutes

      public final List<CandidateRoute> getAlternativeRoutes()
      Returns alternative route(s) excluding the best one.
      Returns:
      List for alternative routes in addition to the best route.
    • getBestRoute

      public final CandidateRoute 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.