Shortest path with branch and bound [on hold]

287
January 03, 2017, at 04:49 AM

So, trying to make a gps that gives the shortest path from one place to another, but passing in specify locations. I've searched and it seems branch and bound is an optimal solution but how can we implement it on a shortest path? How do we write every possible path automatically?

Answer 1

There is an algorithm for shortest path called Dijkstra.

Dijkstra's algorithm

It finds the shortest path inside a graph. You need to define the weights for the edges.

I don't really know about the google-maps api, so you will have to find out how to get these informations (maybe you can use the 'places' as nodes and 'time' as edges weight).

If you wanna the shortest path going from A - C passing by B, you can use Dijkstra from A to B, them use it again from B to C.

READ ALSO
Cannot display data in xhtml DataTable by using Hibernate, Spring

Cannot display data in xhtml DataTable by using Hibernate, Spring

I'm doing some test to display dataI want users to see usersnames of other users after singing up + seeing his/her own username

298
SocketChannel keeps reading -1

SocketChannel keeps reading -1

SocketChannel read keeps reading "-1" bytes which means end of stream by documentation

267
JavaFx Check if the fxml window or a stage is open or not

JavaFx Check if the fxml window or a stage is open or not

The issue is that I am working with several fxml files that are activated by pressing a button from the main frameWhen you click twice or more the needed stage is showing as much as you clicked on the button, so it is taking too much space memory(RAM)...

389
Getting wrong date when subtracting 1 day using java Calendar

Getting wrong date when subtracting 1 day using java Calendar

I having a hard time wrapping my head around a problem I am having with Calendaradd() and I need a sanity check

232