I have formulated a flexible job shop problem as a CP model like it is advised in CPLEX Optimization Studio. The problem is running and creates correct schedules. So my question is if there is a possibilty also to let this problem be solved with the CPLEX-Engine without transforming it into a MIP. So that I can compare the results of the two engines. So in general if it is possible to run the CPLEX-Engine on a CP formulated model or if I have to create a seperate MIP for that?
Yes, this is possible. And in OPL it is easy enough to try. Just add or remove a line
using CP;
at the beginning of your .mod
to use CP optimizer or CPLEX.
However, each of the two engines there are modelong constructs that it supports and that it does not support. For example, CP optimizer does not support continuous variables, while CPLEX does not support alldiff constraints, interval variables, etc. If you get a "cannot extract" exception or similar then your model uses a modeling construct that is only supported by one of the engines.
Moreover, even if you don't get an exception then your comparison may still be biased: The performance of a solver engine not only depends on the model type and data but also on the actual model formulation. For a good number of problems there are ways to formulate them in a way that is good for CP but bad for CPLEX, or vice versa. So if one of the two engines proves slower, you would also have to think about whether your formulation is good for this particular engine.
All this being said, it is always worth a try and just see what happens.