This study aims to develop a mathematical model for crew optimization in urban rail systems. In this sense, the proposed model offers a solution that considers the number of operators distributed daily in each working day, as well as providing the distribution of the workforce in work schedules, to minimize the total number of operators needed, but without any penalty to contractual work restrictions, legal restrictions and practical specificities presented by the operational context of the system. Another relevant aspect of the proposed model is the joint optimization of both the shifts and work schedule problem, without the need to use the timetable as an initial parameter for the model. Also in this work, the application of the model in a light rail vehicle (VLT) operator in the city of Rio de Janeiro is presented, while allowing the practical evaluation of the capacity to optimize the workforce after to use of the model, by the comparison between the generated computational results and the currently solution from the operator. In the end, some alternative work schedules in Brazilian labor legislation are tested and their direct gains in the reduction of the workforce obtained by optimizing the model are presented, as well as the guarantee of a more evenly fair work schedule, avoiding any work overload for operator or deviations from current labor legislation.