Dijkstra algorithm with Delphi
Today I'm going to show you the improved algorithm to find the shortest path using Dijkstra. My older application Thundax Box manager was implementing this algorithm but with several restrictions. Now, with the release of the TestFramework v2.0.0 build 745 you can test this new functionality. I also fixed other bugs, and I would be grateful that if you find any bug, report it to the bug tracker into the Sourceforge. The same for a feature request or a support request. Sometimes it is difficult to find bugs even using TDD. I've checked all my classes but sometimes I skip part of them in order to focus on the part I'm interested in.
Anyway, in this version you would be able to:
We can mark the initial node (green) and the final nodes or destination nodes (fuchsia) and then, calculate the shortest path by going to Algorithms -> Apply Dijkstra Algorithm.
Afterwards, we can see:
Remember that we can use all the other very useful implemented utilities in the program, like the graph implementator and the force-based layout to generate and order graphs as fast as we can.
Other useful examples:
In this case, I've played with the new functionality -> Algorithm -> Fill with values. This method will fill the nodes with an ordered number and the edge with the distance between nodes in pixels.
Then the result:
Here you can see a video showing the results of the work done:
If you have time, give it a try!. I'm sure that the application will impress you, and don't hesitate to contact me, by commenting the post or by sending me a message at sourceforge or through my web contact. Enjoy!.
Anyway, in this version you would be able to:
- Draw a graph (n-connections).
- Connect the nodes and add some weight to the edges.
- label the nodes.
- set multiple destinations (Origin and Target/s).
- calculate the shortest path using Dijkstra.
We can mark the initial node (green) and the final nodes or destination nodes (fuchsia) and then, calculate the shortest path by going to Algorithms -> Apply Dijkstra Algorithm.
Afterwards, we can see:
Remember that we can use all the other very useful implemented utilities in the program, like the graph implementator and the force-based layout to generate and order graphs as fast as we can.
Other useful examples:
In this case, I've played with the new functionality -> Algorithm -> Fill with values. This method will fill the nodes with an ordered number and the edge with the distance between nodes in pixels.
Then the result:
Here you can see a video showing the results of the work done:
If you have time, give it a try!. I'm sure that the application will impress you, and don't hesitate to contact me, by commenting the post or by sending me a message at sourceforge or through my web contact. Enjoy!.
Hi,
ReplyDeleteI just wanted to say that I really enjoyed your blog and this post. You make some very informative points. Keep up the great work!
-
Delphi development
hello i'm student from indonesia ,i will be glad if you give me a source code to pepehlovechicken@gmail.com
ReplyDeleteHi Pedagang,
DeleteLook for my google code projects. You'll find the source code there.
Regards,
Jordi
where is the code,i'm a student and i want to learn
ReplyDeleteHi,
DeleteLook for my google code projects. You'll find the source code there.
Regards,
Jordi
I can't find the code on our sourse, please give me a link))))
ReplyDeleteI am new for delphi and a student.
ReplyDeletecan u please provide me the code of this example..
please