Originally posted by: Petr Vilím
Hello Adam,
those are hard problems to model. I'm afraid that I can't give you a general pattern to follow. Special cases can be usually handled much better than fully generic one.
One possibility is to model the oven by stateFunction and noOverlap at the same time. Using expression startOfNext it is possible to make sure that there is no delay between intervals on the noOverlap. The intervals on the noOverlap can model different setting of the oven and demand the setting on the stateFunction using appropriate alwaysFoo constraint. The intervals can be optional and you need enough of them.
An example of a special case is when the oven has only two different states. Then noOverlap constraint is not necessary, instead there could be a chain of intervals modeling alternative states that is sticked together using endAtStart constraints.
Do you have fully general case? Is there a way to simplify it somehow?
I hope it helps, Petr
#CPOptimizer#DecisionOptimization