Originally posted by: PhilippeLaborie
Hello. Could you be a bit more precise about the results being "good" or "bad": could you attach the search log corresponding to the two situations?
Beside a data file, could you also post a .cpo file corresponding to your problem instance?
As the model uses floating point expressions, there is no guarantee that the resolution behaves the same on different platforms. So it could be either that there is indeed an issue in CPO or that the resolution of this problem instance is very unstable and a small change in the search (like running on different machine) have a huge impact on performance in the end. One thing that you should try is running the same instance on the same machine (for instance intel i3) on a large number of different random seeds (parameter RandomSeed) to see if there is some variability in the results. We even provide a tool (runseeds) for doing that.
Looking at your model, I noticed that there are many ways to improve the formulation because yours does not exploit enough the scheduling concepts of CP Optimizer and in particular the concept of "optionality" which could avoid many composite constraints in your model. In fact, if I don't mistake, your problem almost looks the same as the one described as introduction to this CP Optimizer tutorial: http://ibm.biz/icaps2017-tut (slides 3-14). A CP Optimizer model formulation for the problem is described on slides 168-176. But it can be interesting for you to go through all the material of this tutorial. There is also an "article" version of the tutorial with similar content that you may find easier to read (http://ibm.biz/Constraints2018), though in the article, the full formulation of this semiconductor problem is omitted.
The bottom line is that you should use "alternative" constraints as soon as, in your scheduling problem, you have anything that is related with the allocation of the activities to some resource/machines. You should use "noOverlap" constraints as soon as you need to model a resource that can perform only one activity at a time. And you should think of "state functions" as soon as you want to model a resource that executes the activities by "batches" (like in your case). In the end, (in general, of course there may be a few exceptions), a good formulation of a scheduling problem in CP Optimizer has a size that grows linearly with the size of the data (no quadratic sets of constraints like: for(i in ...) for(j in ...) overlapLength(itv[i],itv[j])==0) and no need for composite constraints like: presenceOf(x) && presenceOf(y) => ...
Let us know if you have questions regarding the formulation of your particular model.
But please, also send us a .cpo file as it may be that there is also something else in the CP Optimizer engine.
#DecisionOptimization#OPLusingCPOptimizer