Download presentation

1
**Reservation Systems TimeTabling**

Week 6 10 maart 2004 Reservation Systems TimeTabling 1. Reservation Systems without Slack 2. Reservation Systems with Slack 3. Timetabling with Tooling Constraints 4. Timetabling with Recourse Constraints 5. Scheduling flights at the airport Operations Scheduling

2
**Relation between these problems**

1. Reservation Systems without Slack (timing of job is fixed) m Parallel machines, n jobs (fixed in time; interval scheduling) 2. Reservation Systems with Slack m Parallel machines, n jobs (more flexible in time) 3. Timetabling with Tooling Constraints Enough identical machines in parallel, n jobs, tools (only 1 of each avail.) 4. Timetabling with Resource Constraints Enough identical machines in parallel, n jobs, one resource

3
**Reservation Systems without Slack (Interval Scheduling)**

Topic 1 Reservation Systems without Slack (Interval Scheduling)

4
**Reservation without Slack**

Week 6 Reservation without Slack 10 maart 2004 Reservation system with m machines, n jobs Release date rj (integer), due date dj (integer), weight wj No slack If accepted, job starts at time rj Can we accept all jobs? Do we need all machines? objective1: Maximize number of jobs processed OR objective2: Minimize number of machines needed for all jobs Operations Scheduling

5
**ILP Problem Formulation**

e.g. at car-rental: hi pj Integer Program Fixed time periods, assume H periods Binary variables xij (=1 if job j assigned to i th machine, 0 otherwise) Job requiring processing in period l Jl ={j| rj l dj } Exercise 1: How to adapt model for: do all jobs, but on a minimum number of machines

6
**Maximizing value of processed jobs**

In general is NP-hard (when both pj and wij free) Two special cases with exact algorithms each of these algorithms sorts the jobs to increasing rj Case 1: processing times pj = 1 decompose into separate time units assign in each time unit most valuable jobs first

7
**Case 2: Identical Weights and Machines**

Mj = {1,2,…,m} with wij = 1 objective: maximize #jobs taken (No time decomposition, but still) an exact, simple algorithm: Dispatch jobs, tentatively, in order of increasing release date when next job has no machine while being earlier completed, select it at the expense of the later completed scheduled job

8
**Algorithm (case 2: Identical Weights and Machines)**

Step 1 Set J = and j = // J as set of accepted jobs Step 2 If available at time rj assign job j to a machine, include j in J, go to Step 4 Step 3 Of scheduled job set J, select j* with latest finish If do not include j in J and go to Step 4 Else delete job j* from J, assign j to freed machine & include in J Step 4 If j = N STOP, select next job j = j+1 and go back to Step 2

9
**Minimizing #machines used**

No slack, arbitrary processing times, equal weights, infinitely many identical machines in parallel Easily solved, as follows Order jobs as before to earliest release date Assign job 1 to machine 1 Suppose first j-1 jobs have been assigned for processing Try to assign j th job to a machine i ( j-1) as already used If not possible assign to a new machine Special case of node coloring problem Why special case? (to be discussed later..)

10
**Reservation Systems with Slack**

Summary Reservation Systems without Slack Maximize # of jobs processed: simple algorithm Minimize # of machines needed: simple algorithm Topic 2 Reservation Systems with Slack

11
**Reservation with Slack**

Now allow slack (time slots) Considering three cases with identical machines and objective: maximize #jobs Case 0. All processing times pj = 1 (trivial solution) Case 1. All processing times pj = p 2 , identical weights Case 2. General processing times, weights wj

12
**Case 1: Equal Processing Times**

Now assume processing times all equal to some p 2 NOTE: slack can be different Interaction between time units Method: Barriers algorithm wait for critical jobs to be released start the job with the earliest deadline Slot number l = l th job to start S(l) starting time of l th slot

13
Barriers Algorithm Barriers Algorithm (again open, whether this algorithm is exact!) Barrier ordered pair (l, r) Expresses waiting constraint Approach: Starting with a k-partial schedule construct a (k+1)-partial schedule or add a new barrier to the barrier list Lb and start over from scratch Slot number Release time

14
**Earliest Deadline with Barriers**

Selects machine h for job in (k+1)th slot Compute the starting time

15
**Computing the Starting Time**

t is defined as the earliest time that the next job can start Claim: Minimum release date of jobs left

16
**Job in (k+1)th slot, can be a crisis job**

Choose for (k+1)th slot: among available jobs, j ’ with earliest dj’ The creation of (k+1)-partial-schedule is successful if Otherwise, job j ’ is a ‘crisis job’ and one calls upon the Backtrack l=k, k-1, .. seeking 'pull-job' jl with dj(l) > dj' (most recently scheduled with later deadline than job j' ) If no pull-job is found, then exclude the crisis job Otherwise: Add barrier (l, r*) in Lb, with r* min. release time in restricted set Jr , of jobs in part. sched. after pull job Start anew with the updated barrier list Crisis Routine

