A comprehensive research framework for analyzing the electrification potential of commercial truck fleets, including energy consumption simulation, charging infrastructure requirements, and operational optimization strategies.
Anna Paper, M.Sc.
Institute of Automotive Technology
Department of Mobility Systems Engineering
TUM School of Engineering and Design
Technical University of Munich
anna.paper@tum.de
2025
Georg Balke, M.Sc. - Research Associate 07/2021 - 12/2025
Philip Rosborough, B.Sc. - Semester thesis 11/2024 - 06/2025
This repository contains the complete analysis framework for studying truck fleet electrification, including:
- Data Processing: GPS tracking data analysis and tour reconstruction (CSV-based)
- Energy Simulation: Battery electric truck energy consumption modeling using BETOS framework
- Charging Analysis: Load profile generation and charging infrastructure requirements
- Operational Optimization: Fleet operation strategies and charging management
- Visualization: Professional plotting and analysis tools
Important: This framework has been updated to use CSV files instead of database queries, making it more accessible and easier to deploy without database setup requirements.
Clone the repository from GitHub:
git clone https://github.com/[your-username]/sm-truck-fleet-electrification-paper.git # TODO: Anpassen
cd sm-truck-fleet-electrification-paper # TODO: AnpassenIt is recommended to create and activate a clean virtual environment for the installation. This can be done using conda:
conda create -n truck_electrification python=3.8 # TODO: Anpassen
conda activate truck_electrification # TODO: Anpassen
Or alternatively with venv:
```bash
python -m venv truck_electrification_env # TODO: Anpassen
source truck_electrification_env/bin/activate # On Windows: truck_electrification_env\Scripts\activate # TODO: AnpassenInstall all required packages using the provided environment file:
conda env update -f environment.ymlOr install manually (CSV-based workflow):
pip install pandas==2.0.3 seaborn matplotlib==3.7.2 plotly ipykernel ipywidgets scienceplotsNote: The following packages are no longer required for the CSV-based workflow:
- sqlalchemy, geopandas, psycopg2 (database operations)
- shapely, contextily (spatial analysis)
- fpdf, svgpathtools, svgpath2mpl (legacy utilities)
sm-truck-fleet-electrification-paper/
├── data_handling/ # Data processing and acquisition modules
│ ├── data_processing.py # Core data processing functions
│ ├── data_recordings.py # Data recording utilities
│ └── data-aquisition.ipynb # Data acquisition notebook
├── energy_sim/ # Energy simulation framework
│ ├── BETOS_Framework/ # BETOS energy simulation framework
│ ├── sequential_analysis.py # Sequential analysis functions
│ ├── load_profile.py # Charging load profile generation
│ └── energy_sim_functions.py # Energy simulation utilities
├── utils/ # Utility functions and configuration
│ ├── style_config.py # Plotting style configuration
│ └── utilities.py # Database utilities (OBSOLETE - CSV-based workflow)
├── input/ # Input data files
│ ├── home/ # Fleet data
│ └── stations/ # Charging station data
├── output/ # Generated outputs
│ ├── figures/ # Generated plots and visualizations
│ ├── csvs/ # Processed data files
│ └── charging_loads/ # Charging load profiles
├── main_data_analysis.ipynb # Main data analysis notebook
├── main_energy_sim.ipynb # Main energy simulation notebook
└── environment.yml # Conda environment specification
The analysis follows a sequential workflow:
-
Data Acquisition (
data_handling/data-aquisition.ipynb)- Load data from CSV files (no database required)
- Process GPS tracking data
- Extract tour and track information
- Clean and validate data
-
Data Analysis (
main_data_analysis.ipynb)- Analyze fleet operational patterns
- Generate descriptive statistics
- Create operational visualizations
-
Energy Simulation (
main_energy_sim.ipynb)- Simulate energy consumption for each track
- Calculate battery state of charge (SoC) profiles
- Generate charging load profiles
- Analyze charging infrastructure requirements
jupyter notebookThen open the notebooks in the following order:
data_handling/data-aquisition.ipynbmain_data_analysis.ipynbmain_energy_sim.ipynb
python -m jupyter notebook main_data_analysis.ipynb
python -m jupyter notebook main_energy_sim.ipynb- Multi-Scenario Analysis: Compare different charging strategies and battery configurations
- Load Profile Generation: Calculate charging demand profiles for infrastructure planning
- Fleet Optimization: Analyze operational patterns and optimization opportunities
- Professional Visualization: Publication-ready plots with TUM styling
The analysis supports multiple scenarios defined in main_energy_sim.ipynb:
- Default: 572 kWh battery, 150 kW home charging
- Big Battery: 798 kWh battery, 150 kW home charging
- Destination Charging: 572 kWh battery, 150 kW home + 350 kW destination charging
- Low Home: 572 kWh battery, 50 kW home charging
- High Home: 572 kWh battery, 350 kW home charging
- Ultra Home: 572 kWh battery, 10 MW home charging
Professional plotting styles are configured in utils/style_config.py with TUM color schemes and publication-ready formatting.
The analysis generates several output files:
- Figures: PDF and SVG plots in
output/figures/ - Data: Processed CSV files in
output/csvs/ - Load Profiles: Charging demand profiles in
output/charging_loads/ - Tour Data: Aggregated tour statistics and energy consumption
- Python 3.8.12
- pandas 2.0.3
- matplotlib 3.7.2
- seaborn
- numpy
- BETOS Framework (included in energy_sim/)
- Plotly (for interactive visualizations)
- SQLAlchemy (was used for database operations - no longer required)
- GeoPandas (was used for spatial analysis - no longer required)
- psycopg2 (was used for PostgreSQL connection - no longer required)
For contributing to the code please contact:
Anna Paper Institute of Automotive Technology Technical University of Munich
mail: anna.paper@tum.de
V1.1
Copyright 2025 Anna Paper
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
If you use this code in your research, please cite the corresponding article and dataset:
[```bibtex @article{Paper2025, title={Assessing battery electric truck feasibility in heavy-duty logistics fleets: Insights from GPS-based energy simulations and charging load profiles}, author={Paper, Anna and Balke, Georg and Rosborough, Philip and Brödel, Marcel and Klein, Niclas and Lienkamp, Markus}, journal={Journal Name}, #TODO: ergänzen year={2025}, #TODO: ergänzen publisher={Publisher} #TODO: ergänzen }
Dataset: https://zenodo.org/records/16411298
## Acknowledgments
- Technical University of Munich for research support
- BETOS Framework developers
- Contributors and research partners