If you have enough memory, you can cache the distance from every
location to every other location
before Solver.solve() or in Solution.getProblemFacts().
The machineReassignment example has a similar big 2 dimensional grid for
the cost of every machine to every other machine.
Don't go blindly with LinkedHashMap there - that can be very expensive
memory wise when scaling out.
On 01-03-14 05:53, muerlings wrote:
Please, take a look at
http://en.wikipedia.org/wiki/Great-circle_distance
In it, there are formulas based on latitude and longitude for arc length
calculation. The problem is that they are "expensive" formulas based on
trigonometric functions and could heavily impact performance, but they are a
better aproximation than the cord length.
mu
--
View this message in context:
http://drools.46999.n3.nabble.com/rules-users-VCRP-Distance-calculation-i...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users