The eqasim framework features an integrated transport simulation environment. It is based on the agent-based transport simulation framework MATSim with added components for simulation of discrete choice models.
This PR proposes an extension to the RunModeChoice script proposed in PR #161 and developed in PR #165 around the functionality of running the mode choice module as a standalone independent from the simulation.
This PR quite deeply the way this functionality is implemented in order to have a cleaner architecture allow two features:
Multithreading, the previous implementation did not distribute the replanning on parallel threads
The ability to remove persons with no valid mode choice alternative.
The entry point of this feature is the RunStandaloneModeChoice class.
The class requires one parameter:
config-path: a path to a MATSim config file
The mode choice is performed via a StandaloneModeChoiceModule which is configurable via a config group.
The StandaloneModeChoiceConfigGroup can be included in the supplied config file, if not one with the default settings is added and these settings can be set via the commandline using the config: prefix. Below the list of supported parameters:
outputDirectory: The directory in which the resulting plans will as well as the logfiles be written
removePersonsWithNoValidAlternatives: if set to true, persons with no valid alternative for at least one tour or trip will be removed in the resulting population.
More parameters can be supplied via the command line
write-input-csv-trips: if specified, writes out the base trips, and pt legs into csv files called input_trips.csv and input_pt_legs.csv before performing the mode choice.
write-output-csv-trips: writes out the trips resulting from the mode choice, as well as pt legs, as csv files called output_trips.csv and output_pt_legs.csv in addition to the plans file
travel-times-factors-path: if provided, should point out to a csv file specifying the congestion levels on the network during the day as factors by which the free speed is divided. The file in question is a csv With a header timeUpperBound;travelTimeFactor in which the timeUpperBound should be ordered incrementally.
recorded-travel-times-path: mutually exclusive with the travel-times-factors-path. Points to a RecordedTravelTime file.
simulate-after: if set, a single-iteration simulation using the resulting population will be performed, allowing to generate the regular MATSim output files.
A common way to use this script would be a command line similar to the one below
This PR proposes an extension to the RunModeChoice script proposed in PR #161 and developed in PR #165 around the functionality of running the mode choice module as a standalone independent from the simulation.
This PR quite deeply the way this functionality is implemented in order to have a cleaner architecture allow two features:
The entry point of this feature is the RunStandaloneModeChoice class. The class requires one parameter: config-path: a path to a MATSim config file The mode choice is performed via a StandaloneModeChoiceModule which is configurable via a config group. The StandaloneModeChoiceConfigGroup can be included in the supplied config file, if not one with the default settings is added and these settings can be set via the commandline using the config: prefix. Below the list of supported parameters:
A common way to use this script would be a command line similar to the one below