  Electrifying heavy-duty trucks offers a substantial opportunity to curtail
carbon emissions, advancing toward a carbon-neutral future. However, the
inherent challenges of limited battery energy and the sheer weight of
heavy-duty trucks lead to reduced mileage and prolonged charging durations.
Consequently, battery-swapping services emerge as an attractive solution for
these trucks. This paper employs a two-fold approach to investigate the
potential and enhance the efficacy of such services. Firstly, spatial-temporal
demand prediction models are adopted to predict the traffic patterns for the
upcoming hours. Subsequently, the prediction guides an optimization module for
efficient battery allocation and deployment. Analyzing the heavy-duty truck
data on a highway network spanning over 2,500 miles, our model and analysis
underscore the value of prediction/machine learning in facilitating future
decision-makings. In particular, we find that the initial phase of implementing
battery-swapping services favors mobile battery-swapping stations, but as the
system matures, fixed-location stations are preferred.
