Need help with solving my problem with JGAP

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Need help with solving my problem with JGAP

Ashish Kulkarni-2
I need to find the optimal path between some points, i know the total time between each combination
Suppose i have points A B C D E F G H
and i know the distance between
etc, for all the points, now i want to find the fastest route if i have to go from A to H or B - D
So i know my starting point and my ending point, and i want to find the optimal path between them.

But i am having problem solving it, as the solution i get starts with the starting point but ends with a different point all the time, what am i missing or did wrong

I am attaching 3 java source files along this mail, you can download and complile them with JGAP 3.2.2 in classpath.
I have also attached jar file with source and classes so you can run it directly creates the sample data for from to values creates the solutions and returns getOptimizedList the optimal array as answer calles TestSalesManSolution 2 times passing the Array of places.

If you can help me understand what i am missing would be a real help


This email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>
jgap-users mailing list
[hidden email] (1K) Download Attachment (2K) Download Attachment (2K) Download Attachment
testp.jar (8K) Download Attachment