# # Given the data below consider the following 4 problems # # A) 1 | prec | L_{max} # B) 1 | r_j | L_{max} # C) 1 | prec | \sum C_j # D) 1 | r_j, prec | L_{max} # # Case A is not NP-hard and you may think about a polytime algorithm to # solve it. For the other cases, make a Gecode implementation of a CP # solver. The focus of the exercise is on the implementation of # disjunctive constraints, hence to remove confusion you may start # considering case C that does not have to deal with release dates and # due dates. n_jobs = 7; n_machines = 1; job_duration = [6,18,12,10,10,17,16]; job_release_date = [0,0,0,14,25,25,50]; job_due_date = [8,42,44,24,90,85,68]; #precedences: 2 -> 1 -> 4 # 6 -> 7 # # alternative format: # (i,j) = 1 => i->j precedences[| 0,-1,0,1,0,0,0 | | 1,0,0,0,0,0,0 | | 0,0,0,0,0,0,0 | | -1,0,0,0,0,0,0 | | 0,0,0,0,0,0,0 | | 0,0,0,0,0,0,1 | | 0,0,0,0,0,-1,0 |];