issues
search
cc-routing
/
routing-sara
Seznam Advanced Routing Algorithm
1
stars
2
forks
source link
Create dataset
#28
Closed
blahami2
closed
8 years ago
blahami2
commented
8 years ago
Generate random node pairs
Pick pairs in order to get a full range of routes (short, medium, long, ...)
blahami2
commented
8 years ago
Optimize "random" picks
Prefer (if needed) ones with the largest geospatial distance (use pythagoras for performance reasons)
Impl: sort n^2 nodes by distance, pick randomly with preference for higher values
blahami2
commented
8 years ago
Optimization
Heavily optimized
Implemented Geospatial distance heuristic
Procedure
Randomly pick N nodes
Create N*N pairs
Sort them by distance
For each interval repeat max K times or until found
Calculate actual route distance
Compare to interval min/max distance
Adjust if not inside the interval (direction +/-), repeat
Save otherwise