I'm a CPLEX user but never used CP. The time has arrived.
I have a CPLEX model for which I just want to obtain a feasible solution, no matter which one, so the objective function is useless for me.
I set the integer solution limit to 1 and solve it with CPLEX.
Can I use the same set of constraints and model objects to solve it using CP? In this case, where would the main modifications be done? Can you point to a example in C++?
Tks!
Topic

Re: cplex to cp
20121119T13:45:46ZThis is the accepted answer. This is the accepted answer.It is quite easy to use a model developped for CPLEX in CP OPtimizer. CP Optimizer is able to handle linear or nonlinear models. You need to include cp.h and to replace the sequence
IloCplex cplex(model);
cplex.solve();
by
IloCP cp(model);
cp.solve();
You can remove the objective function from your model is you wish. Most of CPLEX parameter settings cannot be aplied to CP Optimizer but you will have an output log that will show the search progress.
Note that, on linear models, CPLEX will give better performance in general than CP Optimizer. To take benefit from CP you will probably have to give more structural information in the model using logical constraints and global constraints. For more details and examples, please have a look at the first chapters of the user manual.
Cheers
Philippe