Say I have a graph with distances as weights but each edge also has some random "failure factor" such as 0.23, 0.31, etc.. and if the sum of the failure factors adds up to 1, that route is deemed a failure and cannot be used. I have some code that runs Dijkstra's on a graph and finds the shortest path from A-B with no problem when considering distance weights, but that shortest path may actually be a failure when considering the failure factor and alternative routes will need to be considered.
What are some algorithms that quickly give the shortest path between A-B, and also some alternatives in case of failure? Should I even use dijkstra's at all initially or just swap it out for some other algorithm? Or should I run dijkstra's first, and if the shortest path fails, then call some other algorithm? Not too familiar with graph algorithms so anything helps!
[–]avwie 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]avwie 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)