Tool for modeling and optimization of advanced locomotive powertrains for freight rail decarbonization.
Project description
ALTRIOS
The Advanced Locomotive Technology and Rail Infrastructure Optimization System (ALTRIOS) is a unique, fully integrated, open-source software tool to evaluate strategies for deploying advanced locomotive technologies and associated infrastructure for cost-effective decarbonization. ALTRIOS simulates freight-demand driven train scheduling, mainline meet-pass planning, locomotive dynamics, train dynamics, energy conversion efficiencies, and energy storage dynamics of line-haul train operations. Because new locomotives represent a significant long-term capital investment and new technologies must be thoroughly demonstrated before deployment, this tool provides guidance on the risk/reward tradeoffs of different technology rollout strategies. An open, integrated simulation tool is invaluable for identifying future research needs and making decisions on technology development, routes, and train selection. ALTRIOS was developed as part of a collaborative effort by a team comprising The National Renewable Energy Laboratory (NREL), University of Illinois Urbana-Champaign (UIUC), Southwest Research Institute (SwRI), and BNSF Railway.
Much of the core code in ALTRIOS is written in the Rust Programming Language to ensure excellent computational performance and robustness, but we've built ALTRIOS with the intent of users interacting with the code through our feature-rich Python interface.
Installation
If you are an ALTRIOS developer, see Developer Documentation. Otherwise, read on.
Python Setup
- Python installation options:
- Option 1 -- Python: https://www.python.org/downloads/. We recommend Python 3.10. Be sure to check the
Add to PATH
option during installation. - Option 2 -- Anaconda: we recommend https://docs.conda.io/en/latest/miniconda.html.
- Option 1 -- Python: https://www.python.org/downloads/. We recommend Python 3.10. Be sure to check the
- Setup a python environment. ALTRIOS can work with Python 3.9, or 3.10, but we recommend 3.10 for better performance and user experience. Create a python environment for ALTRIOS with either of two methods:
- Option 1 -- Python Venv
- Navigate to your project folder in which you'd like to store model data and run ALTRIOS.
- Assuming you have Python 3.10 installed, run
python3.10 -m venv altrios-venv
in your terminal enviroment (we recommend PowerShell in Windows, which comes pre-installed). This tells Python 3.10 to use thevenv
module to create a virtual environment (which will be ignored by git if namedaltrios-venv
) in theALTRIOS/altrios-venv/
. - Activate the environment you just created to install packages or anytime you're running ALTRIOS:
- Mac and Linux:
source altrios-venv/bin/activate
- Windows:
altrios-venv/Scripts/activate.bat
in a windows command prompt or power shell orsource ./altrios-venv/scripts/activate
in git bash terminal - When the environment is activated, your terminal session will have a decorator that looks like
(altrios-venv)
.
- Mac and Linux:
- Option 2 -- Anaconda:
- Open an Anaconda prompt (in Windows, we recommend Anaconda Powershell Prompt) and run the command
conda create -n altrios python=3.10
to create an Anaconda environment namedaltrios
. - Activate the environment to install packages or anytime you're running ALTRIOS: run
conda activate altrios
.
- Open an Anaconda prompt (in Windows, we recommend Anaconda Powershell Prompt) and run the command
- Option 1 -- Python Venv
ALTRIOS Setup
With your Python environment activated, run pip install altrios
.
Congratulations, you've completed installation! Whenever you need to use ALTRIOS, be sure to activate your python environment created above.
How to run ALTRIOS
With your activated Python environment with ALTRIOS fully installed, you can download the demo scripts to the current working directory inside of a demos/
folder with:
import altrios as alt
alt.copy_demo_files()
You can run the Simulation Manager through a multi-week simulation of train operations in by running python sim_manager_demo.py
in demos/
. This will create a plots/
subfolder in which the plots will be saved. To run interactively, fire up a Python IDE (e.g. VS Code, Spyder), and run the file. If you're in VS Code, you can run the file as a virtual jupyter notebook because of the "cells" that are marked with the # %%
annotation. You can click on line 2, for example, and hit <Shift> + <Enter>
to run the current cell in an interactive terminal (which will take several seconds to launch) and advance to the next cell. Alternatively, you can hit <Ctrl> + <Shift> + p
to enable interactive commands and type "run current cell". There are several other python files in the demos/
folder to demonstrate various capabilities of ALTRIOS.
If you plan to modify the data used in the demo files, copy the data files to your local directory and load them from there, e.g.
res = alt.ReversibleEnergyStorage.from_file(
alt.resources_root() / "powertrains/reversible_energy_storages/Kokam_NMC_75Ah_flx_drive.yaml"
)
would become
res = alt.ReversibleEnergyStorage.from_file(
"./custom_battery.yaml"
)
Nearly every code object in ALTRIOS can be read from or written to common data formats. For more details, see the SerdeAPI trait documentation. All of the functions in the SerdeAPI are available through the python interface.
Acknowledgements
The ALTRIOS Team would like to thank ARPA-E for financially supporting the research through the LOCOMOTIVES program and Dr. Robert Ledoux for his vision and support. We would also like to thank the ARPA-E team for their support and guidance: Dr. Apoorv Agarwal, Mirjana Marden, Alexis Amos, and Catherine Good. We would also like to thank BNSF for their cost share financial support, guidance, and deep understanding of the rail industry’s needs. Additionally, we would like to thank Jinghu Hu for his contributions to the core ALTRIOS code. We would like to thank Chris Hennessy at SwRI for his support. Thank you to Michael Cleveland for his help with developing and kicking off this project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for altrios-0.2.3-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8c4f627a9529762184b121f670addab9cc3dccbca289bf306c63a8e27391e21 |
|
MD5 | 96e74ec1b1f8aeaf1e049b78d62cfd46 |
|
BLAKE2b-256 | 706c7d3c292c16a161dc9123a374516729367e2aaba2faa637b1d233691daac3 |
Hashes for altrios-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fb57f06d9782d048e75e2ecfdec7db23f306f0939746b02b2a929397352ab16 |
|
MD5 | 7049500b8da75b004090feee21be35f3 |
|
BLAKE2b-256 | 3ca7f20396689016b1a88b4251635135d33fa6db88fbb82450e06aa3bfa06b72 |
Hashes for altrios-0.2.3-cp310-cp310-macosx_11_0_arm64.macosx_10_12_universal2.macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 360b7f5eae866736332fc3939d5173d1eccf0ead0bdee5409511b8e2e8e42191 |
|
MD5 | 42f47cb63043cb37415a4540b2f83a3b |
|
BLAKE2b-256 | 0f77aebeeb6958b329c4b2ba614bdc4b525c466aaec73bef926733947c40ad8d |
Hashes for altrios-0.2.3-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d007f34332071aa5f734c97e203df52afd371821fa1ffc58ef0a3b3ba61be7e7 |
|
MD5 | f2203696cccb2934c6502fc5d94f671d |
|
BLAKE2b-256 | ece71de03b96aebfbd097187a19164ad5e4daf85bc20477da5e2bed3bfc1fef5 |
Hashes for altrios-0.2.3-cp39-cp39-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3984d5c526079ab7bd4ef9a620a387e3acfc19cac3237e60c5ecc2edd971b57 |
|
MD5 | e5db0d6a6494238f677da355f3486f8a |
|
BLAKE2b-256 | 3b67ebd2b98c8e2f4aea4ea5562884174b623a14f78415bb6c8c840f2fb4b96a |
Hashes for altrios-0.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aa005c6aea7b1f1f7a93e63345afa2b955b53011005fd8fbae9e94ae7d1889d |
|
MD5 | 1283801859f4c35a856daefaa09d5b0e |
|
BLAKE2b-256 | 436624294e4331152692287967efde47956ce38581b833ebe5c00180bf42ed5b |
Hashes for altrios-0.2.3-cp39-cp39-macosx_10_12_x86_64.macosx_10_12_universal2.macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d90b6b2091cad08652edf6629429b1bb9fd58910ac21f26267a9cf4f5371506 |
|
MD5 | dda4a68d074c7d7f2687a8357c9cb7b1 |
|
BLAKE2b-256 | efe83405f5e3b527c9b83ec446bac4986797579be2831a49846f47a3cad589a2 |