realtwin
ORNL’s Real-Twin project is a streamlined scenario generation tool that automatically integrates real-world traffic data to create high-fidelity digital twins for simulating the impacts of connected and automated vehicles in microsimulation environments.
Science Score: 39.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 9 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.9%) to scientific vocabulary
Keywords
Repository
ORNL’s Real-Twin project is a streamlined scenario generation tool that automatically integrates real-world traffic data to create high-fidelity digital twins for simulating the impacts of connected and automated vehicles in microsimulation environments.
Basic Info
- Host: GitHub
- Owner: ORNL-Real-Sim
- License: gpl-3.0
- Language: Python
- Default Branch: main
- Homepage: https://real-twin.readthedocs.io/en/latest/index.html#
- Size: 98.6 MB
Statistics
- Stars: 9
- Watchers: 0
- Forks: 2
- Open Issues: 11
- Releases: 2
Topics
Metadata Files
README.md
<!-- gh-dependents-info-used-by-start --><!-- gh-dependents-info-used-by-end -->
Real-Twin
Real-Twin: A Unified Simulation Scenario Generation Tool for Mobility Research
Real-Twin is a unified, simulation platform-agnostic scenario generation tool designed to streamline and standardize the evaluation of emerging mobility technologies. It provides an end-to-end framework that includes robust workflows, integrated tools, and comprehensive metrics to generate, calibrate, and benchmark microscopic traffic simulation scenarios across multiple platforms.
Key Features
- Unified Scenario Generation: Generate transferable, simulation-ready scenarios from heterogeneous data sources using a consistent workflow.
- Automated Calibration Workflow: Bridges simulation and real-world data, minimizing manual effort and making traffic simulation more accessible to researchers and engineers.
- Simulation Platform Compatibility: Supports SUMO, VISSIM, and AIMSUN for cross-platform scenario generation and benchmarking. Enables reliable comparisons and reproducibility across different simulation tools.
- Consistent Scenarios across Different Simulators: Generate comparable simulation scenarios across different microscopic traffic simulators, providing users the ability to conduct benchmarking and cross-validation that are crucial for ensuring the reliability and reproducibility of simulation results.
- Emerging Technology Support: Includes a scenario database and pipeline for studying autonomous vehicles (AVs), with planned extensions to CAVs, EVs, and other advanced technologies.
Installation
python
pip install realtwin
Documentation
User guide and API documentation can be found at: Official Documentation
Quick Example - realtwin
```python
import realtwin as rt
Please refer to the official documentation for more details on RealTwin preparation before running the simulation
if name == 'main':
# Step 1: Prepare your configuration file (in YAML format)
CONFIG_FILE = "./realtwin_config.yaml"
# Step 2: initialize the realtwin object
twin = rt.RealTwin(input_config_file=CONFIG_FILE, verbose=True)
# Step 3: check simulator env: if SUMO, VISSIM, Aimsun, etc... are installed
twin.env_setup(sel_sim=["SUMO", "VISSIM"])
# Step 4: Create Matchup Table from SUMO network
updated_sumo_net = r"./datasets/example2/chatt.net.xml"
twin.generate_inputs(incl_sumo_net=updated_sumo_net)
# BEFORE step 5, there are three steps to be performed:
# 1. Prepare Traffic Demand and save it to Traffic Folder in input directory
# 2. Prepare Control Data (Signal) and save it to Control Folder in input directory
# 3. Manually fill in the Matchup Table in the input directory
# Step 5: generate abstract scenario
twin.generate_abstract_scenario()
# AFTER step 5, Double-check the Matchup Table in the input directory to ensure it is correct.
# Step 6: generate scenarios
twin.generate_concrete_scenario()
# Step 7: simulate the scenario
twin.prepare_simulation()
# Step 8: perform calibration, Available algorithms: GA: Genetic Algorithm, SA: Simulated Annealing, TS: Tabu Search
twin.calibrate(sel_algo={"turn_inflow": "GA", "behavior": "GA"})
# Step 9 (ongoing): post-process the simulation results
twin.post_process() # keyword arguments can be passed to specify the post-processing options
# Step 10 (ongoing): visualize the simulation results
twin.visualize() # keyword arguments can be passed to specify the visualization options
```
Quick Example - Autonomous Vehicle
```python import realtwin as rt
Please refer to the official documentation for more details on RealTwin preparation before running the simulation
if name == 'main':
# Step 1: Prepare/generate configuration file (in YAML format)
rt.prepare_av_configs()
CONFIG_FILE = "path-to-generated-config-file"
# Step 2: Update the configuration file
# Manually update the configuration file from User.
# Step 3: initialize the SimAV object
sim = rt.SimAV(input_config_file=CONFIG_FILE, verbose=True)
# Step 4: Simulation generation
sim.run_simulation()
```
Call for Contributions
The realtwin project welcomes your expertise and enthusiasm!
Small improvements or fixes are always appreciated. If you run into any problems, find bugs, or think of useful improvements and enhancements, feel free to open an issue. If you add a feature or fix a bug yourself and want it considered for integration, feel free to open a pull request with the changes. Please provide a detailed description of what the pull request is doing and briefly list any significant changes made. If it's in regards to a specific issue, please include or link the issue number.
Writing code isn't the only way to contribute to realtwin. You can also:
- review pull requests
- help us stay on top of new and old issues
- develop tutorials, presentations, and other educational materials
- develop graphic design for our brand assets and promotional materials
- translate website content
- help with outreach and onboard new contributors
- write grant proposals and help with other fundraising efforts
For more information about the ways you can contribute to realtwin, visit our GitHub. If you' re unsure where to start or how your skills fit in, reach out! You can ask by opening a new issue or leaving a comment on a relevant issue that is already open on GitHub.
Funding
This work is supported by the US Department of Energy, Vehicle Technologies Office, Energy Efficient Mobility Systems (EEMS) program, under project Real-Twin (EEMS114).
Citation
To cite usage of Real-Twin, please use the folowing bibtex:
```bibtex @article{xu2025automated, title = {Developing An Automated Microscopic Traffic Simulation Scenario Generation Tool}, author = {Xu, Guanhao and Saroj, Abhilasha and Wang, Chieh (Ross) and Shao, Yunli}, journal = {Transportation Research Record}, year = {2025}, doi = {https://doi.org/10.1177/03611981251349433}, publisher = {SAGE for the National Academy of Sciences: Transportation Research Board}, note = {In Press} }
@misc{ doecode_147051, title = {Real-Twin}, author = {Wang, Chieh (Ross) and Xu, Guanhao and Saroj, Abhilasha and Luo, Xiangyong (Roy) and Yuan, Jinghui and Shao, Yunli}, abstractNote = {Real-Twin is a unified, model-agnostic scenario generation tool designed to streamline and standardize the evaluation of emerging mobility technologies. It provides an end-to-end framework that includes robust workflows, integrated tools, and comprehensive metrics to generate, calibrate, and benchmark microscopic traffic simulation scenarios across multiple platforms. Key Features of Real-Twin include: - Unified Scenario Generation: generate transferable, simulation-ready scenarios from heterogeneous data sources using a consistent workflow. - Automated Calibration Workflow: bridges simulation and real-world data, minimizing manual effort and making traffic simulation more accessible to researchers and engineers. - Model-Agnostic Compatibility: supports SUMO, VISSIM, and AIMSUN for cross-platform scenario generation and benchmarking. Enables reliable comparisons and reproducibility across different simulation tools. - Consistent Scenarios across Different Simulators: generate comparable simulation scenarios across different microscopic traffic simulators, providing users the ability to conduct benchmarking and cross-validation that are crucial for ensuring the reliability and reproducibility of simulation results. - Emerging Technology Support: includes a scenario database and pipeline for studying autonomous vehicles (AVs), with planned extensions to CAVs, EVs, and other advanced technologies.}, doi = {10.11578/dc.20250602.3}, url = {https://doi.org/10.11578/dc.20250602.3}, howpublished = {[Computer Software] \url{https://doi.org/10.11578/dc.20250602.3}}, year = {2025}, month = {jun} }
@software{luo2025realtwin, author = {Luo, Xiangyong and Xu, Guanhao and Saroj, Abhilasha and Yuan, Jinghui and Shao, Yunli and Wang, Chieh (Ross)}, doi = {https://doi.org/10.11578/dc.20250602.3}, month = jun, title = {realtwin: A Unified Simulation Scenario Generation Tool for Mobility Research}, url = {https://github.com/ORNL-Real-Sim/Real-Twin}, version = {0.1.0}, year = {2025} } ```
Owner
- Name: ORNL-Real-Sim
- Login: ORNL-Real-Sim
- Kind: organization
- Repositories: 1
- Profile: https://github.com/ORNL-Real-Sim
GitHub Events
Total
- Create event: 7
- Issues event: 14
- Release event: 1
- Watch event: 7
- Delete event: 2
- Member event: 1
- Issue comment event: 1
- Public event: 1
- Push event: 52
- Pull request event: 9
- Fork event: 3
Last Year
- Create event: 7
- Issues event: 14
- Release event: 1
- Watch event: 7
- Delete event: 2
- Member event: 1
- Issue comment event: 1
- Public event: 1
- Push event: 52
- Pull request event: 9
- Fork event: 3
Packages
- Total packages: 1
-
Total downloads:
- pypi 43 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 1
pypi.org: realtwin
A Unified Simulation Scenario Generation Tool for Mobility Research
- Homepage: https://github.com/ORNL-Real-Sim/Real-Twin
- Documentation: https://real-twin.readthedocs.io/en/latest/
- License: gpl-3.0
-
Latest release: 0.1.0
published 9 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v4 composite
- actions/download-artifact v4 composite
- actions/setup-python v5 composite
- actions/upload-artifact v4 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- actions/upload-artifact v4 composite
- nbsphinx * development
- numpydoc * development
- pandas ==2.2.3 development
- pylint * development
- pytest * development
- pyufunc * development
- rich * development
- sphinx ==7.4.6 development
- sphinx-design * development
- sphinx-hoverxref * development
- sphinx-multiproject * development
- sphinx-notfound-page * development
- sphinx-prompt * development
- sphinx-rtd-theme * development
- sphinx-tabs * development
- sphinx_copybutton * development
- sphinxcontrib-applehelp * development
- sphinxcontrib-devhelp * development
- sphinxcontrib-htmlhelp * development
- sphinxcontrib-httpdomain * development
- sphinxcontrib-jquery * development
- sphinxcontrib-jsmath * development
- sphinxcontrib-qthelp * development
- sphinxcontrib-serializinghtml * development
- sphinxcontrib-video * development
- sphinxemoji * development
- sphinxext-opengraph * development
- tqdm * development
- urllib3 >=2.2.1 development
- PyYAML *
- Requests *
- Shapely *
- folium *
- matplotlib *
- mealpy *
- networkx *
- openpyxl *
- osmnx *
- pandas *
- pyproj *
- pyufunc >=0.4.1
- rich *
- sumolib *
- traci *
- xlrd *
- actions/checkout v4 composite
- nvuillam/github-dependents-info v1.6.3 composite
- peter-evans/create-pull-request v6 composite