Constraint programming (CP) refers to a paradigm in which the user formulates a model declaratively by specifying variables and their relationships through constraints. Algorithms then try to find a valid solution for the model by successively reducing the possible value ranges of the variables.
Generally speaking, constraint programming is therefore not an optimisation method but a method for determining a variable assignment that satisfies all constraints. However, by specifying a minimum or maximum value for an objective function, it can also be used to solve optimisation problems.
In optimisation, constraint programming always works well when there are only a few possible solutions and these are difficult to find. So far, there are only a few constraint programming approaches in route optimisation that work better than ‘classic’ optimisation methods.