Locomotive assignment is a classic planning problem in railway industry. Different models and algorithms (e.g., network flow model, MIP model, adaptive dynamic programming) are proposed to solve this problem and have got remarkable progress. In practice, the locomotives are usually in the size of hundreds to even more than a thousand. So assigning individual locomotives to trains on railway network will result in too huge modeling space for the problem to be solved. Hence most existing research work takes a trade off to concern the types (or type combinations) of locomotives, which are usually in the size of tens at the most. This impedes the application value for being unable to consider the availability and maintenance requirement of individual locomotives. In this paper, a novel path-based MIP model is proposed for modeling the locomotive assignment problem. By adopting graph partition method on the space-time network, the original problem is decomposed into inter-connected multiple sub-problems. Then an iterative MIP solving algorithm is devised to find the near optimized solution for the original problem. The approach proposed in this paper has been validated in a railway bureau in China. The experiment shows that the approach has superior advantage in both scalability and performance with reasonable cost of objective value.