0

I'm trying to implement a HardActivityConstraint which chooses services/shipments that lie in a certain radial distance from the vehicle depot.

In the constraintStatus method, I am trying to get the start location of the route from the JobInsertionContext but it always has value null.

Please help.

Anirban Mandal
  • 161
  • 1
  • 8

1 Answers1

0

Use newVehicle.getStartLocation() instead since iFacts.getRoute.getStart().getLocation() might change with the newVehicle, and it might be null if no vehicle has been assigned to this route yet.

Stefan Schröder
  • 1,037
  • 7
  • 13