[rules-users] Planner: Vehicle Routing, but with return to home after last delivery
jimirn
jimirn at gmail.com
Thu Sep 27 05:34:13 EDT 2012
I am not sure I understand how the rule works.
I have several DeliveryPlace's (VrpCustomer's) that don't have
previousAppearance == $customer, basicly it is only the first DeliveryPlace
on a route that has this for a certain Consultant (VrpVehicle).
ge0ffrey wrote
> The vehicle routing example has this, which should be easy to modify to
> what you need:
>
> rule "distanceFromLastCustomerToDepot"
> when
> $customer : VrpCustomer(previousAppearance != null)
> not VrpCustomer(previousAppearance == $customer)
> then
> VrpVehicle vehicle = $customer.getVehicle();
> insertLogical(new
> IntConstraintOccurrence("distanceFromLastCustomerToDepot",
> ConstraintType.NEGATIVE_SOFT,
> $customer.getDistanceTo(vehicle),
> $customer));
> end
--
View this message in context: http://drools.46999.n3.nabble.com/Planner-Vehicle-Routing-but-with-return-to-home-after-last-delivery-tp4019990p4019997.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list