## 3 Model Construction and Review of Traditional A* Algorithms
### Mathematical Model
\[W_{1}+W_{2}=1 \tag{2}\]  
\[\text{Cost}_{EM}=c_{EM}\cdot\xi_{grid}\cdot\frac{1}{\eta\cdot\eta_{g}}\left( \sum_{i,j}E_{ij}+\sum_{k}E_{hk}\right) \tag{3}\]  
\[d_{ij}=\sqrt{(x_{j}-x_{i})^{2}+(y_{j}-y_{i})^{2}} \tag{4}\]  
\[\text{Cost}_{EM}=c_{EM}\left(\xi_{grid}\frac{E_{ij}}{\eta\cdot\eta_{g}}+E_{h}\right) \tag{5}\]\[E_{ij}=p(v_{ij})\cdot l_{r} \tag{6}\]  
\[p(v_{ij})=\frac{1}{2}C_{\rm D}S_{f}\rho\sqrt{(v_{ij})^{3}}+\sqrt{\frac{m_{0}^{3} \delta^{3}}{2\rho S_{f}}} \tag{7}\]  
\[l_{r}=\frac{\sum_{i}\sum_{j}d_{ij}}{v_{ij}} \tag{8}\]  
\[E_{h}=W\cdot l_{l}=\frac{2 mg^{2}}{\sqrt{\rho A_{r}}}\cdot l_{t} \tag{9}\]  
\[\sum_{i,j}E_{ij}+E_{hk}\leq E_{\rm max}\quad\forall k\in\{1,\ldots,U\} \tag{10}\]  
\[W_{1}+W_{2}=1 \tag{2}\]0  
\[W_{1}+W_{2}=1 \tag{2}\]1  
\[W_{1}+W_{2}=1 \tag{2}\]2  
\[W_{1}+W_{2}=1 \tag{2}\]3  
\[W_{1}+W_{2}=1 \tag{2}\]4  
\(c\) Individual UAV purchase cost  
\(U\) Number of UAVs required for monitoring  
\(c_{EC}\) Unit price of electricity (price of electricity consumed per unit distance)  
\(d_{ij}\) Euclidean geometric distance  
\(c_{EM}\) Unit environmental costs  
\(\xi_{grid}\) Marginal carbon dioxide dioxide emission rate  
\(E_{ij}\) Theoretical energy consumption of UAVs flying along planned paths  
\(p(v_{ij})\) Unit energy expended in horizontal motion (when the UAV is flying horizontally at speed \(v_{ij}\))  
\(v_{ij}\) UAV flight speed  
\(G\) Representing raster maps  
\(l_{r}\) Duration (duration at this speed \(v_{ij}\))  
\(\eta\) Integrated efficiency for battery charging and discharging  
\(\eta_{g}\) Efficiency of grid transmission and distribution  
\(C_{D}\) Pneumatic resistance factor  
\(S_{f}\) Front surface area of the drone  
\(p\) Air density  
\(m_{o}\) Weight of a single drone  
\(g\) Gravitational acceleration  
\(E_{max}\) Battery capacity  
\(T_{max}\) Total task time limit  
\(E_{hk}\) Hover energy consumption of the \(k\)-th drone  
\(l_{tk}\) Hover time of the \(k\)-th drone Objective (1) is to minimize the total weighted costs, including economic and environmental factors. Constraint (2) stipulates that the sum of weights \(W_{1}\) and \(W_{2}\) equals 1. Constraint (3) defines the economic cost as the sum of the UAV's fixed purchase cost and its per-unit economic cost. Constraint (4) specifies the Euclidean distance for UAV flight paths. Constraint (5) accounts for the total environmental cost of the monitoring process, comprising horizontal movement and hovering energy expenses. Constraints (6), (7), and (8) outline the theoretical energy expenditure for horizontal movement of UAVs, the energy consumption per unit speed \(v_{ij}\), and the horizontal movement speed, respectively. Constraint (9) captures the hovering energy cost during UAV monitoring, calculated as the product of hovering power and duration. Constraint (10) ensures that the total energy consumption of each drone does not exceed the battery capacity \(E_{max}\). Constraint (11) ensures that the task is completed within the time limit \(T_{max}\). Constraint (12) means the path avoids obstacle coordinates. Constraints (13), (14), and (15) are left undefined. Explicit assumptions underpinning the construction of this mathematical model are delineated, including the assumption of a constant flight velocity. The residence time at each monitoring point is assumed to be equivalent to the flight duration. Energy consumption is assumed to vary between horizontal motion and hovering. The influences of flight inclination and wind speed on UAV flight are not considered. Combined with the mathematical model established above in this article, the core variables to be considered comprehensively for UAV monitoring of carbon dioxide emissions from heavy trucks in the harbor area are the cost of UAV purchase inputs and the length of monitoring paths, which affect our total economic cost and total environmental cost, respectively.