Skip to content

Commit 41422cb

Browse files
committed
updated book to make sure users know how to modify data files in demos
1 parent 1444889 commit 41422cb

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

README.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,21 @@ With your activated Python environment with ALTRIOS fully installed, you can dow
110110
import altrios as alt
111111
alt.copy_demo_files()
112112
```
113-
114113
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](https://code.visualstudio.com/Download), [Spyder](https://www.spyder-ide.org/)), 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.
115114

115+
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.
116+
```python
117+
res = alt.ReversibleEnergyStorage.from_file(
118+
alt.resources_root() / "powertrains/reversible_energy_storages/Kokam_NMC_75Ah_flx_drive.yaml"
119+
)
120+
```
121+
would become
122+
```python
123+
res = alt.ReversibleEnergyStorage.from_file(
124+
"./custom_battery.yaml"
125+
)
126+
```
127+
116128
## Acknowledgements
117129

118130
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.

python/altrios/demos/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"""
2+
Module containing demo files. Be sure to check out https://nrel.github.io/altrios/#how-to-run-altrios.
3+
"""

0 commit comments

Comments
 (0)