# A Quantum Approach to the Problem of Charging Electric Cars on a Motorway

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Problem Formulation

#### 2.1. Problem Description and Parameters

- Phase I—reaching the charging point (station).
- Phase II—the process of charging the EMV’s battery.

- ${D}_{j}^{S}$—distance between charging station j and the start node A.
- ${b}_{j}$—number of chargers at station j.
- ${B}_{jl}$—l-th charger at station $j,l=1,2,\dots ,{b}_{j}$.
- ${P}_{jl}$—available power of charger ${B}_{jl}$.

- ${N}_{i}^{in}$—entrance (ingoing) node.
- ${N}_{i}^{out}$—outgoing node.
- ${a}_{i}$—arrival time of EMV i, i.e., the time of entering the motorway through node ${N}_{i}^{in}$.
- ${C}_{i}^{full}$—total capacity of the battery of EMV i.
- ${C}_{i}^{curr}$—current amount of energy in the battery of EMV i.
- ${m}_{i}$—number of driving modes “speed/power usage”.
- ${\mathbf{v}}_{i}$—vector of available speeds, ${\mathbf{v}}_{i}=[{v}_{i1},{v}_{i2},\dots ,{v}_{i{l}_{i}}]$.
- ${\mathbf{p}}_{i}$—vector of corresponding power usages, ${\mathbf{p}}_{i}=[{p}_{i1},{p}_{i2},\dots ,{p}_{i{m}_{i}}]$.

- Each EMV can charge its battery only once, i.e., when the battery is full after phase II, the amount of energy is sufficient for reaching the outgoing node.
- For each EMV, there exists at least one available speed for which the number of feasible charging stations is greater than 0.
- Operations in phase I can be performed fully in parallel, i.e., we do not assume any limited capacity of the motorway, accidents, traffic jams, etc.
- Each charging process is done by using exactly one charger.
- The charging time in phase II is linearly dependent on the energy deficit ${C}_{i}^{def}$ in the battery.

#### 2.2. Classification of the Problem in the Classical Scheduling Theory

- Ready time ${r}_{i}$ of job i, calculated as the sum of arrival time ${a}_{i}$ of EMV i and the duration ${d}_{i}^{I}$ of phase I for this EMV (i.e., the time needed for reaching the charging point): ${r}_{i}={a}_{i}+{d}_{i}^{I}$.
- Execution time of job i, i.e., the duration ${d}_{i}^{II}$ of phase II (the length of the charging process) for the corresponding EMV.

#### 2.3. Charging Point Models

#### 2.3.1. Charger as a Charging Point

#### 2.3.2. Station as a Charging Point

## 3. Quantum Approach

#### 3.1. Conflict Avoidance Problem

#### 3.2. Conflict Matrix

- Orange “1”—conflict because the charging point is unreachable by one of the EMVs moving in the selected driving mode;
- Black “1”—conflict because of charging at the charging point at the same time;
- Green “0”—no conflict.

#### 3.2.1. Conflict Matrix for Charger as a Charging Point

#### 3.2.2. Conflict Matrix for Station as a Charging Point

#### 3.3. Gate-Based Approach and QAOA Algorithm

#### 3.4. Gate-Based Hamiltonian Formulation

#### 3.5. Quantum Annealing

**Q**is constructed from the state Hamiltonian.

#### 3.6. Quantum Annealing Hamiltonian Formulation

#### 3.7. Note on Energy

## 4. Computational Experiment

#### 4.1. Assumptions

#### 4.2. Test Instances—Generator

- $s\in \{1,2,...,25\}$
- ${b}_{j}\in \{2,3\}$, $j=1,2,...,s$
- $n\in \{3,4,...,33\}$
- ${m}_{i}=6$, $i=1,2,...,n$.

#### 4.3. Exemplary Practical Instance

- $r=18$ nodes
- $s=4$ gas stations which we will interpret as charging stations.
- We will assume each charging station has 2 terminals in total.

#### 4.4. Runtime Environment

## 5. Results

- QPU_SAMPLING_TIME: 1.97 s
- QPU_ANNEAL_TIME_PER_SAMPLE: 20.0 µs
- QPU_READOUT_TIME_PER_SAMPLE: 156.20 µs
- QPU_ACCESS_TIME: 1.98 s
- QPU_ACCESS_OVERHEAD_TIME: 107.13 ms
- QPU_PROGRAMMING_TIME: 15.07 ms
- QPU_DELAY_TIME_PER_SAMPLE: 20.54 µs
- POST_PROCESSING_OVERHEAD_TIME: 1.12 ms
- TOTAL_POST_PROCESSING_TIME: 8.59 ms.

- $p=1$: 1 h 7 m 7 s
- $p=2$: 1 h 10 m 59 s
- $p=3$: 1 h 19 m 3 s
- $p=4$: 1 h 29 m 31 s
- $p=5$: 1 h 35 m 29 s.

