TransOMS is a suite of state-of-the-art open-source applications for Transportation Optimization, Modeling, and Simulation, which brings the cutting-edge researches and the enterprise-grade implementations all together into one place.
One of its major components is a modern, cross-platform, and lightning-fast dynamic traffic assignment (DTA) system. It features a complete redesign of DTALite using Modern C++ and enhancement to its core algorithms according to the deeply optimized Path4GMNS. Additional features are underway, including origin-destination demand estimation (ODME), fluid-queue-based analytical DTA, and more.
Extensive efforts have been or will be in place to ensure its appearance and performance.
- Follow the best coding practices including the C++ Core Guidelines.
- Prepare the source code in modern C++ (up to C++17) and avoid vendor-specific features.
- Use CMake to define the build process across platforms.
- Ditch the legacy settings.csv and use Yaml for configuration.
- Introduce JSON as additional format to CSV for data interchange.
- Adopt the most efficient deque implementation of the modified label correcting (MLC) algorithm from Path4GMNS.
- Implement heap-Dijkstra's algorithm as an alternative path engine (for speed comparison).
- Store columns between each OD pair in a hash table along with a customer hash function for column. This enables a constant-time check on whether a newly identified column / path is existing or not. Its background information can be found here.
- Avoid unnecessary copying through the move semantics.
- Fully utilize stack memory. Directly store / move some objects into a container (with the move semantics) and retrieve them later without restoring heap memory (as pointers). This can improve the performance, reduce potential memory fragmentation, and prevent possible risk of memory leak.
- Maintain the link predecessor only as node predecessor can be easily inferred from link predecessor.
- Only keep link path in memory and derive node path when needed.
- Adopt the memory-mapping-based MIOCSV to handle CSV parsing and writing, which works seamless on different OS's and platforms.
- Eliminate unnecessary buffer flushing (i.e., use '\n' rather than std::endl).
- Use multithreading to boost the I/O-bounded processes.
Note
Other potential enhancements are documented in Refactoring.
The major functionalities and their implementation statuses are updated on an irregular basis. For the ongoing development and other backlogged / completed enhancement tasks, please see Projects for details.
- Cross-Platform Support
- Windows (x86_64)
- Linux (x86_64)
- macOS (x86_64)
- macOS (Apple Silicon)
- Modern Configuration and Data Interchange Support
- Support of YAML files (as configuration)
- Support of JSON files (as input and output files)
- Path Engine
- The deque implementation of the MLC algorithm
- Heap-Dijkstra's algorithm
- A special min-heap that guarantees logarithmic time pop() to be used with heap-Dijkstra's algorithm
- User Equilibrium (UE)
- Path-based UE using gradient projection
- Elimination of ultra-low-volume columns
- An enhanced flow shifting scheme to further improve the convergency
- DTA
- Simulation-based DTA
- Point queue model
- Spatial queue model
- Kinematic wave model
- Analytical DTA
- Simulation-based DTA
- ODME
- Load flow measurements from input
- ODME core scheme
- Result Output
- UE flow assignment
- columns.csv
- columns.json
- Link performance under UE
- link_performance_ue.csv
- link_performance_ue.json
- Link performance under DTA
- link_performance_dta.csv
- link_performance_dta.json
- Agent trajectory under DTA
- trajectories.csv
- trajectories.json
- UE flow assignment
- Parallelization
- UE
- DTA
Coming soon!
TransOMS is built on C++17 with yaml-cpp parsing configuration file and OpenMP managing parallelization.
Important
yaml-cpp is precompiled as a static library and embedded in lib. Make sure you use Clang as the complier for macOS. Using g++ will lead to compatibility issue with yaml-cpp, which is built using Clang.
Important
OpenMP requires an additional runtime library. Its detailed installation instruction is summarized here.
The build process is defined in CMakeLists.txt along with the above dependency specifications. You will need CMake (3.1.0 or higher) to build the executable by running the following commands.
# from the root directory of TransOMS
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Release
$ cmake --build .
The default build is single-processing. To enable parallelization (multiprocessing), you will need to pass PARALLEL=ON (as an option) to CMake.
# from the root directory of TransOMS
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Release -DPARALLEL=ON
$ cmake --build .
Many modern IDEs or text editors (e.g., VS Code) support CMake as an alterative build system, which offers an integrated experience of building, debugging, and testing a CMake project. If you want to take this advantage, a step-by-step tutorial on VS Code is listed here. The comprehensive documentation can be retrieved on GitHub.
- Li, P. and Zhou, X. (2023, August 15). Path4GMNS. Retrieved from https://github.com/jdlph/Path4GMNS.
- Lu, C. C., Mahmassani, H. S., Zhou, X. (2009). Equivalent gap function-based reformulation and solution algorithm for the dynamic user equilibrium problem. Transportation Research Part B: Methodological, 43, 345-364.