I am scheduling passenger pickup/dropoff routes.
Multiple passengers in a vehicle is good!
Passenger extra time in vehicle is bad.
If Bob lives close to dest and Alice lives far from dest, ideally we would pick up Alice, then Bob, then drop them both off. JSprit doesn't seem to have a built-in constraint for this.
Essentially, I want a soft constraint for passenger extra minutes in vehicle, above the straight-shot drive time from pickup to dropoff. I think a simple penalty for overall time in vehicle would work all right instead of calculating the extra. Any thoughts about how to structure this constraint in JSprit? Is it a soft version of MaxTimeInVehicleConstraint?
I've solved this by using
JSprit.setObjectiveFunction()instead of a custom constraint. Much simpler to implement.