eqasim-org / eqasim-java

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.
http://www.eqasim.org
GNU General Public License v2.0
23 stars 40 forks source link

feat: Standalone Mode Choice as a core functionality and some documentation and refractoring #224

Closed tkchouaki closed 4 months ago

tkchouaki commented 5 months ago

The functionality of running the mode choice model as a standalone process without the iterative simulation was initiation by PR #161 and further developed in PR #165 and PR #195. Before the PR at hand, this functionality was available inside the ile_de_france module and specifically adapted to it.

The goal of this PR is to make the execution of the mode choice model as a standalone available from the core module and extensible to adapt it to other use cases. We focus below on technical details, for a more user-related guide, refer to the documentation described in docs/standalone_mode_choice.md.

The previous implementation instantiated only the modules necessary for mode choice, leaving out the ones centered around mobsim and analysis (such as event handling...etc). Whereas large parts of the configuration of the mode choice model is done in the core module, some configuration is still done in the specific use-case related modules. The EqasimConfigurator class is usally extended to implement configurators in charge of use-case-specific settings at various steps (configuration loading, scenario configuration and adjustment, controler configuration).

While the same configurator can still be used for the first three steps, the controler configuration part cannot be used to retrieve the modules used for mode choice as other modules can be present there. Performing a filtering to keep only instances of AbstractEqasimExtension doesn't work either because that would leave out necessary ones such as SwissRailRaptor.

As a result, the approach that was chosen here is to define a StandaloneModeChoice configurator that can be extended in the use cases to provide mode-choice-only modules.

Note: This PR also adds the generation of a recorded travel times (in eqasim_travel_times.bin) as a part of the standard eqasim analysis.

sebhoerl commented 4 months ago

Great, looks good :)