When to use engine extensions

Engine extensions should be used only after determining that the predefined constraints and search strategies do not fit your needs.

When designing your application, you may discover that there is no predefined constraint that fits your needs and that writing a constraint propagator does not provide the flexibility that you need to write an inference algorithm which performs the most efficient domain reductions. Or, you may decide that a search technique more complex than search phases with custom evaluators and choosers would perform better for your particular problem. Or you may need to create portions of the model during the search process itself. To implement a custom search, you must also take full control of the search process.

The engine extensions API for CP Optimizer allows you much more flexibility in terms of defining new constraints and constructive search; however, the drawback is that these customizations are generally more difficult to maintain and update than the predefined constraints and search strategies provided in CP Optimizer.