Hello
I am new to optaplanner. I am trying to use the vrp (tw) example.
I'll like to set real distances (route distances) in order to get a real solution.
I have real distances between all points in a double NXN matrix (distance(a,b)<>distance(b,a)), so, how can I use the matrix in the .xml (.vrp) input file to solve vrp problem ?
Note : my matrix is about from 2X10X10 to 2X100X100.
Thanks in advance.
opp
Using real distances between points in optaplanner
1k views Asked by opp At
2
Here is the way I went. There might be much better solutions than this - I have to admit that I just started to play around with Optaplanner. Any suggestions on improvement are welcomed.
Hope this helps. Brgds, Paul
My matrix is in the form "From Customer" "To Customer" "Distance" and I created a class Distance. *In the Importer I build a DistanceMap for each Location:*
In the location class I use the following method to get the Distance:
And the distance class method looks like this: