0

How can I set different start and stop locations for the vehicles?

len
  • 749
  • 1
  • 8
  • 23

1 Answers1

1

Refactor the java class Vehicle from having a Depot to having a starting Location and an ending Location. Then adjust the scoreRules.drl accordingly.

Geoffrey De Smet
  • 26,223
  • 11
  • 73
  • 120
  • 1
    I know Milenko's question was a bit terse, but perhaps you could help me? I've created additional properties and have been playing around with the rules but I've not got it right yet. What I've tried is `rule "distanceFromFirstCustomerToStart" when $customer : Customer(previousStandstill == null) then Vehicle vehicle = (Vehicle) $customer.getVehicle(); scoreHolder.addSoftConstraintMatch(kcontext, - $customer.getDistanceToStart(vehicle)); end` But this isn't working, maybe I'm not understanding the how to construct the rule? – bravocharlie Apr 12 '16 at 15:33