Skip to content
/ TransOMS Public

State-of-the-art open-source applications for Transportation Optimization, Modeling, and Simulation

License

Notifications You must be signed in to change notification settings

jdlph/TransOMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TransOMS

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.

Design

Extensive efforts have been or will be in place to ensure its appearance and performance.

Appearance

High-Quality and Cross-Platform

  1. Follow the best coding practices including the C++ Core Guidelines.
  2. Prepare the source code in modern C++ (up to C++17) and avoid vendor-specific features.
  3. Use CMake to define the build process across platforms.

Modern Configuration and Data Interchange

  1. Ditch the legacy settings.csv and use Yaml for configuration.
  2. Introduce JSON as additional format to CSV for data interchange.

Performance

Faster Path Engine

  1. Adopt the most efficient deque implementation of the modified label correcting (MLC) algorithm from Path4GMNS.
  2. Implement heap-Dijkstra's algorithm as an alternative path engine (for speed comparison).
  3. 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.

Better Memory Management

  1. Avoid unnecessary copying through the move semantics.
  2. 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.
  3. Maintain the link predecessor only as node predecessor can be easily inferred from link predecessor.
  4. Only keep link path in memory and derive node path when needed.

Flying and Portable I/O

  1. Adopt the memory-mapping-based MIOCSV to handle CSV parsing and writing, which works seamless on different OS's and platforms.
  2. Eliminate unnecessary buffer flushing (i.e., use '\n' rather than std::endl).
  3. Use multithreading to boost the I/O-bounded processes.

Note

Other potential enhancements are documented in Refactoring.

Implementation Status

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.

  1. Cross-Platform Support
    • Windows (x86_64)
    • Linux (x86_64)
    • macOS (x86_64)
    • macOS (Apple Silicon)
  2. Modern Configuration and Data Interchange Support
    • Support of YAML files (as configuration)
    • Support of JSON files (as input and output files)
  3. 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
  4. 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
  5. DTA
    • Simulation-based DTA
      • Point queue model
      • Spatial queue model
      • Kinematic wave model
    • Analytical DTA
  6. ODME
    • Load flow measurements from input
    • ODME core scheme
  7. 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
  8. Parallelization
    • UE
    • DTA

Benchmark

Coming soon!

Build

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.

Reference

  1. Li, P. and Zhou, X. (2023, August 15). Path4GMNS. Retrieved from https://github.com/jdlph/Path4GMNS.
  2. 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.

About

State-of-the-art open-source applications for Transportation Optimization, Modeling, and Simulation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published