## 1 Introduction
They are flexible [18]: AI systems can adapt to changing conditions, such as unexpected delays or new orders by continuously reevaluating and adjusting assignments in real-time. Heuristic approaches may require manual adjustments to accommodate changes. Finally, AI scalability is advantageous: AI solutions can scale to handle many more transportation orders after the model is trained. Heuristic methods may struggle to handle such complexity effectively. In the current Romanian freight railway system, the allocation of locomotive drivers is carried out manually by designated dispatchers that invest time, great effort, and are exposed to the risk of fatigue and subsequent human error. An AI solution could replace the heavy manual work of the rail dispatchers and solve several of the limitations of the heuristics methods through an automated, time and resource efficient solution for the allocation of locomotive drivers in rail freight transportation. Moreover, recent special reports from the European Court of Auditors conclude that European freight rail transport is not yet on the right track [19]. Shifting focus from roads and increasing the utilization of alternative freight transportation modes, such as railways, can significantly contribute to making freight transport more environmentally friendly (greener) [19]. There are currently numerous European policies and strategies aimed to transform rail cargo transportation to a more competitive alternative [19]. Our paper aligns with the current European Union effort by proposing an AI/ML method to optimize resource management in rail freight transports. Our team worked on a software application, the Ferodata system, that captures the technical-dynamic sensory information of the locomotive, based on which it creates the circulation history of the locomotive/train to which it is associated. The circulation history presents, in chronological order, the passing stations, the station stop times, as well as the fuel consumption/electric energy consumption associated with the section of the route. Through the Ferodata mobile application, the locomotive driver reports the rest time and location at the beginning of each service. These pieces of information are accumulated in the Ferodata system within the performance history. By correlating the performance history with the circulation history, the location of each driver and the route to the current location can be determined. From the circulation history, the route of travel and the required driving times to reach the destination can also be deduced. Thus, the whereabouts of each driver can be known at any given moment, as well as the current driving/service times. Furthermore, it is possible to analyze the working hours situation per workplace, period, and locomotive driver. We aimed to develop and add to our Ferodata AI engine an innovative AI/ML module that automatically assigns locomotive engineers to freight transportation orders based on collected data such as circulation history and drivers' availability, service time and current location. The module is built to optimize the number of drivers and the amount of service times while complying with the legal regulations. Our final aim is to replace the manual work of rail dispatchers, bringing significant economical and resource management benefits to railway companies and better experience and satisfaction for the final clients.