## 6. Discussion

- A set of independent chargers (probably some of them at the same station).
- A set of charging stations with several identical chargers.

## 7. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## Abbreviations

EMV | Electric Motor Vehicle |

NISQ | Noisy Intermediate Scale Quantum |

QPU | Quantum Processing Unit |

QUBO | Quadratic Unconstrained Binary Optimization |

QAOA | Quantum Approximate Optimization Algorithm |

CM | Conflict Matrix |

GCM | General Conflict Matrix |

SCM | Station Conflict Matrix |

BQM | Binary Quadratic Model |

CQM | Constraint Quadratic Model |

## References

- Wiśniewski, J.; Zagorzycka, K.; Kania, A.; Witkowski, Ł. Poland Drives E-Mobility. In Proceedings of the 17th International Conference on Project Management and Scheduling, Toulouse, France, 21–23 April 2022. [Google Scholar]
- Lemański, T.; Różycki, R.; Waligóra, G.; Węglarz, J. Scheduling of battery charging tasks with limited common power source. In Proceedings of the 17th International Conference on Project Management and Scheduling, Toulouse, France, 21–23 April 2021. [Google Scholar]
- Różycki, R.; Waligóra, G.; Węglarz, J. Scheduling battery charging jobs with linearly decreasing power demands to minimize the total time. In Bulletin of the Polish Academy of Sciences: Technical Sciences; Polska Akademia Nauk: Warsaw, Poland, 2020. [Google Scholar]
- Różycki, R.; Lemański, T.; Józefowska, J. Scheduling UAV’s on Autonomous Charging Station. Mod. Technol. Enabling Saf. Secur. Uav Oper. Urban Airsp.
**2021**, 59, 93. [Google Scholar] - Kim, H.; Shin, K.G. Scheduling of battery charge, discharge, and rest. In Proceedings of the 2009 30th IEEE Real-Time Systems Symposium, Washington, DC, USA, 1–4 December 2009; pp. 13–22. [Google Scholar]
- Mitici, M.; Pereira, M.; Oliviero, F. Electric flight scheduling with battery-charging and battery-swapping opportunities. Euro J. Transp. Logist.
**2022**, 11, 100074. [Google Scholar] [CrossRef] - Tan, X.; Qu, G.; Sun, B.; Li, N.; Tsang, D.H. Optimal scheduling of battery charging station serving electric vehicles based on battery swapping. IEEE Trans. Smart Grid
**2017**, 10, 1372–1384. [Google Scholar] [CrossRef] - You, P.; Yang, Z.; Zhang, Y.; Low, S.; Sun, Y. Optimal charging schedule for a battery switching station serving electric buses. IEEE Trans. Power Syst.
**2015**, 31, 3473–3483. [Google Scholar] [CrossRef] - Schaden, B.; Jatschka, T.; Limmer, S.; Raidl, G.R. Smart Charging of Electric Vehicles Considering SOC-Dependent Maximum Charging Powers. Energies
**2021**, 14, 7755. [Google Scholar] [CrossRef] - Yang, S.N.; Cheng, W.S.; Hsu, Y.C.; Gan, C.H.; Lin, Y.B. Charge scheduling of electric vehicles in highways. Math. Comput. Model.
**2013**, 57, 2873–2882. [Google Scholar] [CrossRef] - del Razo, V.; Jacobsen, H.A. Smart charging schedules for highway travel with electric vehicles. IEEE Trans. Transp. Electrif.
**2016**, 2, 160–173. [Google Scholar] [CrossRef] - Ajagekar, A.; You, F. Quantum computing for energy systems optimization: Challenges and opportunities. Energy
**2019**, 179, 76–89. [Google Scholar] [CrossRef] [Green Version] - Faugler, J. Big Data in der Energiewirtschaft: Warum Eon Quantencomputer Einsetzt; Handelsblatt: Düsseldorf, Germany, 2020. [Google Scholar]
- Xin, G.; Wang, P.; Jiao, Y. Noise-enhanced quantum annealing approach and its application in plug-in hybrid electric vehicle charging optimization. Electron. Lett.
**2021**, 57, 314–316. [Google Scholar] [CrossRef] - Kurowski, K.; Węglarz, J.; Subocz, M.; Różycki, R.; Waligóra, G. Hybrid quantum annealing heuristic method for solving job shop scheduling problem. In Proceedings of the International Conference on Computational Science, London, UK, 21–23 June 2022; Springer: Berlin/Heidelberg, Germany, 2020; pp. 502–515. [Google Scholar]
- Ikeda, K.; Nakamura, Y.; Humble, T.S. Application of quantum annealing to nurse scheduling problem. Sci. Rep.
**2019**, 9, 12837. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Błażewicz, J.; Ecker, K.; Pesch, E.; Schmidt, G.; Sterna, M.; Węglarz, J. Handbook on Scheduling: From Theory to Practice; Springer: Cham, Switzerland, 2019. [Google Scholar]
- Kordmostafapour, A.; Rezaeian, J.; Mahdavi, I.; Yar Farjad, M. Scheduling unrelated parallel machine problem with multi-mode processing times and batch delivery cost. OPSEARCH
**2022**, 59, 1438–1470. [Google Scholar] [CrossRef] - Nielsen, M.A.; Chuang, I. Quantum Computation and Quantum Information; American Association of Physics Teachers: College Park, MD, USA, 2002; pp. 185–198. [Google Scholar]
- Kitaev, A.Y. Quantum computations: Algorithms and error correction. Russ. Math. Surv.
**1997**, 52, 1191. [Google Scholar] [CrossRef] - Chow, J.; Dial, O.; Gambetta, J. IBM Quantum breaks the 100-qubit processor barrier. Ibm Res. Blog
**2021**. Available online: https://research.ibm.com/blog/127-qubit-quantum-processor-eagle?lnk=ushpv18nf2 (accessed on 1 September 2022). - Farhi, E.; Goldstone, J.; Gutmann, S. A quantum approximate optimization algorithm. arXiv
**2014**, arXiv:1411.4028. [Google Scholar] - Farhi, E.; Goldstone, J.; Gutmann, S.; Sipser, M. Quantum computation by adiabatic evolution. arXiv
**2000**, arXiv:quant-ph/0001106. [Google Scholar] - Hadfield, S. On the representation of Boolean and real functions as Hamiltonians for quantum computing. Acm Trans. Quantum Comput.
**2021**, 2, 1–21. [Google Scholar] [CrossRef] - Wager, G.; Whale, J.; Braunl, T. Driving electric vehicles at highway speeds: The effect of higher driving speeds on energy consumption and driving range for electric vehicles in Australia. Renew. Sustain. Energy Rev.
**2016**, 63, 158–165. [Google Scholar] [CrossRef] - Schmidt, M.; Zmuda-Trzebiatowski, P.; Kiciński, M.; Sawicki, P.; Lasak, K. Multiple-Criteria-Based Electric Vehicle Charging Infrastructure Design Problem. Energies
**2021**, 14, 3214. [Google Scholar] [CrossRef] - Wykaz Parkingów i Mop—Generalna Dyrekcja Dróg Krajowych i Autostrad—Portal gov.pl. Available online: https://www.gov.pl/web/gddkia/wykaz-parkingow-i-mop (accessed on 1 September 2022).
- D-Wave Leap Platform. Available online: https://docs.dwavesys.com/docs/latest/c_qpu_timing.html (accessed on 1 September 2022).

