Originally posted by: rdumeur
Hi,
I think you will find help in an example provided in the product: sched_jobshopflex.
In the .mod file you'll see that an operation can be instantiated on different machines by using alternatives (modes in this example). So you have an interval variable representing the operation and the alternative constraints ensure that the operation happens only on one machine by ensuring that the corresponding interval variable is selected.
Note that this example is more sophisticated because it even allows for different execution times depending on which machine the operation is performed.
To ensure that processed are done one after the other on each machine, the noOverlap constraint is used on a sequence variable representing the operations performed on each machine.
To ensure that operations are performed in the correct order, operations are connected via endBeforeStart constraints.
I hope this helps.
#CPOptimizer#DecisionOptimization