I am trying to convert the job shop scheduling example of CP-SAT, which goes as;
Below is a simple example of a job shop problem, in which each task is labeled by a pair of numbers (m, p) where m is the number of the machine the task must be processed on and p is the processing time of the task — the amount of time it requires. (The numbering of jobs and machines starts at 0.)
job 0 = [(0, 3), (1, 2), (2, 2)]
job 1 = [(0, 2), (2, 1), (1, 4)]
job 2 = [(1, 4), (2, 3)]
In the example, job 0 has three tasks. The first, (0, 3), must be processed on machine 0 in 3 units of time. The second, (1, 2), must be processed on machine 1 in 2 units of time, and so on. Altogether, there are eight tasks.
The difference in what I seek is that task 0 can be placed on multiple machines (for instance, 4). The constraint is of course that it can only be assigned to one of the four. How can i best setup this? Should I for example use a list of tuples per task? e.g.
job 0 = [ [(0, 3) (1,3) (2,3) (3,2)], (1, 2), (2, 2)] # task 0 for job 0 can occur on four machines, for which the shortest duration is on machine four (2).