# A Study on the Vehicle Routing Planning Method for Fresh Food Distribution
## 2 Problem Description and Model Construction
### Problem Description
The distribution cost includes the terminal vehicle transportation cost, the fixed cost when the electric vehicle starts, and the time window penalty cost. The mathematical model is given in Equation (12) to minimize the total cost of vehicles delivered along the specified route. \[ \begin{array}{l}\min=\sum\limits_{k\in K}\sum\limits_{i,j\in H \cup I}C_{p}d_{ij}x_{ij}^{k}+\sum\limits_{k\in K}\sum\limits_{i\in I}\sum \limits_{j\in I}C_{k2}x_{ij}^{k}+\beta_{2}\omega_{t}\sum\limits_{h\in I}\sum \limits_{i\in I}x_{k2}g_{hi}(1-e^{-\delta_{hi}})\\ +\sum\limits_{i\in I}\beta_{1}\max\{ET_{i}-t_{tr},0\}+\sum\limits_{i\in I} \beta_{1}\max\{t_{t}-LT_{i},0\}\\ \end{array}  \tag{12}\]  
Constraints s.t. :  
\[X_{hi}\leq Y_{h}\forall_{h}\in H \tag{13}\]  
\[\sum\limits_{j\in V}\sum\limits_{k\in K}x_{ij}^{k}=1\forall_{i}\in I \tag{14}\]  
\[\sum\limits_{u\in I}\sum\limits_{i\in V}p_{u}x_{ij}^{k}\leq Q^{k}\forall_{k}\in K \tag{15}\]  
\[\sum\limits_{i\in I}x_{hi}^{k}=\sum\limits_{j\in I}X_{jh}^{k}\forall_{k}\in K,\ \forall_{h}\in H \tag{16}\]  
\[\sum\limits_{h\in H}Y_{hi}=1\forall_{i}\in I \tag{17}\]  
\[x_{h_{1}h_{2}}^{k}=0 \tag{18}\]  
\[\sum\limits_{i\in I}\sum\limits_{j\in I}x_{ij}^{k}=|S_{k}|-1\forall_{k}\in K \tag{19}\]  
\[\sum\limits_{g\in V}x_{ig}^{k}=\sum\limits_{g\in V}x_{gl}^{k}\forall_{k}\in K,\ \forall_{i,j}\in V \tag{20}\]  
\[0\leq\sum\limits_{i\in I}\sum\limits_{h\in H}X_{hi}P_{i}\leq O_{h}Y_{h} \tag{21}\]  
\[t_{j}^{k}=\sum\limits_{k\in K}x_{ij}^{k}(t_{i}^{k}+\frac{d_{ij}}{v}+\Delta t _{i})\forall_{i,j}\in V \tag{22}\]  
\[\sum\limits_{j\in V}\sum\limits_{k\in K}x_{ij}^{k}=1\forall_{i}\in I \tag{14}\]0  
\[\sum\limits_{j\in V}\sum\limits_{k\in K}x_{ij}^{k}=1\forall_{i}\in I \tag{14}\]1  
\[\sum\limits_{j\in V}\sum\limits_{k\in K}x_{ij}^{k}=1\forall_{i}\in I \tag{14}\]2  
\[\sum\limits_{j\in V}\sum\limits_{k\in K}x_{ij}^{k}=1\forall_{i}\in I \tag{14}\]3  
Equation (13) indicates that the front warehouse can only be selected to provide services to the customer points. Equation (14) indicates that each customer point has been served by only one vehicle once and will not repeat the service. Equation (15) indicates that the total amount of goods required by customers on each line where vehicle \(k\) is installeddoes not exceed the maximum carrying capacity of the vehicle. Equation (16) indicates that each vehicle departs from the front warehouse and returns to the front warehouse. Equation (17) indicates that the same customer point has only one front warehouse to provide services. Equation (18) indicates that there is no collaborative relationship between any two front warehouses. Equation (19) represents the elimination sub-loop. Equation (20) indicates that vehicles in each path are continuously transported to adjacent customer points. Equation (21) represents the volume constraint of the front warehouse. Equation (22) represents the time change of the vehicle between customer points. Equation (23) indicates the waiting time required by the vehicle to arrive before the customer's time window. Equation (24) represents a value constraint on whether the decision variable uses the vehicle \(k\) for distribution between two customer points. Equations (25) and (26) jointly ensure that the vehicle arrives within the customer's time window. In summary, the upper level model is the dominant layer in the two-layer model, which completes facility location decisions and determines the starting point of vehicles in the lower level path planning. The lower level model is a subordinate layer, which is the follower of the dominant layer. It allocates customer points according to time and distance; solves the single vehicle path problem corresponding to the front warehouse; determines vehicle path planning; affects distribution costs, fresh arrival time and the resulting cargo damage costs; and reacts to upper level decisions. Finally, the global model of master-slave optimization is constructed with the iterative goal of minimizing the total cost of the fresh logistics network system in the dominant layer.