Class ChooseRandomLegModeForSubtour

  • All Implemented Interfaces:
    PlanAlgorithm

    public final class ChooseRandomLegModeForSubtour
    extends Object
    implements PlanAlgorithm
    Changes the transportation mode of one random non-empty subtour in a plan to a randomly chosen different mode given a list of possible modes, considering that the means of transport follows the law of mass conservation.
    Author:
    michaz
    See Also:
    SubtourModeChoice
    • Method Detail

      • setSingleTripSubtourModes

        public void setSingleTripSubtourModes​(String[] singleTripSubtourModes)
        Some subtour consist of only a single trip, e.g. if a trip starts and ends on the same link or facility. By default, for those modes, the normal chain based modes are available. But in certain cases, not all the modes should be available for such trips (e.g. car-sharing does not make much sense for such a trip), thus the list of modes available for single-trip subtours can be specified independently. As mentioned, it is initialized by the constructor to the full list of chain based modes.
        Parameters:
        singleTripSubtourModes -