efleetplan 1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. efleetplan-1.3/.gitignore +7 -0
  2. efleetplan-1.3/LICENSES/License.txt +21 -0
  3. efleetplan-1.3/PKG-INFO +227 -0
  4. efleetplan-1.3/README.md +203 -0
  5. efleetplan-1.3/config/_1_predefined/companies.yaml +137 -0
  6. efleetplan-1.3/config/_1_predefined/infrastructure_configuration.yaml +53 -0
  7. efleetplan-1.3/config/_1_predefined/schedules.yaml +52 -0
  8. efleetplan-1.3/config/_1_predefined/vehicles.yaml +25 -0
  9. efleetplan-1.3/config/_2_Ilustrative_examples/run_FleetSchedule_Config_Example1.yaml +74 -0
  10. efleetplan-1.3/config/_2_Ilustrative_examples/run_FleetSchedule_Config_Example2.yaml +78 -0
  11. efleetplan-1.3/config/_2_Ilustrative_examples/run_FleetSchedule_Config_example3.yaml +74 -0
  12. efleetplan-1.3/config/_2_Ilustrative_examples/run_FleetSchedule_Config_example4.yaml +75 -0
  13. efleetplan-1.3/config/_2_Ilustrative_examples/run_Optimisation_Config_example1.yaml +68 -0
  14. efleetplan-1.3/config/_2_Ilustrative_examples/run_Optimisation_Config_example2.yaml +68 -0
  15. efleetplan-1.3/config/_2_Ilustrative_examples/run_Optimisation_Config_example3.yaml +68 -0
  16. efleetplan-1.3/config/_2_Ilustrative_examples/run_Optimisation_Config_example4.yaml +68 -0
  17. efleetplan-1.3/config/env.yaml +25 -0
  18. efleetplan-1.3/config/run_FleetSchedule_Config.yaml +75 -0
  19. efleetplan-1.3/config/run_Optimisation_Config.yaml +72 -0
  20. efleetplan-1.3/data/Input/consumption_factor_2024.csv +8784 -0
  21. efleetplan-1.3/data/Input/el_prices_2024.csv +8785 -0
  22. efleetplan-1.3/docs/api/co-optimisation.md +150 -0
  23. efleetplan-1.3/docs/api/config-loaders.md +142 -0
  24. efleetplan-1.3/docs/api/fleetoperation_modelling.md +82 -0
  25. efleetplan-1.3/docs/api/visualisation.md +149 -0
  26. efleetplan-1.3/docs/configuration/co-optimisation.md +101 -0
  27. efleetplan-1.3/docs/configuration/environment.md +47 -0
  28. efleetplan-1.3/docs/configuration/fleetoperation_simulation.md +135 -0
  29. efleetplan-1.3/docs/configuration/predefined.md +110 -0
  30. efleetplan-1.3/docs/examples.md +178 -0
  31. efleetplan-1.3/docs/getting-started.md +217 -0
  32. efleetplan-1.3/docs/index.md +52 -0
  33. efleetplan-1.3/docs/stylesheets/extra.css +38 -0
  34. efleetplan-1.3/docs/user-guide/overview.md +64 -0
  35. efleetplan-1.3/docs/user-guide/package1.md +106 -0
  36. efleetplan-1.3/docs/user-guide/package2.md +96 -0
  37. efleetplan-1.3/mkdocs.yml +73 -0
  38. efleetplan-1.3/notebooks/1_Fleet_operation_simulation.ipynb +362 -0
  39. efleetplan-1.3/notebooks/2_Co-optimisation.ipynb +346 -0
  40. efleetplan-1.3/pyproject.toml +43 -0
  41. efleetplan-1.3/src/efleetplan/_1_fleetoperation_simulation/__init__.py +24 -0
  42. efleetplan-1.3/src/efleetplan/_1_fleetoperation_simulation/config_loader_schedule.py +300 -0
  43. efleetplan-1.3/src/efleetplan/_1_fleetoperation_simulation/generate_graphs.py +80 -0
  44. efleetplan-1.3/src/efleetplan/_1_fleetoperation_simulation/schedule_generation.py +568 -0
  45. efleetplan-1.3/src/efleetplan/_2_co_optimisation/__init__.py +29 -0
  46. efleetplan-1.3/src/efleetplan/_2_co_optimisation/co_optimisation.py +590 -0
  47. efleetplan-1.3/src/efleetplan/_2_co_optimisation/config_loader_optimisation.py +321 -0
  48. efleetplan-1.3/src/efleetplan/_2_co_optimisation/optimisation_graphs.py +458 -0
  49. efleetplan-1.3/src/efleetplan/__init__.py +53 -0
  50. efleetplan-1.3/src/efleetplan/_cli.py +50 -0
  51. efleetplan-1.3/src/efleetplan/_config_templates/_1_predefined/companies.yaml +137 -0
  52. efleetplan-1.3/src/efleetplan/_config_templates/_1_predefined/infrastructure_configuration.yaml +53 -0
  53. efleetplan-1.3/src/efleetplan/_config_templates/_1_predefined/schedules.yaml +52 -0
  54. efleetplan-1.3/src/efleetplan/_config_templates/_1_predefined/vehicles.yaml +25 -0
  55. efleetplan-1.3/src/efleetplan/_config_templates/_2_Ilustrative_examples/run_FleetSchedule_Config_Example1.yaml +74 -0
  56. efleetplan-1.3/src/efleetplan/_config_templates/_2_Ilustrative_examples/run_FleetSchedule_Config_Example2.yaml +78 -0
  57. efleetplan-1.3/src/efleetplan/_config_templates/_2_Ilustrative_examples/run_FleetSchedule_Config_example3.yaml +74 -0
  58. efleetplan-1.3/src/efleetplan/_config_templates/_2_Ilustrative_examples/run_FleetSchedule_Config_example4.yaml +75 -0
  59. efleetplan-1.3/src/efleetplan/_config_templates/_2_Ilustrative_examples/run_Optimisation_Config_example1.yaml +68 -0
  60. efleetplan-1.3/src/efleetplan/_config_templates/_2_Ilustrative_examples/run_Optimisation_Config_example2.yaml +68 -0
  61. efleetplan-1.3/src/efleetplan/_config_templates/_2_Ilustrative_examples/run_Optimisation_Config_example3.yaml +68 -0
  62. efleetplan-1.3/src/efleetplan/_config_templates/_2_Ilustrative_examples/run_Optimisation_Config_example4.yaml +68 -0
  63. efleetplan-1.3/src/efleetplan/_config_templates/env.yaml +25 -0
  64. efleetplan-1.3/src/efleetplan/_config_templates/run_FleetSchedule_Config.yaml +75 -0
  65. efleetplan-1.3/src/efleetplan/_config_templates/run_Optimisation_Config.yaml +72 -0
  66. efleetplan-1.3/test/1_Fleet_operation_simulation_TEST.ipynb +372 -0
  67. efleetplan-1.3/test/2_Co-optimisation_TEST.ipynb +346 -0
  68. efleetplan-1.3/test/env_TEST.yaml +27 -0
  69. efleetplan-1.3/test/run_FleetSchedule_Config_TEST.yaml +74 -0
  70. efleetplan-1.3/test/run_Optimisation_Config_TEST.yaml +68 -0
