For a description of the algorithms see the respective child pages.
The algorithms can use different location attributes of activities as the basis for the trip structure analysis.
An activity can be located at a facility, a link or another type of location. By default, the algorithms described use the facility information as the location information. Sometimes it might be useful to use the link as the location information, e.g. if facilities are not part if the scenario. This can be configured as follows.
<module name="planomat">
<param name="tripStructureAnalysisLayer" value="link" />
</module>
This plan algorithm is an implementation of Miller et al.'s (2005) individual trip maker mode choice, described in Section 3.2 of that paper. It computes a choice set of feasible trip mode combinations given




Consider the following scenario:
The plan consists of two subtours, each of which might be performed with one of the car. Alternatively, each trip might be performed woth a trip-based mode (walk, pt). The resulting choice set is:
car-car-car-car
car-car-pt-pt
car-car-walk-walk
car-car-walk-pt
car-car-pt-walk
pt-pt-car-car
walk-walk-car-car
walk-pt-car-car
pt-walk-car-car
pt-pt-pt-pt
pt-pt-pt-walk
pt-pt-walk-pt
pt-pt-walk-walk
pt-walk-pt-pt
pt-walk-pt-walk
pt-walk-walk-pt
pt-walk-walk-walk
walk-pt-pt-pt
walk-pt-pt-walk
walk-pt-walk-pt
walk-pt-walk-walk
walk-walk-pt-pt
walk-walk-pt-walk
walk-walk-walk-pt
walk-walk-walk-walk
See also attached Figure 1 from Miller et al. (2005).
To do.
Plan plan = ...; // generate instance of the plan algorithm MeisterkConfigGroup meisterk = new MeisterkConfigGroup(); PlanAnalyzeTourModeChoiceSet patmcs = new PlanAnalyzeTourModeChoiceSet(meisterk); // specify and set set of modes available to the agent EnumSet<BasicLeg.Mode> possibleModes = EnumSet.of(BasicLeg.Mode.walk, BasicLeg.Mode.bike, BasicLeg.Mode.pt, BasicLeg.Mode.car); patmcs.setModeSet(possibleModes); // run algorithm patmcs.run(plan); // obtain result: choice set of feasible mode combinations ArrayList<BasicLeg.Mode[]> actual = patmcs.getResult();
See example usage in the test class: playground.meisterk.org.matsim.population.algorithms.PlanAnalyzeTourModeChoiceSetTest
Miller, E. J., M. J. Roorda und J. A. Carrasco (2005) A tour-based model of travel mode choice, Transportation, 32 (4) 399–422.
With this algorithm, subtours in activity plans with given activity locations can be identified.
Subtour is defined like the following:
Each subtour is assigned an index, starting with 0 for the first subtour identified. The algorithm returns a list with n elements, n being the number of trips in the given activity plan, which is the number of activities -1. The results for the above examples are:
The algorithm is of a backtracking type which means that tour-like subtours are identifed first, and thus get the lower indices. This explains the indexation of the last example.
See more examples in the test class: org.matsim.population.algorithms.PlanAnalyzeSubtoursTest
The usage of the subtour indexation is as follows.
Plan plan = ...; PlanAnalyzeSubtours past = new PlanAnalyzeSubtours(); testee.run(plan); ... int numSubtours = past.getNumSubtours(); // get the number of subtours int[] subtourIndexation = past.getSubtourIndexation(); // get the subtour indexation array