## 4 Methodology
### Savings-Based Heuristic  
As introduced, the savings-based heuristic (LH) [9] is based on greedy decisions and designed to solve the deterministic OM-VRP. The LH is composed of the following three stages:  
1. In the first stage, a dummy solution is created, where each route in this dummy solution serves one node \(i\in N\), which can be either a consumer or a retail store. Routes depart from the depot, travel to the node, and then return to the depot. 2. The second stage of LH, named as CWS\({}_{1}\), is presented in the Figure 3, where the dummy routes from stage 1 are merged using a maximum-savings criterion [36]. Each box from Figure 3 is numbered to aid the following explanations. Initially, a savings list (\(SL\)) is constructed (step 1). This list considers all possible pairs of nodes-i.e., edges-from the problem. For each edge \(\{i,j\}\), the corresponding savings value is calculated as \(s_{ij}=t_{0i}+t_{j0}-t_{ij}\), where \(t_{ij}\) represents the deterministic travel time between nodes \(i\) and \(j\). That is, candidate solutions are generated using 'ideal' traffic conditions for the edge-traversal times. Initially, all edges from SL are eligible. The list is sorted in descending order of the savings value (step 2), and the edge with the highest saving is selected (step 3). At this stage, the selection of edges is restricted to guarantee the assignment of a retail center to each consumer in the problem (step 5). In other words: a route containing one single customer can only be merged with a route containing a retail center, i.e., the selection is restricted to eligible edges \(\{i,j\}\), where node \(j\) is a consumer in a dummy route and \(i\) is a node in a route with a retailer that can supply consumer \(j\). According to [PERSON] et al. [9], these attempts at only merging routes containing at least one retail center, which can supply a single consumer, are made first in order to avoid infeasible solutions-i.e., solutions in which some customers are not assigned to any retailer. This approach of addressing solution feasibility first is based on the observation that the availability of feasibility restoring merges will only decrease as the algorithm progresses. Based on CWS route-merging conditions (step 6), the two corresponding routes, \(i\) and \(j\), of an edge \(\{i,j\}\) (obtained in steps 4.1 and 4.2) can be merged only if: (i) nodes \(i\) and \(j\) are exterior in their respective routes (a node is exterior if it is adjacent to the depot); (ii) \(i\) and \(j\) belong to different routes; (iii) the maximum tour length is not violated; and (iv) the vehicle capacity is not violated. The selected edge is deleted from \(SL\) (step 9) only if: (a) the corresponding merge is performed (step 7); or (b) at least one of the CWS constraints ((i)-(iv)) are violated (in step 6). Otherwise, the edge becomes temporarily ineligible (step 10), but it is not removed from the list since subsequent merges might restore eligibility. This can occur when a different retail center is merged into a route, increasing the available processed inventory for subsequent consumers. For example, when selecting an edge \((i,j)\), the evolving route of \(i\) may have insufficient processed inventory for customer \(j\) at this time. However, if in subsequent iterations route \(i\) is merged with another route containing retailers, the evolving route of \(i\) may then be able to serve customer \(j\). When a merge is successfully performed (step 7), the entire \(SL\) becomes eligible (step 8), since a new inventory scenario is generated. At the end of this stage, all the consumers are supplied by the retail centers, guaranteeing a feasible final solution. Notice that this is achieved without solving separate assignment and routing problems, as done in [PERSON] et al. [1]. Finally, the third stage (CWS2) tries to improve the solution generated in the previous step.