I would like to model a scheduling problem using constraint programming (Python API of CPLEX : docplex.cp) where I have machines to allocate to activities. Activities are performed during work shifts and some tasks can be divised in at most 3 parts but can also not be seperated into several parts. I use interval variables to model activities and optional interval variables (with "Alternative" constraints) to model equipement allocations. The different parts of a given tasks may be performed using different equipments or the same.
A naive approach might be to force the division of long activities but I would like to make sure that the model choose the division only when it is necessary.
Thanks in advance for your ideas and for the help!