getBackwardTransportTime

Hi !

I have some question about the function getBackwardTransportTime, which is currently called three times :
UpdatePracticalTimeWindows
UpdateVehicleDependentPracticalTimeWindows
VehicleDependentTimeWindowConstraints

But from my observations, there is two way of calling it.

  • From the previous activity to the current activity
  • From the next activity to the current one

The way I understand this function is the following.
Considering i and j two activity in direct sequence. From the upper bound of j, we want to now the latest arrival time from i
Then getBackwardTransportTime must be call as : getBackwardTransportTime(i.getLocation(), j.getLocation(), j.getTheoreticalLatestOperationStartTime(), driver, vehicle)

Is it right ?

Hi @braktar,

I think getBackwardTransportTime returns the travel time (from the from location to the to location) for a given arrival time at the to location, while getTransportTime returns the travel time for a given departure time at the from location.

In the static context, I don’t think they will differ, but in the time-dependent case, they can. You can refer to how @stefan calculates them differently in the time-dependent context for Figliozzi’s problem here.

Best regards,
He

1 Like

Thanks,

Ok, it confirms my understanding.

Then I will a bit orient my question on UpdatePracticalTimeWindows and UpdateVehicleDependentPracticalTimeWindows.
For those two classes, I don’t get how the visit() function works. Is it called from the last activity to the first ?

Exactly! From last act to first act since latest activity start time can only be calculated from the end of the route. Thus updating goes backwards through the route.
However, if it is hard to understand we should improve this visitor stuff.

Thanks !

I just figure out that it implements “ReverseActivityVisitor” :slight_smile:
At the first look it was not really intuitive