Co-optimisation tool of charging infrastructure investment and electric fleet operations
EFleetPlan is a Python-based open source tool for optimizing charging infrastructure and operations for electric light commercial vehicles (LCVs).
Carolina Gil Ribeiro and Jagruti Thakur
This software is licensed under the MIT License.
See the LICENSE file for details.
If you use eFleetPlan, please cite: **Gil Ribeiro, C and Thakur, J, eFleetPlan: Co-optimisation tool of Charging Infrastructure Investment and Fleet Operations, 2025. DOI:xxxxxxx
eFleetPlan/
├── config/ # All configuration files
│ ├── predefined/ # Predefined parameter sets
│ │ ├── companies.yaml
│ │ ├── infrastructure_configuration.yaml
│ │ ├── schedules.yaml
│ │ └── vehicles.yaml
│ ├── config_loader_schedule.py # Config loader for schedule generation
│ ├── config_loader_optimisation.py# Config loader for optimisation
│ ├── env.yaml # Environment settings
│ ├── run_FleetSchedule_Config.yaml# Schedule generation run configuration
│ └── run_Optimisation_Config.yaml # Optimisation run configuration
├── data/
│ ├── Input/ # Energy consumption and electricity price files
│ └── Output/ # Results files
├── docs/ # Documentation
├── notebooks/
│ ├── 1_Fleet_Operation_simulation.ipynb
│ └── 2_Co-optimisation.ipynb
├── src/
│ └── efleetplan/
│ ├── _1_schedule/ # Fleet operation simulation package
│ │ ├── generate_graphs.py
│ │ └── schedule_generation.py
│ └── _2_optimisation/ # Co-optimisation package
│ ├── co_optimisation.py
│ └── optimisation_graphs.py
├── pyproject.toml
├── MANIFEST.in
└── mkdocs.yml
- Python 3.9 or later
- Solver for optimisation: default is Gurobi Optimizer with a valid license but can be changed for other solver in the co_optimisation.py file
git clone https://github.com/mcarolinagilr/eFleetPlan.git
cd eFleetPlanLinux / macOS:
python -m venv venv
source venv/bin/activate
pip install .Windows:
python -m venv venv
venv\Scripts\activate
pip install .python -m efleetplanThis confirms that all dependencies (including Gurobi) are correctly installed.
All parameters are configured through YAML files in the config/ directory. There is no need to edit the notebooks or Python source code.
Defines global settings such as file paths, simulation period, time resolution, and the random seed.
Controls how fleet operational schedules are generated: the schedule name, number of vehicles, schedule and vehicle mix, and company type. User can use predefined parameters or define custom values.
Predefined values are loaded from config/_1_predefined/.
Defines settings for the Co-optimisation model: which schedule to optimise, fleet size, solver gap tolerance, and infrastructure configuration (Cost and power parameters). User can use predefined parameters or define custom values.
Predefined values are loaded from config/_1_predefined/infrastructure_configuration.yaml.
Contains reusable definitions for vehicles, schedules, companies, and infrastructure. These can be extended with new entries as needed.
Place the following files in this folder before running the tool:
- Energy consumption factor file — energy consumption factor, that is linked to the environment temperature.
- Electricity price file — time-series electricity prices for the simulation period.
EFleetPlan is run through two Jupyter notebooks. Both notebooks load their configuration from the YAML files described above, so all parameter changes should be made there before launching.
Notebook: notebooks/1_Fleet_Operation_simulation.ipynb
Generates operational schedules (travel and charging patterns) for an electric LCV fleet based on the configured parameters. The notebook validates inputs, runs the generation, and produces visualisations of the resulting schedules.
Workflow:
- Edit
config/env.yamlandconfig/run_FleetSchedule_Config.yamlwith your desired settings. - Open the notebook and run all cells.
- Review the validation checks and output graphs.
- Outputs are saved to
data/Output/<schedule_name>/.
Notebook: notebooks/2_Co-optimisation.ipynb
Solves the cost-minimisation model that jointly optimises charging infrastructure investment and fleet charging operations. Requires Gurobi and a schedule generated by Package 1.
Workflow:
- Edit
config/run_Optimisation_Config.yamlwith the target schedule and solver settings. - Open the notebook and run all cells.
- Review the optimisation results and summary visualisations.
- Results are saved to
data/Output/<schedule_name>/Results/.
# From the project root
jupyter lab
# or
jupyter notebookOpen the notebook for the Package you want to run and execute cells from top to bottom.
Package 1 produces CSV files with the generated fleet schedules and accompanying graphs in data/Output/<schedule_name>/.
Package 2 produces several result files in data/Output/<schedule_name>/Results/, including the main decision variables, per-vehicle results, summary tables, and hourly aggregated statistics (averages and maxima).