## 3 Time and Energy Optimization by Multi-Weighted Dynamic Programming
Table 2 presents the parameters used in this study. (2) Cost allocation for each edge of the node connection  
At the edge connecting the two nodes, when \(d_{s}\) is constant, the amount of power calculated for each speed change and the time required to move are recorded. In addition, the sum of the weighted values of these two values is recorded. For multiple weights, the cost equal to the number of weights is recorded. Here, the cost is recorded at each edge connecting the front and rear nodes from the starting point. At this time, the cost is determined using the speed of each node that connects the edges and the movement distance between the nodes. The time (\(T_{i}\)) and energy (\(P_{h}\)) required to move between these two nodes are calculated. Moreover, the acceleration between two adjacent nodes is calculated using Equation (11), and the moving time is obtained using the average-speed (\(v_{m}\)), as shown in Equation (10), and the discrete distance (\(d_{s}\)) between nodes, as shown in Equation (12). Then, the energy (\(P_{h}\)) required at this time can be obtained using the force and speed required for moving between nodes, as shown in Equation (13). The weighted cost can be calculated using the obtained time and energy, as shown in Equation (14). In this case, \begin{table}
\begin{tabular}{c c c c c c} \hline
**Total Travel** & **Max Speed** & \(d_{s}\) & \(d_{v}\) & **Number of Distance** & **Number of Velocity** \\
**Distance (m)** & **(km/h)** & **(m)** & **(m/s)** & **Axis Nodes (\(N_{d}\))** & **Axis Nodes (\(N_{v}\))** \\ \hline
806.25 & 80 & 8.96 & 0.25 & 90 & 90 \\ \hline \end{tabular}
\end{table} 
Table 2: Discretization and parameters for dynamic programming. Figure 1: Speed profile according to dynamic program algorithm. (Green: possible paths, Red: optimal path). the weight (\(\alpha\)) is an array that is obtained by dividing the value between [0,1] into several parts. Each weight can determine the time and energy-ratio allocation ratio. When the weight is zero, the time is minimized, and when the weight is one, the solution can be obtained, such that the energy consumption is minimized. Therefore, if this weight is set to a value between zero and one, the destination arrival time and energy consumption change accordingly. Here, the arrival time is determined according to the proportion of each weight applied to the cost function. According to the optimization cost function in Equation (14), when the weight is 0, it has the fastest arrival time, while when the weight is 1, it has the slowest arrival time. Therefore, each edge is recorded as an array of costs equal to the number of weight decompositions. \[v_{m}=\frac{v_{k+1+}v_{k}}{2} \tag{10}\]  
\[a_{m}=\frac{v^{2}_{k+1-}v^{2}_{k}}{2d_{s}} \tag{11}\]  
\[T_{i}=\frac{d_{s}}{v_{m}},d_{s}=d_{k+1}-d_{k} \tag{12}\]  
\[P_{h}=(P_{t}+P_{aux})\cdot T_{i}=(F_{t}v_{m}+P_{aux})\cdot T_{i} \tag{13}\]  
\[E_{k,k+1}=\frac{P_{h}}{P_{max}-P_{min}}\alpha+\frac{T_{i}}{T_{max}-T_{min}}(1 -\alpha), \tag{14}\]  
where \(E_{k}\) is the cost at the edge with multiple weights that determine the ratio between time and energy. The weight is defined by Equation (15). \[\alpha=[\alpha_{0}\ \alpha_{1}\ \alpha_{2}\ \cdots\ \alpha_{N}]^{T},\ \alpha_{0}=0,\ \alpha_{N}=1,\ \ \alpha_{n}>\alpha_{n-1},\ \ \ n=0,\ 1,\ 2,\ \cdots,\ N. \tag{15}\]  
The weight interval between 0 and 1 is adjusted by applying an exponential function, as shown in Equation (16), to reduce the duplication of velocity profiles as much as possible. Here, \(\chi\) is equally divided and applied using the desired number of weights. \[\alpha=\frac{2^{x}-1}{2^{x_{max}}-1},\ \ \ \ \ x=[0,\cdots,5],\ \ \ \ \ x_{max}=\max(x). \tag{16}\]  
Here, \(P_{max}\) and \(P_{min}\) are the maximum and minimum section energies, respectively, and \(T_{max}\) and \(T_{min}\) are the maximum and minimum section travel times, respectively.