On 27-02-14 16:55, Marcus Uerlings wrote:
Hi 

I´ve download Optaplanner a couple of months ago and found it fantastic!! Congrats to Geoffrey! 

I´m not a programmer, but a logistic consultant to a non-governmental organization (NGO) of recycling products and like to give my "cent of contribuition" if it applies.
Intresting use case :)
I love that fact that NGO's are taking advantage of this software too.

Do note that the examples/docs are aimed at Java programmers (because any real-world application requires customization to the actual organization that wants to use it), OptaPlanner doesn't try to be a generic out-of-the-box VRP solution (but something like that can be build downstream upon OptaPlanner).

1. Distance Calculation: 

I´ve learned from a person that works with georeference that a good aproximation in calculating distances from latitude and longitude is to multiply the Euclidean result by "111.1". 
This "magic number" will give the approximate distance in kilometers and then the final soft score will show the minimum distance in "km" and not in "fuel" (although they are related). 

===== 
    public int getMilliDistance(Location location) { 
( ... ) 
                (latitudeDifference * latitudeDifference) + (longitudeDifference * longitudeDifference)); 
        return (int) (distance * 1000.0 * 111.1); 
    } 
===== 

2. Heteregenous vehicles 

Many times a fleet is made of different vehicles, different sizes, capacity and one of the most important,  different mileages (in Km/litre or litres/100 km). 
How can I put it in vehicle parameters, together with capacity and took into account in score calculation? 
Doing so, the score would be calculated as minimum(Distance*mileage).
That requires Java programming, but it's not that much work:
- add the fields on the class Vehicle
- add the fields in the xml input
- use the fields in the score DRL

3. Real example 
I fed real data into Optaplanner VCRP and plot the results in Googlemaps. 
Due to one way streets, the result does not look efficient to the drivers of the NGO. 
Is there a way to use an internet routing service, like Googlemaps in Optaplanner? 
If it is possible, can someone help me coding this? :)
Peter Karich was recently planning to combine OptaPlanner with Graphhopper (both open source) to accomplish exactly that.
I am not sure if he follows this list, but might be interesting to open a conversation with him.

Regards from Brazil 
Thank you in advance 
Marcus Uerlings 
______________________________________________
Marcus Uerlings
+11 9 4178-0544


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users