## 6 Conclusions  
A mathematical model for merchant self-operated takeaway delivery was established, and the rider's delivery routes were optimized using improved K-means and an ant colony algorithm based on fair strategy. The proposed framework can be directly applied to merchant self-operated delivery systems (e.g., local restaurants or small e-commerce platforms) to optimize rider assignments in real time. By balancing workloads, it reduces rider fatigue and improves delivery efficiency, aligning with industry needs for fair labor distribution and cost savings. The main conclusions are as follows:  
1. We employed an improved K-means algorithm to allocate customer orders to riders based on fairness strategies. Additionally, an ant colony algorithm enhanced by a roulette strategy was developed to generate optimal routes for riders.
2. To ensure equal order distribution, we designed an order quantity fairness strategy that redistributes K-means clustering results by considering the nodes' distances to all cluster centers. This strategy guarantees that each rider receives a comparable number of orders.
3. In accordance with the length difference of the optimal route calculated by the ant colony algorithm, the K-means algorithm was improved to redistribute the clustering result based on the designed travel distance fair strategy to balance the travel distance covered by each rider.
4. A sample with 80 consumer locations was proposed to verify the designed algorithm's and strategy's performance. The results demonstrate that the order quantity fair strategy and travel distance fair strategy have a good performance in finding an optimal delivery plan for the merchant.  
While the proposed framework demonstrated optimal performance in balancing workload fairness and routing efficiency, further research needs to be performed in the following areas:  
1. Integration of real-time data streams for dynamic clustering and routing to enable adaptive responses to real-time order fluctuations, traffic conditions, and rider availability changes.
2. Generalization of fairness tolerance thresholds across diverse delivery environments (urban/rural) through multi-objective optimization frameworks that simultaneously balance delivery efficiency, cost, and fairness, combined with machine learning-driven context-aware calibration.
3. Scalability improvements for large-scale datasets (\(N>500\)) in dynamic environments.  
Figure 11: The clusters redistributed by travel distance fair strategy.  
* Empirical validation and constraint incorporation in real-world logistics systems, including vehicle capacity limits, battery range modeling, and parameter refinement against industry KPIs.
* Conceptualization, C.G.; Methodology, J.C. and C.G.; Software, J.C. and J.K.; Validation, J.K. and S.S.; Formal Analysis, J.C. and Y.G.; Investigation, J.K. and J.D.; Resources, S.S.; Data Curation, J.D.; Writing--Original Draft, J.C.; Writing--Review and Editing, C.G., S.S. and Y.G.; Visualization, J.D. and Y.G.; Supervision, C.G.; Funding Acquisition, C.G. All authors have read and agreed to the published version of the manuscript.
* This work was supported by the Harbin Manufacturing Technology Innovation Project (No. 2023 CXRCCG009), the National Natural Science Foundation of China (No. 52075090), and the Fundamental Research Funds for the Central Universities of China (No. 2572021 BL01).
* Not applicable.
* The data presented in this study are available on request from the corresponding author due to privacy.  
The authors declare no conflicts of interest.