**Figure 3.**Example of a motorway infrastructure in model II with ${b}_{1}=3$, ${b}_{2}=3$, ${b}_{3}=4$, ${b}_{4}=2$.

**Figure 7.**Gantt chart of a feasible solution which “the station as a charging point” rule treats as the infeasible one.

**Figure 9.**The quality of quantum-annealing-based solutions to the conflict-free EMV charging problem with respect to the number of EMVs in the problem instance. Different colors represent different number of unresolved collisions occurring in the solution.

**Figure 10.**A figure equivalent to Figure 11 with respect to CM size instead of number of EMVs. The lower the solutions’ energy value, the better.

**Figure 12.**The quality of quantum-annealing based solutions to the conflict-free EMV charging problem with respect to the number of EMVs present on the A4 motorway. Different colors represent different numbers of unresolved collisions occurring in the solution.

**Figure 13.**Probability of measuring a solution with given energy level, for different circuit lengths using QAOA algorithm.

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Różycki, R.; Józefowska, J.; Kurowski, K.; Lemański, T.; Pecyna, T.; Subocz, M.; Waligóra, G.
A Quantum Approach to the Problem of Charging Electric Cars on a Motorway. *Energies* **2023**, *16*, 442.
https://doi.org/10.3390/en16010442

**AMA Style**

Różycki R, Józefowska J, Kurowski K, Lemański T, Pecyna T, Subocz M, Waligóra G.
A Quantum Approach to the Problem of Charging Electric Cars on a Motorway. *Energies*. 2023; 16(1):442.
https://doi.org/10.3390/en16010442

**Chicago/Turabian Style**

Różycki, Rafał, Joanna Józefowska, Krzysztof Kurowski, Tomasz Lemański, Tomasz Pecyna, Marek Subocz, and Grzegorz Waligóra.
2023. "A Quantum Approach to the Problem of Charging Electric Cars on a Motorway" *Energies* 16, no. 1: 442.
https://doi.org/10.3390/en16010442