The field of science (math) that studies this (and applies it) is called "Operations Research"[0] and it's about optimization & planning. About 30yrs ago they started applying it to airline scheduling, here's a few random papers I found:
https://www.researchgate.net/publication/245236750_Airline_S...
https://www.sciencedirect.com/science/article/abs/pii/030504...