Abstract:We developed and compared Constraint Programming (CP) and Quantum Annealing (QA) approaches for rolling stock optimisation considering necessary maintenance tasks. To deal with such problems in CP we investigated specialised pruning rules and implemented them in a global constraint. For the QA approach, we developed quadratic unconstrained binary optimisation (QUBO) models. For testing, we use data sets based on real data from Deutsche Bahn and run the QA approach on real quantum computers from D-Wave. Classical computers are used to run the CP approach as well as tabu search for the QUBO models. We find that both approaches tend at the current development stage of the physical quantum annealers to produce comparable results, with the caveat that QUBO does not always guarantee that the maintenance constraints hold, which we fix by adjusting the QUBO model in preprocessing, based on how close the trains are to a maintenance threshold distance.