Resource allocation and scheduling from CP/OR hybrid perspective Michele Lombardi <michele.lombardi2@unibo.it> DEIS, University of Bologna
Talk Outline Outline § A brief introduction to Allocation & Scheduling Problems § CP Approaches § OR Approaches § Hybrid (decomposition based) approaches Focus on exact methods
Talk Outline Outline § References to most of the proposed techniques in: [1] Michele Lombardi, Michela Milano: Optimal methods for resource allocation and scheduling: a cross-disciplinary survey. Constraints 17(1): 51-85 (2012)
Allocation & Scheduling Problems DEIS, University of Bologna
Resource Allocation and Scheduling Scheduling: Allocating scarce resources to activities over time § “Classical” Scheduling Formulations assume static resource assignment and focus on ordering activities over time § In many practical cases, resources and resource requirements depend on user decisions § In this case, we speak of Joint Resource Allocation & Scheduling
Application Examples § Parallel Computing, both at server-room and single chip level
Application Examples § Parallel Computing, both at server-room and single chip level § Aircraft Landing, with multiple runways
Application Examples § Parallel Computing, both at server-room and single chip level § Aircraft Landing, with multiple runways § Operating Painting Robots, with multiple nozzles
Resource Allocation and Scheduling Two important observations: #1: Resource allocation choices are not trivial to take #2: Resource allocation choices may have a dramatic effect on the schedule quality
An Example § Two resources: blue / orange 0/0 A0 § Activity durations are resource dependent 2/2 1/1 A2 A1 § All resources have capacity 1 § All requirements are 1 1/1 1/3 A3 A4 § Source/sink nodes are fake § Obj: minimize makespan 1/1 3/6 2/1 A5 A6 A7 0/0 A8
An Example § Two resources: blue / orange 0/0 A0 § Activity durations are resource dependent 2/2 1/1 A2 A1 § All resources have capacity 1 § All requirements are 1 1/1 1/3 A3 A4 § Source/sink nodes are fake § Obj: minimize makespan 1/1 3/6 2/1 A5 A6 A7 0/0 A8
An Example 2/2 1/1 A2 A1 § A1, A2, A3, A4, A5, A6, A7 / -- balance: 11/0, makespan: 11 1/1 1/3 A3 A4 1/1 3/6 2/1 A5 A6 A7 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 t A1 A2 A3 A4 A5 A6 A7 t
An Example 2/2 1/1 A2 A1 § A1, A2, A3, A4, A5, A6, A7 / -- balance: 11/0, makespan: 11 1/1 1/3 A3 A4 § -- / A1, A2, A3, A4, A5, A6, A7 balance: 0/15, makespan: 15 1/1 3/6 2/1 A5 A6 A7 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 A1 A2 A3 A4 A5 A6 A7 t t
An Example 2/2 1/1 A2 A1 § A1, A2, A3, A4, A5, A6, A7 / -- balance: 11/0, makespan: 11 1/1 1/3 A3 A4 § -- / A1, A2, A3, A4, A5, A6, A7 balance: 0/15, makespan: 15 1/1 3/6 2/1 A5 A6 A7 § A3, A4, A6 / A1, A2, A5, A7 balance: 5/5, makespan: 7 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 A1 A2 A5 A7 t A3 A4 A6 t
An Example 2/2 1/1 A2 A1 § A1, A2, A3, A4, A5, A6, A7 / -- balance: 11/0, makespan: 11 1/1 1/3 A3 A4 § -- / A1, A2, A3, A4, A5, A6, A7 balance: 0/15, makespan: 15 1/1 3/6 2/1 A5 A6 A7 § A3, A4, A6 / A1, A2, A5, A7 balance: 5/5, makespan: 7 § A3, A6 / A1, A2, A4, A5, A7 A bit counterintuitive... balance: 6/6, makespan: 6 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 A2 A4 A5 A7 t A1 A3 A6 t
Resource Allocation and Scheduling Two important observations: #1: Resource allocation choices are not trivial to take #2: Resource allocation choices may have a dramatic effect on the schedule quality ⇒ optimizing both allocation and scheduling choices may pay off
Problem Formulation Problem data: § is a set of activities A a i h A, E i Directed Acyclic Graph ( a i , a j ) § is a set of edges E § A set of resources with capacity R r k c k § A set of allocation variables X x i This is the § Activity duration functions d i ( X ) novel part § Resource requirement functions rq i,k ( X ) Solution § An assignment of variables x i § A set of start times for each activity S s i § Such that temporal & resource constraints are satisfied
Problem Formulation Which cost function? Main classes: § Resource-based: cost = F ( X ) § Time/resource based: cost = F ( X, S ) Examples: § Makespan: max a i ∈ A ( s i + d i ( X )) = F ( X, S ) X § A cost for using a resource: c x i = F ( X ) a i ∈ A
Cost Function There are many possible “problem flavors” § Time lags / allocation dependent time lags § Various types of resource § ... But those are not our focus! Let’s discuss instead some solution approaches
Resource Allocation and Scheduling with CP DEIS, University of Bologna
Always Start From the Simplest Thing... Simplest approach: encoding the formulation in CP Decision variables: § A start variable for each activity: s i ∈ { 0 ..eoh } § A variable for each resource choice: x i ∈ D i Constraints § Precedence constraints: s i + d i ( X ) ≤ s j ∀ ( a i , a j ) ∈ E § Resource constraints: cumulative ([ s i ] , [ d i ( X )] , [ rq i,k ( X )] , c k )
Always Start From the Simplest Thing... Simplest approach: encoding the formulation in CP. Straight. This does not work well ☹ Decision variables: § A start variable for each activity: s i ∈ { 0 ..eoh } § A variable for each resource choice: Reason #1: the search space is huge x i ∈ D i Constraints § Precedence constraints: Reason #2: weak propagation on allocation variables s i + d i ( X ) ≤ s j § Resource constraints: Reason #3: weak propagation between allocation and cumulative ([ s i ] , [ d i ( X )] , [ rq i,k ( X )] ,c k ) scheduling variables
So what? General trend: restrict the modeling constructs PRO: Stronger Filtering CON: Less Expressive (not always true...)
CP Modeling Approaches General trend: restrict the modeling constructs § Alternative Resources Pool of alternative resources Requirement A1 value or variable R0 Duration value may be R1 or variable assigned to R2
CP Modeling Approaches General trend: restrict the modeling constructs § Alternative Resources § Alternative Activities Choose a single realization XOR Alternative block a 00 a 0 a i i i XOR
CP Modeling Approaches General trend: restrict the modeling constructs § Alternative Resources § Alternative Activities XOR Each realization is a classical scheduling activity a 00 a 0 a i i i XOR
CP Modeling Approaches General trend: restrict the modeling constructs § Alternative Resources § Alternative Activities § Conditional Interval Variables start end domain duration
CP Modeling Approaches General trend: restrict the modeling constructs § Alternative Resources § Alternative Activities § Conditional Interval Variables X ex i = 1 Alternative Block: Possible Execution States: ex i = 1 i ex i = 0 ex i ∈ { 0 , 1 }
CP Modeling Approaches General trend: restrict the modeling constructs § Alternative Resources § Alternative Activities § Conditional Interval Variables Requirement Function
CP Modeling Approaches General trend: restrict the modeling constructs § Alternative Resources § Alternative Activities § Conditional Interval Variables Requirement Function
Key Filtering Ideas Main filtering ideas (described for conditional interval variables) § if ex i = 1 ⇒ infeasibility, then ex i ← 0 Each requiring 1 unit of the same resource, with capacity 1
Key Filtering Ideas Main filtering ideas (described for conditional interval variables) § if ex i = 1 ⇒ infeasibility, then ex i ← 0 infeasibility → ex i = 0
Key Filtering Ideas Main filtering ideas (described for conditional interval variables) § if ex i = 1 ⇒ infeasibility, then ex i ← 0 § redundant resource No dominating filtering Pool of alternative resources Redundant Resource
Key Filtering Ideas Main filtering ideas (described for conditional interval variables) § if ex i = 1 ⇒ infeasibility, then ex i ← 0 § redundant resource § propagation on P i ex i = 1
Key Filtering Ideas Main filtering ideas (described for conditional interval variables) § if ex i = 1 ⇒ infeasibility, then ex i ← 0 § redundant resource § propagation on P i ex i = 1 § if end i ≤ start j and ex i ⇒ ex j then max( end i ) ← max( start i )
Key Filtering Ideas Main filtering ideas (described for conditional interval variables) § if ex i = 1 ⇒ infeasibility, then ex i ← 0 § redundant resource § propagation on P i ex i = 1 § if end i ≤ start j and ex i ⇒ ex j then max( end i ) ← max( start i ) B C A
Key Filtering Ideas Main filtering ideas (described for conditional interval variables) § if ex i = 1 ⇒ infeasibility, then ex i ← 0 § redundant resource § propagation on P i ex i = 1 § if end i ≤ start j and ex i ⇒ ex j then max( end i ) ← max( start i ) § For details and a few other techniques, see the references at the end of the section.
Recommend
More recommend