## 3 Methods
### LMDP: Origin-Destination Approach  
The last mile delivery problem or LMDP, as named in this work, takes place at the customer-end of the supply chain, and includes the transport of goods from the retailers' last contact point, i.e., a place for goods collection (origin), such as a warehouse, store, or a terminal, to households at the site of consumption (destination) where the customers are located [48]. According to [49], the use of EVs in the last mile activity can help to improve the quality in the intra-route operations, since it represents the portion of the chain supply with the largest levels of congestion, noise, and emissions. The battery capacity used by the set of EVs that follow this transport pattern is smaller than that used by the EVs for the CVRP approach, as the paths with known origin-destination are shorter than those presented for the CVRP transport pattern. Under the context of the present work, the LMDP is represented by the shortest path problem that finds the route between two points of origin and destination at a minimum cost, given by a distance, arc weight, or time. The transportation network is an undirected graph, composed by nodes connected together with bidirectional edges. In this sense, when the vehicle departs from the origin point to the destination point, it would necessarily have to visit other nodes along the way as there is no direct connection between origin and destination. According to [50], the shortest path problem is defined by (22)-(24) that include the arc flow conservation constraints for each path. Similar to the CVRP approach, the equations in the LMDP are subject to a connectivity matrix between the vertices:  
\[\sum_{n\
u}y_{m,n,l}-\sum_{n\
u}y_{n,m,l}=1\ \forall leL\ \forall meV\ m=Start_{l} \tag{22}\]  
\[\sum_{n\
u}y_{m,n,l}-\sum_{n\
u}y_{n,m,l}=0\ \forall leL\ \forall meV\ m\
eq Start_{l}\ m \
eq End_{l} \tag{23}\]  
\[\sum_{n\
u}y_{m,n,l}-\sum_{n\
u}y_{n,m,l}=-1\ \forall leL\ \forall meV\ m= End_{l} \tag{24}\]  
The strategy for charging station location in the LMDP is similar to that adopted for the CVRP approach. The distance traveled along the network in conjunction with the battery capacity are also the components to decide whether a charging station should be sited, explained throughout Equations (25)-(34). Recall that, in the LMDP, there is no depot where the EVs depart from and arrive to; in contrast, there are two sets of start and end points that characterize the routes followed by each EV. \[\sum_{ \begin{subarray}{c}m\
u\\ m=Start_{l}\end{subarray} }y_{m,n,l}\cdot d_{m,n}+\sum_{ \begin{subarray}{c}m \
u\\ m=\ \
eq\ \mathit{Sat_{l}}\end{subarray} }\left(y_{m,n,l}\cdot d_{m,n}+g^{last}_{m,n, l}\right)=d^{last}_{n,l}\ \forall neN\ \forall leL \tag{25}\]  
\[\sum_{ \begin{subarray}{c}m\
u\\ m=\ \
eq\ \mathit{Sat_{l}}\end{subarray} }y_{m,n,l}\cdot d_{m,n}+\sum_{ \begin{subarray}{c}m\
u\\ m=\ \
eq\mathit{Sat_{l}}\end{subarray} }\left(y_{m,n,l}\cdot d_{m,n}+g^{last}_{m,n, l}\right)=d^{last}_{n,l}\ \forall neC\ \forall leL \tag{26}\]  
\[\sum_{ \begin{subarray}{c}m\
u\\ m=\ \
eq\mathit{Sat_{l}}\end{subarray} }\left(y_{m,n,l}\cdot d_{m,n}+g^{last}_{m,n, l}\right)=d^{last}_{n,l}\ \mathit{neV\ \mathit{leL\ n=End_{l}}} \tag{27}\]  
\[d^{last}_{n,l}\leq\left(1-Y^{last}_{n,l}\right)\cdot Q^{last}\ \forall neC\ \forall leL \tag{28}\]  
\[\sum_{ \begin{subarray}{c}m\
u\\ n,l\end{subarray}