I am want to add a simple boolean value to each vehicle that indicates if the vehicle is secure, then for each customer a similar boolean to indicate that the customer requires a secure vehicle.
I have got as far as working out I need to:
- extend the domain objects for Vehicle and Customer to reflect these.
- extend the input XML to have at least one secure Vehicle and one Customer requiring a secure collection.
- extend the vehicleRoutingScoreRules.drl to add a new rule "secure" with a hard constraint.
This is a little pathetic - but I am pushed for time and the drools manual is massive and I cannot figure out the syntax for what I think is a simple rule. Could some kind soul give me a starter here please.
Got it working!
I have done the following:
extend the domain objects for Vehicle and Customer to reflect these.
extend the input XML to have at least one secure Vehicle and one Customer requiring a secure collection.
extend the vehicleRoutingScoreRules.drl to add a new rule "secure" with a hard constraint.
And it all works! With 3 "secure" customers with a total need = the total secure vehicle capacity I can see that one vehicle (the secure one) does all 3 pickups and is full.