@@ -0,0 +1,7 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.egg-info/
4
+ dist/
5
+ build/
6
+ .venv/
7
+ venv/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Carolina Gil Ribeiro
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,227 @@
1
+ Metadata-Version: 2.5
2
+ Name: efleetplan
3
+ Version: 1.3
4
+ Summary: Co-optimisation tool of charging infrastructure investment and electric fleet operations. EFleetPlan is a Python-based tool for optimizing charging infrastructure and operations for electric light commercial vehicles (LCVs).
5
+ Project-URL: Repository, https://github.com/mcarolinagilr/efleetplan
6
+ Project-URL: Issues, https://github.com/mcarolinagilr/efleetplan/issues
7
+ Author: KTH Royal Institute of Technology
8
+ Author-email: Carolina Gil Ribeiro <mcgr2@kth.se>
9
+ License-Expression: MIT
10
+ License-File: LICENSES/License.txt
11
+ Keywords: EV,LCV,Pyomo,charging,fleet,infrastructure,optimization
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Requires-Python: >=3.10
17
+ Requires-Dist: matplotlib<4.0,>=3.10
18
+ Requires-Dist: numpy<3.0,>=2.3
19
+ Requires-Dist: pandas<3.0,>=2.3
20
+ Requires-Dist: pydantic<3.0,>=2.0
21
+ Requires-Dist: pyomo<7.0,>=6.9
22
+ Requires-Dist: pyyaml<7.0,>=6.0
23
+ Description-Content-Type: text/markdown
24
+
25
+ # eFleetPlan
26
+ Co-optimisation tool of charging infrastructure investment and electric fleet operations
27
+
28
+ **EFleetPlan** is a Python-based open source tool for optimizing charging infrastructure and operations for electric light commercial vehicles (LCVs).
29
+
30
+ ## Authors
31
+ Carolina Gil Ribeiro and Jagruti Thakur
32
+
33
+ ## License
34
+ This software is licensed under the MIT License.
35
+ See the [LICENSE](./LICENSE) file for details.
36
+
37
+
38
+ ## Citation
39
+ If you use eFleetPlan, please cite:
40
+ **Gil Ribeiro, C and Thakur, J, eFleetPlan: Co-optimisation tool of Charging Infrastructure Investment and Fleet Operations, 2025. DOI:xxxxxxx
41
+
42
+ ## Project structure
43
+
44
+ ```
45
+ eFleetPlan/
46
+ ├── config/ # All configuration files
47
+ │ ├── predefined/ # Predefined parameter sets
48
+ │ │ ├── companies.yaml
49
+ │ │ ├── infrastructure_configuration.yaml
50
+ │ │ ├── schedules.yaml
51
+ │ │ └── vehicles.yaml
52
+ │ ├── env.yaml # Environment settings
53
+ │ ├── run_FleetSchedule_Config.yaml# Schedule generation run configuration
54
+ │ └── run_Optimisation_Config.yaml # Optimisation run configuration
55
+ ├── data/
56
+ │ ├── Input/ # Energy consumption and electricity price files
57
+ │ └── Output/ # Results files
58
+ ├── docs/ # Documentation
59
+ ├── notebooks/
60
+ │ ├── 1_Fleet_Operation_simulation.ipynb
61
+ │ └── 2_Co-optimisation.ipynb
62
+ ├── src/
63
+ │ └── efleetplan/
64
+ │ ├── _1_schedule/ # Fleet operation simulation package
65
+ │ │ ├── generate_graphs.py
66
+ │ │ └── schedule_generation.py
67
+ │ └── _2_optimisation/ # Co-optimisation package
68
+ │ ├── co_optimisation.py
69
+ │ └── optimisation_graphs.py
70
+ ├── pyproject.toml
71
+ ├── MANIFEST.in
72
+ └── mkdocs.yml
73
+ ```
74
+
75
+ ## Installation instructions
76
+
77
+ ### Prerequisites
78
+
79
+ - Python 3.9 or later
80
+ - Solver for optimisation: default is [Gurobi Optimizer](https://www.gurobi.com/) with a valid license but can be changed for other solver in the co_optimisation.py file
81
+
82
+ There are two ways to install eFleetPlan, depending on what you want to do.
83
+
84
+ ### Option A — From GitHub (clone the repo)
85
+
86
+ Use this to run the example notebooks, reproduce the paper's illustrative examples, or edit the source code.
87
+
88
+ **Step 1 — Clone the repository**
89
+
90
+ ```bash
91
+ git clone https://github.com/mcarolinagilr/efleetplan.git
92
+ cd efleetplan
93
+ ```
94
+
95
+ **Step 2 — Create a virtual environment and install**
96
+
97
+ ```bash
98
+ python -m venv venv
99
+ source venv/bin/activate # Windows: venv\Scripts\activate
100
+ pip install .
101
+ ```
102
+
103
+ **Step 3 — Verify the installation**
104
+
105
+ ```bash
106
+ python -m efleetplan
107
+ ```
108
+
109
+ This confirms that all dependencies (including Gurobi) are correctly installed.
110
+
111
+ ### Option B — From PyPI (use as a library)
112
+
113
+ Use this to call eFleetPlan's functions from your own code, without cloning the repository.
114
+
115
+ **Step 1 — Create a virtual environment and install**
116
+
117
+ ```bash
118
+ python -m venv venv
119
+ source venv/bin/activate # Windows: venv\Scripts\activate
120
+ pip install efleetplan
121
+ ```
122
+
123
+ **Step 2 — Create your config folder**
124
+
125
+ ```bash
126
+ efleetplan-start
127
+ ```
128
+
129
+ Prompts for a destination folder and copies editable YAML templates there (`env.yaml`, run configs, the predefined vehicle/schedule/company/infrastructure library, and the illustrative example configs). Edit those, then supply your own energy consumption factor and electricity price CSVs.
130
+
131
+ **Step 3 — Use it**
132
+
133
+ ```python
134
+ from efleetplan import load_scheduler_config, generate_fleet_schedules
135
+
136
+ env, run, predefined = load_scheduler_config(
137
+ env_yaml="config/env.yaml",
138
+ run_yaml="config/run_FleetSchedule_Config.yaml",
139
+ )
140
+ schedule = generate_fleet_schedules(env, run, predefined)
141
+ ```
142
+
143
+ ## eFleetPlan Configurations
144
+
145
+ **All parameters are configured through YAML files in the `config/` directory. There is no need to edit the notebooks or Python source code.**
146
+
147
+ ### Environment settings — `env.yaml`
148
+ Defines global settings such as file paths, simulation period, time resolution, and the random seed.
149
+
150
+ ### Schedule generation — `run_FleetSchedule_Config.yaml`
151
+
152
+ Controls how fleet operational schedules are generated: the schedule name, number of vehicles, schedule and vehicle mix, and company type.
153
+ User can use predefined parameters or define custom values.
154
+
155
+ Predefined values are loaded from `config/_1_predefined/`.
156
+
157
+ ### Optimisation — `run_Optimisation_Config.yaml`
158
+
159
+ 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.
160
+
161
+ Predefined values are loaded from `config/_1_predefined/infrastructure_configuration.yaml`.
162
+
163
+
164
+ ### Predefined parameter sets — `config/_1_predefined/`
165
+
166
+ Contains reusable definitions for vehicles, schedules, companies, and infrastructure. These can be extended with new entries as needed.
167
+
168
+ ### Input data — `data/Input/`
169
+
170
+ Place the following files in this folder before running the tool:
171
+
172
+ - **Energy consumption factor file** — energy consumption factor, that is linked to the environment temperature.
173
+ - **Electricity price file** — time-series electricity prices for the simulation period.
174
+
175
+
176
+
177
+ ## How to use the eFLeetPlan tool
178
+
179
+ 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.
180
+
181
+ ### Fleet Operation simulation
182
+
183
+ **Notebook:** `notebooks/1_Fleet_Operation_simulation.ipynb`
184
+
185
+ 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.
186
+
187
+ **Workflow:**
188
+ 1. Edit `config/env.yaml` and `config/run_FleetSchedule_Config.yaml` with your desired settings.
189
+ 2. Open the notebook and run all cells.
190
+ 3. Review the validation checks and output graphs.
191
+ 4. Outputs are saved to `data/Output/<schedule_name>/`.
192
+
193
+ ### Package 2 — Charging Infrastructure Co-optimisation
194
+
195
+ **Notebook:** `notebooks/2_Co-optimisation.ipynb`
196
+
197
+ Solves the cost-minimisation model that jointly optimises charging infrastructure investment and fleet charging operations. Requires Gurobi and a schedule generated by Package 1.
198
+
199
+ **Workflow:**
200
+ 1. Edit `config/run_Optimisation_Config.yaml` with the target schedule and solver settings.
201
+ 2. Open the notebook and run all cells.
202
+ 3. Review the optimisation results and summary visualisations.
203
+ 4. Results are saved to `data/Output/<schedule_name>/Results/`.
204
+
205
+ ### Running the notebooks
206
+
207
+ ```bash
208
+ # From the project root
209
+ jupyter lab
210
+ # or
211
+ jupyter notebook
212
+ ```
213
+ Open the notebook for the Package you want to run and execute cells from top to bottom.
214
+
215
+ ## Output
216
+
217
+ Package 1 produces CSV files with the generated fleet schedules and accompanying graphs in `data/Output/<schedule_name>/`.
218
+
219
+ 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).
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
@@ -0,0 +1,203 @@
1
+ # eFleetPlan
2
+ Co-optimisation tool of charging infrastructure investment and electric fleet operations
3
+
4
+ **EFleetPlan** is a Python-based open source tool for optimizing charging infrastructure and operations for electric light commercial vehicles (LCVs).
5
+
6
+ ## Authors
7
+ Carolina Gil Ribeiro and Jagruti Thakur
8
+
9
+ ## License
10
+ This software is licensed under the MIT License.
11
+ See the [LICENSE](./LICENSE) file for details.
12
+
13
+
14
+ ## Citation
15
+ If you use eFleetPlan, please cite:
16
+ **Gil Ribeiro, C and Thakur, J, eFleetPlan: Co-optimisation tool of Charging Infrastructure Investment and Fleet Operations, 2025. DOI:xxxxxxx
17
+
18
+ ## Project structure
19
+
20
+ ```
21
+ eFleetPlan/
22
+ ├── config/ # All configuration files
23
+ │ ├── predefined/ # Predefined parameter sets
24
+ │ │ ├── companies.yaml
25
+ │ │ ├── infrastructure_configuration.yaml
26
+ │ │ ├── schedules.yaml
27
+ │ │ └── vehicles.yaml
28
+ │ ├── env.yaml # Environment settings
29
+ │ ├── run_FleetSchedule_Config.yaml# Schedule generation run configuration
30
+ │ └── run_Optimisation_Config.yaml # Optimisation run configuration
31
+ ├── data/
32
+ │ ├── Input/ # Energy consumption and electricity price files
33
+ │ └── Output/ # Results files
34
+ ├── docs/ # Documentation
35
+ ├── notebooks/
36
+ │ ├── 1_Fleet_Operation_simulation.ipynb
37
+ │ └── 2_Co-optimisation.ipynb
38
+ ├── src/
39
+ │ └── efleetplan/
40
+ │ ├── _1_schedule/ # Fleet operation simulation package
41
+ │ │ ├── generate_graphs.py
42
+ │ │ └── schedule_generation.py
43
+ │ └── _2_optimisation/ # Co-optimisation package
44
+ │ ├── co_optimisation.py
45
+ │ └── optimisation_graphs.py
46
+ ├── pyproject.toml
47
+ ├── MANIFEST.in
48
+ └── mkdocs.yml
49
+ ```
50
+
51
+ ## Installation instructions
52
+
53
+ ### Prerequisites
54
+
55
+ - Python 3.9 or later
56
+ - Solver for optimisation: default is [Gurobi Optimizer](https://www.gurobi.com/) with a valid license but can be changed for other solver in the co_optimisation.py file
57
+
58
+ There are two ways to install eFleetPlan, depending on what you want to do.
59
+
60
+ ### Option A — From GitHub (clone the repo)
61
+
62
+ Use this to run the example notebooks, reproduce the paper's illustrative examples, or edit the source code.
63
+
64
+ **Step 1 — Clone the repository**
65
+
66
+ ```bash
67
+ git clone https://github.com/mcarolinagilr/efleetplan.git
68
+ cd efleetplan
69
+ ```
70
+
71
+ **Step 2 — Create a virtual environment and install**
72
+
73
+ ```bash
74
+ python -m venv venv
75
+ source venv/bin/activate # Windows: venv\Scripts\activate
76
+ pip install .
77
+ ```
78
+
79
+ **Step 3 — Verify the installation**
80
+
81
+ ```bash
82
+ python -m efleetplan
83
+ ```
84
+
85
+ This confirms that all dependencies (including Gurobi) are correctly installed.
86
+
87
+ ### Option B — From PyPI (use as a library)
88
+
89
+ Use this to call eFleetPlan's functions from your own code, without cloning the repository.
90
+
91
+ **Step 1 — Create a virtual environment and install**
92
+
93
+ ```bash
94
+ python -m venv venv
95
+ source venv/bin/activate # Windows: venv\Scripts\activate
96
+ pip install efleetplan
97
+ ```
98
+
99
+ **Step 2 — Create your config folder**
100
+
101
+ ```bash
102
+ efleetplan-start
103
+ ```
104
+
105
+ Prompts for a destination folder and copies editable YAML templates there (`env.yaml`, run configs, the predefined vehicle/schedule/company/infrastructure library, and the illustrative example configs). Edit those, then supply your own energy consumption factor and electricity price CSVs.
106
+
107
+ **Step 3 — Use it**
108
+
109
+ ```python
110
+ from efleetplan import load_scheduler_config, generate_fleet_schedules
111
+
112
+ env, run, predefined = load_scheduler_config(
113
+ env_yaml="config/env.yaml",
114
+ run_yaml="config/run_FleetSchedule_Config.yaml",
115
+ )
116
+ schedule = generate_fleet_schedules(env, run, predefined)
117
+ ```
118
+
119
+ ## eFleetPlan Configurations
120
+
121
+ **All parameters are configured through YAML files in the `config/` directory. There is no need to edit the notebooks or Python source code.**
122
+
123
+ ### Environment settings — `env.yaml`
124
+ Defines global settings such as file paths, simulation period, time resolution, and the random seed.
125
+
126
+ ### Schedule generation — `run_FleetSchedule_Config.yaml`
127
+
128
+ Controls how fleet operational schedules are generated: the schedule name, number of vehicles, schedule and vehicle mix, and company type.
129
+ User can use predefined parameters or define custom values.
130
+
131
+ Predefined values are loaded from `config/_1_predefined/`.
132
+
133
+ ### Optimisation — `run_Optimisation_Config.yaml`
134
+
135
+ 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.
136
+
137
+ Predefined values are loaded from `config/_1_predefined/infrastructure_configuration.yaml`.
138
+
139
+
140
+ ### Predefined parameter sets — `config/_1_predefined/`
141
+
142
+ Contains reusable definitions for vehicles, schedules, companies, and infrastructure. These can be extended with new entries as needed.
143
+
144
+ ### Input data — `data/Input/`
145
+
146
+ Place the following files in this folder before running the tool:
147
+
148
+ - **Energy consumption factor file** — energy consumption factor, that is linked to the environment temperature.
149
+ - **Electricity price file** — time-series electricity prices for the simulation period.
150
+
151
+
152
+
153
+ ## How to use the eFLeetPlan tool
154
+
155
+ 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.
156
+
157
+ ### Fleet Operation simulation
158
+
159
+ **Notebook:** `notebooks/1_Fleet_Operation_simulation.ipynb`
160
+
161
+ 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.
162
+
163
+ **Workflow:**
164
+ 1. Edit `config/env.yaml` and `config/run_FleetSchedule_Config.yaml` with your desired settings.
165
+ 2. Open the notebook and run all cells.
166
+ 3. Review the validation checks and output graphs.
167
+ 4. Outputs are saved to `data/Output/<schedule_name>/`.
168
+
169
+ ### Package 2 — Charging Infrastructure Co-optimisation
170
+
171
+ **Notebook:** `notebooks/2_Co-optimisation.ipynb`
172
+
173
+ Solves the cost-minimisation model that jointly optimises charging infrastructure investment and fleet charging operations. Requires Gurobi and a schedule generated by Package 1.
174
+
175
+ **Workflow:**
176
+ 1. Edit `config/run_Optimisation_Config.yaml` with the target schedule and solver settings.
177
+ 2. Open the notebook and run all cells.
178
+ 3. Review the optimisation results and summary visualisations.
179
+ 4. Results are saved to `data/Output/<schedule_name>/Results/`.
180
+
181
+ ### Running the notebooks
182
+
183
+ ```bash
184
+ # From the project root
185
+ jupyter lab
186
+ # or
187
+ jupyter notebook
188
+ ```
189
+ Open the notebook for the Package you want to run and execute cells from top to bottom.
190
+
191
+ ## Output
192
+
193
+ Package 1 produces CSV files with the generated fleet schedules and accompanying graphs in `data/Output/<schedule_name>/`.
194
+
195
+ 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).
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
@@ -0,0 +1,137 @@
1
+ # =============================================================================
2
+ # Company type/ Use-Case predefined
3
+ # =============================================================================
4
+ # Each key is a company type or commodity type, and the values are the parameters related to the distance and stops of the trips.
5
+ #The values related to company type are defined based on the findings of a survey
6
+ #on light goods vehicles in Sweden conducted by Transport Analysis in 2022.
7
+
8
+
9
+ # Shared defaults
10
+ _defaults: &defaults
11
+ min_distance: 30
12
+ max_distance: 200
13
+ min_distance_per_step: 1
14
+ max_distance_per_step: 50
15
+
16
+
17
+ # ----------------------------------------------------------------------------
18
+ # Parameters per type of transport
19
+ #-----------------------------------------------------------------------------
20
+
21
+ # Type of transport is defined as the primary use of the LCV and are described as follows:
22
+ # Distribution: Distribution transport for goods or commodities transports with several stops for loading and unloading along the way;
23
+ # Linehaul: Line haul goods or commodities transports, directly from one place to another;
24
+ # craft_serv_with_goods: Crafts and services with goods transports include trips for craft or service vehicle that include goods or merchandise to be used or installed in the work;
25
+ # craft_serv_without_goods: Crafts and services without goods correspond to craft or service trips without goods or merchandise.
26
+
27
+
28
+ distribution:
29
+ <<: *defaults
30
+ avg_distance_wd: 124
31
+ dev_distance_wd: 15
32
+ avg_distance_we: 73
33
+ dev_distance_we: 15
34
+ max_distance: 300 # override default
35
+ avg_stops: 52.4
36
+ dev_stops: 11.7
37
+
38
+ linehaul:
39
+ <<: *defaults
40
+ avg_distance_wd: 73
41
+ dev_distance_wd: 16
42
+ avg_distance_we: 43
43
+ dev_distance_we: 16
44
+ avg_stops: 3.6
45
+ dev_stops: 1.1
46
+
47
+ craft_serv_with_goods:
48
+ <<: *defaults
49
+ avg_distance_wd: 75
50
+ dev_distance_wd: 7
51
+ avg_distance_we: 45
52
+ dev_distance_we: 7
53
+ avg_stops: 52.4
54
+ dev_stops: 11.7
55
+
56
+ craft_serv_without_goods:
57
+ <<: *defaults
58
+ avg_distance_wd: 71
59
+ dev_distance_wd: 8
60
+ avg_distance_we: 42
61
+ dev_distance_we: 8
62
+ avg_stops: 3.7
63
+ dev_stops: 0.5
64
+
65
+
66
+
67
+
68
+ # ----------------------------------------------------------------------------
69
+ # Parameters per comodity type
70
+ # -----------------------------------------------------------------------------
71
+
72
+ # Commodity groups were formulated in Light Goods Vehicles 2022 survey to capture the type of goods
73
+ # commonly transported identified by the vehicles.
74
+ # Food: Food and beverages, including refrigerated transport;
75
+ # Mail: Mail and parcels, including postal and courier services;
76
+ # Building: Building materials, including construction and renovation materials;
77
+ # High distance: Transports with high average distance, such as long-haul transport or transports;
78
+ # General cargo: General cargo, including transports of goods or commodities not included in the other
79
+
80
+ food:
81
+ <<: *defaults
82
+ avg_distance_wd: 81
83
+ dev_distance_wd: 21
84
+ avg_distance_we: 48
85
+ dev_distance_we: 21
86
+ avg_stops: 11
87
+ dev_stops: 4.1
88
+
89
+ mail:
90
+ <<: *defaults
91
+ avg_distance_wd: 122
92
+ dev_distance_wd: 23
93
+ avg_distance_we: 72
94
+ dev_distance_we: 23
95
+ avg_stops: 98.1
96
+ dev_stops: 21.8
97
+
98
+ building:
99
+ <<: *defaults
100
+ avg_distance_wd: 75
101
+ dev_distance_wd: 8
102
+ avg_distance_we: 44
103
+ dev_distance_we: 8
104
+ avg_stops: 4.1
105
+ dev_stops: 0.3
106
+
107
+ highdistance:
108
+ <<: *defaults
109
+ avg_distance_wd: 350
110
+ dev_distance_wd: 50
111
+ avg_distance_we: 300
112
+ dev_distance_we: 50
113
+ min_distance: 30
114
+ max_distance: 400
115
+ max_distance_per_step: 70
116
+ avg_stops: 52.4
117
+ dev_stops: 11.7
118
+
119
+ generalcargo:
120
+ <<: *defaults
121
+ avg_distance_wd: 108.6
122
+ dev_distance_wd: 23
123
+ avg_distance_we: 64
124
+ dev_distance_we: 23
125
+ min_distance: 20
126
+ avg_stops: 11.7
127
+ dev_stops: 3.3
128
+
129
+ nogoods:
130
+ <<: *defaults
131
+ avg_distance_wd: 67.4
132
+ dev_distance_wd: 6.8
133
+ avg_distance_we: 39.9
134
+ dev_distance_we: 6.8
135
+ min_distance: 20
136
+ avg_stops: 3.4
137
+ dev_stops: 0.4
@@ -0,0 +1,53 @@
1
+ # =============================================================================
2
+ # INFRASTRUCTURE CHARGING CONFIGURATIONS
3
+ # =============================================================================
4
+
5
+
6
+ # ----- INFRASTRUCTURE POWER ---------------------------------------------------------------------------
7
+
8
+ Charging_losses: 0.964 # Charging efficiency
9
+
10
+ Charger_Power:
11
+ f1: 7.4
12
+ f2: 50
13
+ f3: 150
14
+ f4: 350
15
+ route: 150
16
+
17
+
18
+ Battery_Maximum_Limit: 0.8 # Maximum limit of the battery (80% of its capacity)
19
+ Battery_Minimum_Limit: 0.2 # Minimum limit of the battery (20% of its capacity)
20
+
21
+
22
+ # ----- INFRASTRUCTURE COSTS PARAMETERS---------------------------------------------------------------------------
23
+
24
+
25
+ lifetime: 20 #years
26
+ Infrastructure_subscription: 50 #SEK/day
27
+ Price_FixedrateDT: 0.0331 #SEK/kWh
28
+ Demand_rate: 1352 #kW
29
+ Price_Fixedrateroute: 8.90 #SEK/route
30
+ Discount_rate: 0.05 #%
31
+
32
+
33
+ investment cost:
34
+ f1: 32000 #SEK
35
+ f2: 294000 #SEK
36
+ f3: 778000 #SEK
37
+ f4: 1451000 #SEK
38
+ route: 778000 #SEK
39
+
40
+ installation cost:
41
+ f1: 29000 #SEK
42
+ f2: 472000 #SEK
43
+ f3: 644000 #SEK
44
+ f4: 1202000 #SEK
45
+ route: 1202000 #SEK
46
+
47
+ maintenance cost:
48
+ f1: 5000 #SEK/year
49
+ f2: 40000 #SEK/year
50
+ f3: 120000 #SEK/year
51
+ f4: 240000 #SEK/year
52
+ route: 120000 #SEK/year
53
+
@@ -0,0 +1,52 @@
1
+ # =============================================================================
2
+ # Schedule Type Predefined
3
+ # =============================================================================
4
+ # Each top-level key is a schedule type name.
5
+ # The Python config loader will map these directly to ScheduleConfig attributes.
6
+
7
+ typea:
8
+ # Continuous schedule — no break in the middle of the day, just a single stop in the distribution terminal at the beginning and a single return at the end of the day
9
+ dep_mean_wd: 8
10
+ dep_dev_wd: 1
11
+ ret_mean_wd: 18
12
+ ret_dev_wd: 1
13
+ dep_mean_we: 8
14
+ dep_dev_we: 1
15
+ ret_mean_we: 18
16
+ ret_dev_we: 1
17
+ min_dep: 6
18
+ max_dep: 11
19
+ min_return_hour: 18
20
+ max_return_hour: 22
21
+
22
+ typeb:
23
+ # Schedule with two parts, with a break /middle stop in the day at the distribution terminal for charging / reloading
24
+ dep_mean_wd: 6
25
+ dep_dev_wd: 1
26
+ min_dep: 3
27
+ max_dep: 10
28
+
29
+ pause_beg_mean_wd: 12
30
+ pause_beg_dev_wd: 0.25
31
+ pause_end_mean: 13
32
+ pause_end_dev: 0.25
33
+ max_beg_time: 13
34
+ min_beg_time: 11
35
+ max_pause_end: 15
36
+ min_pause_end: 12
37
+ pause_time_mean: 0.5
38
+ pause_time_dev: 0.1
39
+
40
+ ret_mean_wd: 19
41
+ ret_dev_wd: 1
42
+ max_return_hour: 22
43
+ min_return_hour: 15
44
+
45
+ dep_mean_we: 9
46
+ dep_dev_we: 1
47
+ pause_beg_mean_we: 12
48
+ pause_beg_dev_we: 0.25
49
+ ret_mean_we: 19
50
+ ret_dev_we: 0.5
51
+
52
+ prob_emergency: 0.02