In public passenger transport on urban and long-distance routes in municipalities, differences often occur in the total working time of drivers on routes. This creates preconditions for dissatisfaction between drivers because they have a different workload, and often calculated wages are not tied to time or if they are, they are tied proportionally to the work done. In order to avoid this, it is necessary that the working time of the drivers to be the same. There are cases where this is not possible for objective reasons relating to the length of routes, running time, business of the streets, etc. It is therefore necessary to find such a solution where the difference in weekly working time between the driver worked the most time and the driver worked the least time on the routes in question to be minimal. In this regard, a mathematical model has been developed, which is partly an integer non-linear task. Such tasks are solved using different methods and a mathematical apparatus, but in this case a technique of integer optimisation is applied, by which the task is reduced to linear, with additional binary variables introduced. Increasing the number of variables and solution to the task through a classic approach often leads to the use of a greater amount of time to solve, which is sometimes undesirable. In this regard, heuristic algorithms have been used to solve Mixed-integer Linear Programming (MILP). The choice of heuristic algorithms is determined mostly by the size of the task. The calculations in this paper have been made with Matlab version 2017b's with the built-in intlinprog feature, which has different heuristic algorithms to solve MILP. The calculations made are for the weekly work of bus drivers in a municipality and show that the difference in the maximum and minimum working times on the routes in question can be successfully minimized.