remi
remi

Reputation: 133

Flexible Job Shop Scheduling [No Tasks, Only Jobs] with setup times

I need help with my Job Shop Scheduling Problem. At first I thought that it is easy to implement, since there are no tasks in a specified order involved. Each job is atomic. But I am struggling to even find an example code I can work from, since the setup time depends on the article of the previous job. AI is no help either.

Setup:

Restrictions:

Objective:

Example data:

jobs = [
    {"MG":"MG1","Job_ID":"Job1", "Articlecode": "A", "due_date":20, "duration":10},
    {"MG":"MG1","Job_ID":"Job2", "Articlecode": "B", "due_date":20, "duration":10},
    {"MG":"MG2","Job_ID":"Job3", "Articlecode": "C", "due_date":20, "duration":10},
    {"MG":"MG1","Job_ID":"Job4", "Articlecode": "A", "due_date":30, "duration":10},
    {"MG":"MG1","Job_ID":"Job5", "Articlecode": "B", "due_date":30, "duration":10},
    {"MG":"MG2","Job_ID":"Job6", "Articlecode": "C", "due_date":30, "duration":10},
    {"MG":"MG1","Job_ID":"Job7", "Articlecode": "A", "due_date":40, "duration":10},
    {"MG":"MG1","Job_ID":"Job8", "Articlecode": "B", "due_date":40, "duration":10},
    {"MG":"MG2","Job_ID":"Job9", "Articlecode": "C", "due_date":40, "duration":10},
]

machine_groups = {"MG1": ["M1", "M2", "M3"], 
                   "MG2": ["M4"]}

setup_matrix = {
    "A": {"A": 0, "B": 3, "C": 5, "D": 7},
    "B": {"A": 3, "B": 0, "C": 6, "D": 8},
    "C": {"A": 5, "B": 6, "C": 0, "D": 2},
    "D": {"A": 1, "B": 1, "C": 1, "D": 0},
}

The result should look like that, but with additional setup time between the jobs:

M3:  Job1 (A): (s:0 d:10 e:10)  > 0 setup time > Job7 (A): (s:10 d:10 e:20) 
M1:  Job5 (B): (s:0 d:10 e:10)  > 3 setup time > Job4 (A): (s:10 d:10 e:20)
M2:  Job2 (B): (s:0 d:10 e:10)  > 0 setup time > Job8 (B): (s:10 d:10 e:20)
M4:  Job3 (C): (s:0 d:10 e:10)  > 0 setup time > Job6 (C): (s:10 d:10 e:20)  > 0 setup time > Job9 (C): (s:20 d:10 e:30)

Do you know any example code or can you push me in the right direction? I have seen circuit constraints Link, but the implementation is too difficult for me, yet.

Upvotes: 0

Views: 82

Answers (0)

Related Questions