/// <summary> /// Fetches all possible routes for delivering cargo with provided tracking id. /// </summary> /// <returns>Possible delivery routes</returns> public IList <RouteCandidateDTO> FetchRoutesForSpecification(string origin, string destination, DateTime arrivalDeadline) { IList <TransitPath> paths = _graphTravesrsalService.FindShortestPaths( origin, destination, new Constraints(arrivalDeadline)); return(paths.Select(x => ToRouteCandidate(x)).ToList()); }
public IList <Itinerary> FetchRoutesForSpecification(RouteSpecification routeSpecification) { IList <TransitPath> paths = _graphTraversalService.FindShortestPaths( routeSpecification.Origin.UnLocode.CodeString, routeSpecification.Destination.UnLocode.CodeString, new Constraints(routeSpecification.ArrivalDeadline)); return(paths.Select(x => ToItinerary(x)).ToList()); }