# 5-1 Problem-Solving Examples (Non-Preemptive Case)

## Presentation on theme: "5-1 Problem-Solving Examples (Non-Preemptive Case)"— Presentation transcript:

5-1 Problem-Solving Examples (Non-Preemptive Case)

5-2 Outline Job-shop scheduling problem (JSSP) –Problem definition –Basic search procedure –Heuristics –Results Resource-constrained project scheduling problem (RCPSP)

5-3 JSSP: Problem definition Set of machines {M 1... M m } Set of jobs {J 1... J n } List of operations O i 1... O i m(i) for each job J i Processing time p i j for each operation O i j Machine M i j for each operation O i j

5-4 JSSP: Problem variables Integer variables start(O) and end(O) for each operation O Optimization criterion makespan  max i (end(O i m(i) ))

5-5 JSSP: Problem constraints Temporal constraints 0  start(O i j ) end(O i j )  start(O i j  1 ) Duration constraints start(O i j )  p i j  end(O i j ) Exclusion constraints M i j  M k l implies [end(O i j )  start(O k l )] OR [end(O k l )  start(O i j )]

5-6 JSSP: Decision var. complexity NP-complete in the strong sense when m  3 and m(i)  3 for all i Solvable in polynomial time if m  2 and m(i)  2 for all i NP-complete in the ordinary sense when m  2 and m(i)  3 for all i, or when m  3 and m(i)  2 for all i Flow-shop scheduling: NP-complete in the strong sense for m  3

5-7 JSSP: Basic search procedure Select a machine M and a set  of operations which require M For each operation O in , create a branch where O is set to execute before (or after) all the other operations of  Select a branch, propagate the decision, and iterate (until a solution is found or no branch remains)

5-8 JSSP: Makespan minimization Set makespan min to an obvious lower bound Set makespan max to an obvious upper bound Iterate until makespan min  makespan max –Select a value in [makespan min makespan max ) –Constrain the makespan to be smaller than (or equal to) the chosen value –Run the search procedure: when a solution is found, set makespan max to the makespan of the solution; if there is no solution, set makespan min to (value  1)

5-9 JSSP: Makespan minimization Example –start with makespan min obtained by propagation –until a solution has been found, increment the tested value by min(2 i  1, (makespan max  makespan min )  2) (after the i th iteration) –after a solution has been found, set the tested value to (makespan max  makespan min )  2

5-10 JSSP: Heuristics Selection of the machine Find the task interval [start min (A), end max (B)] with the highest demand/supply ratio TI  {C | start min (A)  start min (C) and end max (C)  end max (B)} demand   C  TI duration(C) supply  end max (B)  start min (A)

5-11 JSSP: Heuristics Branch exploration ordering –First or last? Always select an operation to execute first Always select an operation to execute last Use edge-finding rules to determine the number N f of operations that can be first and the number N l of operations that can be last (and select the option with the smallest number of candidates)

5-12 JSSP: Heuristics Branch exploration ordering –Select the branch on which the operation with the smallest end max is scheduled first (EDD) –Select the branch on which the operation with the largest start min is scheduled last –Propagate each alternative in turn and select the one which appears the most constraining

5-13 JSSP: Benchmark results [Applegate & Cook 91] –Ten instances with 10 jobs and 10 machines (100 operations) –Results (table) taken from [Le Pape 95] [Vaessens et al 94] –Thirteen instances (one open) with up to 225 operations

5-14 JSSP: Benchmark results Instance BT CPUBT(PR)CPU(PR) MT1013684184.8 4735 52.8 ABZ519303226.6 4519 49.7 ABZ6 6227 80.3 312 3.8 LA1918102219.2 6561 74.7 LA2040597407.320626 186.9 ORB122725323.7 6261 85.3 ORB231490416.414123 189.3 ORB336729488.422138 277.6 ORB413751169.9 1916 19.0 ORB512648168.5 2658 29.7

5-15 Benchmarks (Applegate & Cook) MT10 ABZ5 ABZ6 LA19 LA20 ORB1 ORB2 ORB3 ORB4 ORB5 [Applegate & Cook 91] Number of nodes CPU time (Sparc1) [Baptiste et al 95] [Le Pape 95] Number of fails CPU time (RS6000) [Caseau & Laburthe 95] CPU time (Sparc10) [Colombani 96] Number of choices CPU time (Sparc 5) 2525 2 10 2 15

5-16 MT10 ABZ5 ABZ6 LA19 LA20 ORB1 ORB2 ORB3 ORB4 ORB5 PROOFS OF OPTIMALITY [Applegate & Cook 91] Number of nodes CPU time (Sparc1) [Baptiste et al 95] [Le Pape 95] Number of fails CPU time (RS6000) [Caseau & Laburthe 95] Number of fails CPU time (Sparc10) Benchmarks (Applegate & Cook) 2525 2 10 2 15

