Vehicle dependent service time

Is it possible to have service time dependent on vehicle?

One way to do it is similar to this

I.e: Have vehicle dependent travel time, and add service time in actual travel time for that service.

Just wondering can we handle vehicle dependent travel time? As vehicleSwitch will change travel time for between all the nodes in existing route and this may create problems similar to this.

As pointed out by @jie31best we need modify constraints, cost calculator etc. when vehicle switch is allowed.

It can be done via VehicleRoutingActivityCosts.

Now the service time of a TourActivity can be obtained by

activityCosts.getActivityDuration(activity, arrivalTime, driver, vehicle)

Note by default it is equal to


as it is set in WaitingTimeCosts.

You can also check out #199 and #151.

I am not sure if this will be faced with the issue you mentioned, though.

Best regards,