17
**Barriers Algorithm: an example (all pj=10)**

Machine 1 Machine 2 1 2 3 Crisis job Pull job (d2 > d3)

18
An example (cont’d) Slot k=3 gives crisis job j=3 with pull job 2 in slot l=2 Setup restricted set: Jr={3} (min. release date r* = r3= 5) Include new barrier: (l, r*) = (2,5) Lb Restart with updated list Lb from scratch (with extra wait command) Crisis job Now at k=2, wait till M 1 M 2 1 3 1 2 3 4 2 Pull job (d2 > d3) Optimal schedule t

19
**CASE 2: General processing times**

Reservation with slack: processing times pj and weights wj NP-hard No efficient algorithm Heuristic needed Composite dispatching rule Preprocessing: determine flexibility of jobs and machines Dispatch least flexible job first on the least flexible machine, etc

20
**Defining priority indices**

yik := # candidate jobs on machine i in time slot [k-1,k] |Mj|= # machines suitable for job j Priority index Ij for jobs (lower index =higher priority): more value | less proc. | less machines lower index Ij Priority index gi k j of using machine i for job j in interval [k, k+pj]

21
**Algorithm 1: - Calculate both priority indices Ij and yik**

- Order jobs according to job priority index (Ij) - Set j = 1 2: - Among available machines and time slots assign j to the combination <machine i , [k,k+pj] > with lowest value gikj - Discard job j if it cannot be processed at all 3: - If j = n then STOP, otherwise go back to Step 2 with j = j+1

22
**Timetabling with Tooling Constraints**

Summary Reservation Systems with Slack Equal processing times: Barrier algorithm General processing times : Composite dispatching rule Topic 3 Timetabling with Tooling Constraints

23
**Timetabling (All given) n jobs must be processed**

enough (e.g. >= n) identical machines in parallel Minimizing Makespan Tooling Constraints Set of different available tools k (say in set K ): of each k, only one available (for use by one job at a time) Job j requires tools of subset Kj during its processing Timetabling is Special Case of RCPSP : no precedence constraints Rk = 1; rjk=1 or 0 depending on k being part of Kj

24
**Why Timetabling = Node coloring**

Example: all jobs take one time unit 7 1 4 3 2 5 6 Job = node; Jobs need same tool arc between nodes Makespan <= H time units ? Can graph be colored with H colors ?

25
Node Coloring Problem Consider a graph with n nodes that are to be colored For any arc (j,k) nodes j and k cannot receive the same color Feasibility question: Can the graph be colored with m (or less) colors? Optimality question: Minimum #colors needed to color the graph?

26
**Heuristic for Node Coloring**

Terminology degree of node = number of arcs connected to node saturation level = number of colors connected to node Intuition Color high degree nodes first Color high saturation level nodes first

27
**Heuristic Algorithm for Node Coloring**

Step 1: Order nodes in decreasing order of degree Step 2: Use color 1 for first node Step 3: Choose uncolored node with maximum saturation level, breaking ties according to degree Step 4: Color using the lowest possible color-number Step 5: If all nodes colored, STOP; otherwise go back to Step 3

28
Example book Nodes Degree 1 7 2 6 3 5 4

29
Example book Saturation + Degree in uncolored subgraph = Degree original graph Nodes Degree sub Saturation 1 7 2 6 3 5 4

30
Example book Nodes Degree sub Saturation 1 7 2 6 3 5 4

31
Example book Nodes Degree sub Saturation 1 7 2 6 3 5 4

32
Example book Nodes Degree sub Saturation 1 Result 4 colors e.g. 7: blue 2: red or green 6: yellow or green 7 2 6 3 5 4

33
**Worse: a reverse method**

6 Degree sub Nodes Degree 1 1 7 7 2 2 6 3 3 5 4 4

34
**Example of Timetabling with tools**

For solution: see previous node coloring example. Job 1: yellow Job 3: blue Job 7: blue Job 4: green Job 5: red Job 2: red or green Job 6: yellow or green

35
**Relation to Reservation Models**

Closely related to reservation problem with zero slack and arbitrary processing times (interval scheduling) Interval scheduling = Special case of timetabling problem jobs with common time periods unary (pj=1) jobs with common tools new color = new machine new color = extra period job occupies adjacent time periods (creating easy solvable color problem) jobs occupy tools ‘that need not be adjacent’

36
**Example Suppose now we have a reservation system**

Here we transform to time-tabling: Job 1 must be processed in time [0,2] Job 2 must in time [2,5]

37
**Other example Adjusted example of Timetabling with tools**

Rearrange and rename tools jobs 1 2 3 4 5 6 7 Tool 1 1 1 1 1 1 1 Tool 2 1 1 1 Tool 3 1 1 1 Tool 4 1 1 1 1 Period 1 Period 2 Period 3 Period 4

38
**Timetabling with Resource Constraints**