5-17 MT10 LA02 LA19 LA21 LA24 LA25 LA27 LA29 LA36 LA37 LA38 LA39 LA40 [Adams et al 88][Mattfeld 96] [Nuijten & Le Pape 97][Nowicki & Smutnicki 93] [Caseau & Laburthe 95][Van Laarhoven et al 92] 5 10 15 Benchmarks (Vaessens et al)

5-18 MT10 LA02 LA19 LA21 LA24 LA25 LA27 LA29 LA36 LA37 LA38 LA39 LA40 [Adams et al 88] (Vax780) [Mattfeld 96] (Sparc10) [Nuijten & Le Pape 97] (RS6000) [Nowicki & Smutnicki 93] (PC) [Caseau & Laburthe 95] (Sparc10) [Van Laarhoven et al 92] (Vax785) 2525 2 10 2 15 Benchmarks (Vaessens et al)

5-19 RCPSP: Problem definition (1) Given: –m resources R 1... R m with given capacities c 1... c m –n activities A 1... A n with given durations d 1... d n –precedence constraints between activities –resource requirements q ij (for activity i and resource j) assign start and end times to activities so as to satisfy the constraints and minimize the duration of the overall project

5-20 RCPSP: Problem definition (2) Given: –m resources R 1... R m with given maximal capacities c 1 max... c m max –n activities A 1... A n with given minimal durations d 1 min... d n min and maximal durations d 1 max... d n max –precedence constraints between activities –resource requirements q ijd (for activity i, resource j and duration d) assign start and end times to activities so as to satisfy the constraints and achieve the "best" tradeoff between the duration of the overall project and the peak capacity of the resources

5-21 RCPSP: Problem variables Integer variables start(A i ) and end(A i ) for each activity A i Integer variables duration(A i ), c j and q ij in the variable-duration variable-demand case Optimization criterion makespan  max A (end(A))

5-22 RCPSP: Problem constraints Resource capacity constraints (c j ) Duration constraints Precedence constraints Resource requirement constraints (q ij ) Relations between durations and resource requirements

5-23 RCPSP: Search procedure (1) 1Initialize the set of selectable activities  to the complete set. 2If all activities have fixed start and end times, exit. Otherwise remove from  those activities which have fixed start and end times. 3If  is not empty, select an activity from , create a choice point for the selected activity (to allow backtracking) and schedule the selected activity from its earliest start time to its earliest end time. 4If  is empty, backtrack to the most recent choice point. (If there is no choice point left, report that there is no problem solution and exit.) 5Upon backtracking, mark the backtracked activity as not selectable as long as its earliest start and end times have not changed. Then goto step 2.

5-24 RCPSP: Search procedure (2) 1Initialize the set of selectable activities  to the complete set. 2If all activities have fixed start and end times, exit. Otherwise remove from  those activities which have fixed start and end times. 3If  is not empty, select an activity from , create a choice point for the duration of the selected activity, select a duration, create a choice point for the start and end times of the activity and schedule the selected activity from its earliest start time to its earliest end time. 4If  is empty, backtrack to the most recent choice point. (If there is no choice point left, report that there is no problem solution and exit.) 5Upon backtracking on a start/end time choice point, mark the backtracked activity as not selectable as long as its earliest start and end times have not changed. Then goto step 2. 6Upon backtracking on a duration choice point, select another duration.

5-25 RCPSP: Optimization Classical minimization scheme Pareto-optimization (find all Pareto-optimal tradeoffs) 1Generate a solution which minimizes the first criterion c 1. (If there is no solution, exit.) Let v 1 be the optimal value for c 1. 2Constrain c 1 to be smaller than or equal to v 1. Generate a solution which minimizes the second criterion c 2. Let v 2 be the optimal value for c 2. The solution found is Pareto-optimal. 3Remove the constraint stating that c 1 is smaller than or equal to v 1. Replace it by a constraint stating that c 2 is strictly smaller than v 2. Goto step 1.

5-26 RCPSP: Heuristics Selection of an activity –Select the activity with the smallest end min Selection of a duration –Select the shortest possible duration

5-27 RCPSP: Results Ship loading problem [Aggoun & Beldiceanu 92] –1 resource –34 activities with precedence constraints –Fixed-duration fixed-demand fixed-capacity: 0.2s –Fixed-duration fixed-demand Pareto-optimization: 0.4s –Variable-duration variable-demand fixed-capacity: 0.2s to 0.9s –Variable-duration variable-demand Pareto-optimization: 13s Industrial problem –2 resources –40 to 50 activities with precedence constraints –Variable-duration variable-demand fixed-capacity: 1s

5-28 RCPSP: Results However, the efficiency of RCPSP search procedures is shown to depend a lot on the structure of the precedence network. Much harder instances can be obtained by simple modifications of the ship loading problem. Additional constraints of real-life problems can make the problem much more simple or much more difficult than the RCPSP.

Similar presentations