SuperStreetViewRouter

Documentation for SuperStreetViewRouter.

SuperStreetViewRouter.CityDataType
CityData(total_duration::Int, nb_cars::Int, starting_junction::Int)

A struct that holds the metadata for a city. Has constructor(s)

CityData(c::City)
CityData(;total_duration=Int, nb_cars=Int, starting_junction::Int)
source
SuperStreetViewRouter.StreetDataType
StreetData(duration::Int, id::Int, distance::Int)

Structure storing the data required for greedy algorithm in edges of city graph. Has constructors

StreetData(street::Street)
StreetData(street::Street, id::Int)
source
SuperStreetViewRouter.check_solution_feasibilityMethod
check_solution_feasibility(soln::Solution, city_meta_graph::CityGraph; verbose=false)::Bool

Check if soln satisfies the constraints for the instance defined by city_meta_graph. The following criteria are considered (taken from the problem statement): - the number of itineraries has to match the number of cars of city_meta_graph - the first junction of each itinerary has to be the starting junction of city_meta_graph - for each consecutive pair of junctions on an itinerary, a street connecting these junctions has to exist in city_meta_graph (if the street is one directional, it has to be traversed in the correct direction) - the duration of each itinerary has to be lower or equal to the total duration of city_meta_graph

Credit to HashCode2014 for such a clear docstring

source
SuperStreetViewRouter.find_best_pathMethod
find_best_path(possible_paths, traversed_streets, penalty_function)

Returns the best path to traverse from the provided list of possible paths. The best path is the one with the highest value considering the number of times each street has been traversed with the provided penalty

source
SuperStreetViewRouter.get_path_valueMethod
get_path_value(path, traversed_streets, penalty_function)

Returns the value of the provided path, taking into account the number of times each street has been traversed with the provided penalty

source
SuperStreetViewRouter.get_possible_streetsMethod
get_possible_streets(city_graph, current_junction, remaining_time)

Returns a list of all streets that can be traversed from the provided junction. The streets are tuples of (endjunction, streetdata)

source
SuperStreetViewRouter.get_solution_distanceMethod
get_solution_distance(solution::Solution, city_meta_graph::CityGraph)

Compute the total distance of all itineraries in solution based on the street data from city. Streets visited several times are only counted once.

source
SuperStreetViewRouter.solveMethod
solve(prob::CityProblem; depth=5, n_steps=1)

Generates a Solution object to the provided CityProblem`, or uses the default city if none is provided. The depth parameter specifies the depth of the performed BFS and n_steps specifices how many steps to traverse the chosen BFS path per iteration.

source