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...
Sent from the Drools: User forum mailing list archive at
Nabble.com.