[rules-users] VCRP - Distance calculation in getMilliDistance

Geoffrey De Smet ge0ffrey.spam at gmail.com
Mon Mar 3 02:59:45 EST 2014


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-in-getMilliDistance-tp4028382p4028433.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>




More information about the rules-users mailing list