Defining a solution
A solution satisfies the constraints of the problem.
In CP Optimizer, a solution can never violate a constraint. By definition, a solution satisfies the constraints of the problem, and any problem in which a constraint is violated has no solution in constraint programming terms.
In contrast, when a client specifies the requirements of a problem, the client may have loose or vague ideas about ways in which an acceptable solution might violate a constraint just a little bit; or a solution might ignore certain restrictions sometimes; or a solution could overlook a requirement if necessary.
To cope with this difference between how constraint programming construes a solution and what your client expects as a solution, you must first understand what the client regards as a solution. One approach to this task is to ask your client for a sample solution.
If the known solution fails in your application, then you know that your model does not correspond to the client’s idea of an acceptable solution. Your next task, then, is to agree with the client about what really constitutes a solution to the problem. A first step toward this agreement is to identify which constraints can never be violated in the client’s mind. For example, security regulations might be such: no solution acceptable to the client should violate a security regulation. In such a problem, security regulations will consequently be expressed as constraints.