I am running into a very strange issue with an OPL model for scheduling, using CPLEX 12.5.1 on a Windows machine. The original model has over 500 lines of code plus 200 lines of data. However, I was able to reduce it to ~75 lines (please see the attached file) while still retaining symptoms of the strange behavior. Here is the issue:
The iHorizon variable in the model is the scheduling horizon: all scheduled tasks should end by iHorizon (see line 26). Ignoring the semantic details or meaning of the model, simply running it with iHorizon=7 results in a valid solution while running it with iHorizon=8 (or any other larger value) results in CPO reporting that there is no solution. (The conflict analyzer kicks in in the latter case, when using the Optimization Studio.)
I am really puzzled by this! Should increasing iHorizon not always make it easier to find a feasible solution? In fact, since all interval variables in the model are optional, scheduling nothing should *always* be a feasible solution.
An alternate way to have the model produce a valid solution with iHorizon=8 is to provide it part of the solution, by forcing presenceOf(vShiftPulse[<s,"R1",1>]) in line 68. But again, why would an additional constraint turn the problem from infeasible to feasible?
I am guessing I have incorrectly used OPL syntax somewhere, perhaps in the cumulFunction definitions/usage. I would be happy to explain what the model is trying to achieve, if that helps, but it seems that there should be an explanation of the behavior even without knowing the intended purpose of the model.
Any help in identifying the bug would be highly appreciated! Thanks!