In the code you used, two jobs will not be able to be processed on the same machine because the machines that can execute the operations of a job are disjoints. So I assume that you have such a constraint at operation level.
Considering a group of operations, if we want to force them to be executed on the same machine, you have to gather
- the common set of machines that these operations can be processed on, say M
- the set of corresponding modes intervals for each machine say A(m, id), where m is the machine and id the mode id
then for each machine m in M, state the following constraints :
presenceOf(A(m,0)) = presenceOf(A(m, id)) for each id > 0
This will force the operations of a same groupr to be processed on the same machine.
------------------------------
Philippe Refalo
IBM ILOG CP Optimizer
------------------------------
Original Message:
Sent: Fri July 28, 2023 10:55 AM
From: Ali Balma
Subject: Grouping jobs in the flexible job shop scheduling example
Hi everyone,
In the example of flexible job shop scheduling of OPL Cplex, some operations of a job can be processed on a subset of different machines.
Suppose now that we have some groups within which jobs are grouped. We have an additional constraint requiring that the jobs belonging to a specified group must be performed on the same machines.
In other terms, we define
tuple Groups{
int jobId;
int grp;
}
{Groups} Grp=...;
Where Grp contains pairs of jobs and groups within which they are grouped.
I would like to add a constraint specifying this constraint by constraint programming, but I do not see how to achieve this.
Thanks in advance
------------------------------
Ali Balma
------------------------------