3.3.3. Evaluate the End of Searching

If the position distances between the particles were less than 0.01, the search result was converged (Equations (18)–(21) and the optimal solution was reached. To prevent the searching time from being too long, an extra setting was added. If the particle search time was greater than 0.5 s, the current best value was directly taken as the optimal torque of the engine.

$$\left| T\_{E,1} - T\_{E,2} \right| < 0.01 \tag{18}$$

$$\left| T\_{E,2} - T\_{E,3} \right| < 0.01 \tag{19}$$

$$\left| T\_{E,3} - T\_{E,4} \right| < 0.01 \tag{20}$$

$$\left| T\_{E,4} - T\_{E,1} \right| < 0.01 \tag{21}$$
