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)
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.
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.