  In this paper, we present the mathematical formulation of an OpenStreetMaps
(OSM) based tool that compares the costs and emissions of long-haul medium and
heavy-duty (M&HD) electric and diesel freight trucks, and determines the
spatial distribution of added energy demand due to M&HD EVs. The optimization
utilizes a combination of information on routes from OSM, utility rate design
data across the United States, and freight volume data, to determine these
values. In order to deal with the computational complexity of this problem, we
formulate the problem as a convex optimization problem that is scalable to a
large geographic area. In our analysis, we further evaluate various scenarios
of utility rate design (energy charges) and EV penetration rate across
different geographic regions and their impact on the operating cost and
emissions of the freight trucks. Our approach determines the net emissions
reduction benefits of freight electrification by considering the primary energy
source in different regions. Such analysis will provide insights to policy
makers in designing utility rates for electric vehicle supply equipment (EVSE)
operators depending upon the specific geographic region and to electric
utilities in deciding infrastructure upgrades based on the spatial distribution
of the added energy demand of M&HD EVs. To showcase the results, a case study
for the U.S. state of Texas is conducted.
