Describe the problem
The first stage in solving a constraint programming problem with CP Optimizer is to describe the problem using natural language.
The first stage is to describe the problem in natural language.
What is the unknown information, represented by the decision variables, in this problem?
The values of x and y, where x is an integer between 5 and 12 inclusive and y is as integer between 2 and 17 inclusive.
What are the limits or restrictions on combinations of these values, represented by the constraints, in this problem?
x + y = 17
x - y = 5
Though the Describe stage of the process may seem trivial in a simple problem like this one, you will find that taking the time to fully describe a more complex problem is vital for creating a successful program. You will be able to code your program more quickly and effectively if you take the time to describe the model, isolating the decision variables and constraints.