Summary Timetabling with Tooling Constraints Node Coloring heuristic Topic 4 Timetabling with Resource Constraints

39
**Timetabling with single resource**

Unlimited number of identical machines in parallel All n jobs must be processed Resource constraints Single resource of total quantity R Required is a certain amount for each job

40
**Resource Constraints One type of tool but R units of it (resource)**

Job j needs Rj units of this resource Clearly, if Rj + Rk > R then job j and k cannot be processed at the same time, etc Applications scheduling a construction project (R = crew size) exam scheduling (R = number of seats) Special case of RCPSP with one resource, pi 1, no precedence

41
**Special case: Bin-Packing**

Assume equal processing times pj = 1 Unlimited number of machines Minimize makespan Equivalent to bin-packing problem each bin has capacity R item of size rj pack into the minimum number of bins

42
**Solving the Bin-Packing Problem**

Known to be NP-hard Many heuristics developed First fit (FF) heuristic Always put an item in the first bin it fits into Know that

43
**Example Assume 18 items and R = 2100 FF heuristic:**

Jobs 1-6 require 301 resources Jobs 7-12 require 701 resources Jobs require 1051 resources FF heuristic: We assign the first 6 jobs to one interval (3016=1806) We then assign jobs two at a time to next 3 intervals (7012=1402) We then assign just one of the remaining jobs to each interval Poor performance when jobs are assigned in arbitrary order

44
**First Fit Decreasing (FFD)**

An improvement of FF: Order jobs in decreasing order first Know that FF and FFD can be extended to different release dates R = 12 6 jobs of size 6, 4, 4, 4, 3, 3

45
**Discussion This chapter only considered very simple models**

In practice: Dynamic reservation systems Price considerations (yield management) Other requirements (such as in final topic..)

46
**Extra Topic: Scheduling flights at the airport,**

A reservation problem with no slack : When planning check-in desks (as adjacent tools)

47
**Planning Check-in Desks**

rj = # desks required during (given) time-interval I(j) for flights j=1,2,..n Optimization Problem - Minimize total #desks R* for all flight-desk -assignments Distinguishing feature: - Assigned desks must be adjacent

48
Algorithm: Earliest Release Date or First-Fit (analogous to algorithm for minimum #machines, topic 1 ) Flight 5 does not fit

49
**Find better solutions with R < 11!**

Another Example Scheduling flights (j=1,2,..8) in 30 min. periods (t=1,2,..9) Data: A feasible, but non-optimal solution: LH Find better solutions with R < 11!

50
**First attempt Define R(t) as sum of rj’s over jobs j with tÎI(j)**

Then R* >= max t R(t) (a lower bound called Rlow)

51
**Optimal Assignment with R*=8 desks**

Here Rlow=8 and R* = Rlow

52
**Question: Always R* = Rlow ?**

Exercise 2: find a schedule using only #desk-rows 9=Rlow

53
**Optimal solution with R*=Rlow=9**

What if new flight 12 has r(12)=3 in interval 3-3 ? Answer: R* > Rlow is possible

54
**Complexity NP-complete Partition problem: Solve Partition by :**

If ‘vertical jobs’ require resp. : G+2, G+2, G+1, G, 2G+1, 2G+3 desks Then again: an optimal solution must have two holes of size G at t=3 NP-complete Partition problem: given Numbers g1,g2,.., gn with total sum 2G question Are there 2 subsets each with sum G Solve Partition by : - adding jobs j=11+i for i=1,2..n with r(11+i)=gi (and I(j)=[3,3]) - observe if R*=2G+5

55
**Notation for an ILP model**

Ij (= [aj .. bj ]) Check-in interval rj # of desks required dj Largest number of adjacent desks as occupied by j desks d f flight f d g flight g 1 period a a b b f g f g

56
**Exercise 3: Finish this ILP model**

With integer variables: D : Total number of desks required dj : Largest desk number assigned to flight j With parameters: rj : Number of desks required for the check-in process of flight j Ij : Check-in time interval of flight j Hint: disjunctive model, comparable to that for job-shop-scheduling

57
**An alternative ILP model**

Binaries yj t r (=1 if j occupies in period t largest desk r; 0 otherwise) Flight j require n(j,t) adjacent desks in period t Exercise 4: model the missing constraint-set Hint: similar to the technique used in the RCSP model

58
**With n(j,t) desks for a flight**

Static Dynamic (8 possible shapes) or or or …

Similar presentations

Presentation is loading. Please wait....

OK

Maximum Flow Problem (Thanks to Jim Orlin & MIT OCW)

Maximum Flow Problem (Thanks to Jim Orlin & MIT OCW)

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Seven segment display ppt on tv Ppt on conceptual art images Ppt on project management in software engineering Free download ppt on abortion Ppt on hong kong airport Ppt on the art of war wesley Free download ppt on albert einstein A ppt on satellite communication Ppt on resources and development of class 10 Ppt on nelson mandela biography