During the Replanning stage it can happen, that a replanning strategy switches an agent to a mode or a departure time for which the router cannot find any useful route. E.g. SubtourModeChoice forces an agent to use drt where no drt is available or TimeAllocationMutator moves the departure time after the departure of the last bus.
Currently we deal with that problem only in the routers for drt and pt, but similar problems can also occur for other modes (e.g. a short car trip where there are no roads / the next road is further away than the destination). The drt and pt routers currently return direct walk trips which create their own problems (see MATSIM-943, ), such as new modes for direct walk whose scoring parameters are unclear.
Would it be better to just abort replanning for the agent and switch back to his old plan? This way the agent will have a valid plan without any awkward direct walks.
I can imagine that the configuration of replanning strategies can become tricky. E.g. if SubtourModeChoice switches a subtour actA -> car -> actB -> car -> actC -> car -> actA to actA -> pt -> actB -> pt -> actC -> pt -> actA there might be a fast pt route for the first two trips, but maybe no service at all from C to A by pt. At the same time there could be drt from C to A, but not between A and B. So both the all pt subtour as well as the all drt subtour are impossible and would be always rejected after the router has not found a route. If SubtourModeChoice always switches the whole subtour from car to either all drt or all pt, the agent can never find the (possibly) optimal tour actA -> pt -> actB -> pt -> actC -> drt -> actA. In the current approach we would at least have actA -> pt -> actB -> pt -> actC -> transit_walk -> actA. So we might have to look deeper into the replanning modules in order not to exclude feasible plans only because no replanning strategy happens to create them in one single replanning step.
Any other ideas how to deal with situations in which there is no feasible or useful route for a certain mode?