Genetic algorithms
Genetic algorithms search large sets of possible journey combinations by repeatedly improving a population of candidate solutions.
The idea
They can explore alternatives where exhaustively checking every grouping and route would take too long.
In practice
Candidates are evaluated against the chosen objectives and constraints. Good solutions are retained and varied; feasibility and the decision deadline remain essential.