Constraint Programming in Scheduling Professor Edward Tsang University of Essex

advertisement
Constraint Programming in
Scheduling
Professor Edward Tsang
University of Essex
URL: http://cswww.essex.ac.uk/CSP/
Edward Tsang (Copyright)
1
Tuesday, 31 May 2016
Car Sequencing Problem
Options
ABS
CD
…


Production:
30




30
40
Total:
120
CD area:  2/3
ABS area:  3/5
Edward Tsang (Copyright)
20


2
Tuesday, 31 May 2016
What is Constraint Satisfaction?
• Constraint satisfaction is a decision problem
– You are given a number of decisions to make
– For each decision, you are given all the choices
– Decisions constrain each other
• Your task is to make those decisions without
violating any of the constraints
• Sometimes you want the “best” solution
– If so, you have a (constrained) optimisation problem
Edward Tsang (Copyright)
7
Tuesday, 31 May 2016
Why constraint satisfaction?
• It is a very general problem (seen everywhere)
– Mainly logistics, scheduling, resources allocation
• Specialized methods available
• Now multi-million Pounds/Dollars business
• Scientific challenges:
– Combinatorial explosion (fundamental problem)
– Modelling (engineering problem)
Edward Tsang (Copyright)
8
Tuesday, 31 May 2016
Combinatorial Explosion
of the Car Sequencing Problem
• Schedule 30 cars:
– Search space: 30 factorial  1032 leaf nodes
• Generously allow:
– Explore one in every 1010 leaf nodes!
– Examine 1010 nodes per second!
• Problem takes over 32 thousand years to solve!!!
– 1032 ÷ 1010 ÷ 1010 ÷ 60 ÷ 60 ÷ 24 ÷ 365  31,710
• How to contain combinatorial explosion?
Edward Tsang (Copyright)
9
Tuesday, 31 May 2016
Constraint Programming
Given:
Problem
Description
Formulations
(Modelling)
Algorithms
Implementations
(e.g. ILOG Solver)
• Areas: modelling, algorithms, algorithm mapping,
monitoring, packages
Edward Tsang (Copyright)
10
Tuesday, 31 May 2016
Constraint Techniques Overview
1. Problem Reduction
– To reduce domain size
– To add or tighten
constraints
– Aims:
• To reduce a problem
to easier ones
• To detect dead-ends
2. Search
• Systematic Search
– Lookahead
– Learning nogoods or backtrack
intelligently at dead-ends
Aim: to exhaustively search space
• Stochastic methods
– To repair solutions heuristically
Aim: to find solutions fast,
sacrificing completeness
3. (Solution Synthesis)
Edward Tsang (Copyright)
11
Tuesday, 31 May 2016
Backtracking Search In The 8-Queens Problem
Complete search, till solution found, or “no solution” is concluded
A B C D E F G H
• Place one queen
per row
Strategies
dead-ends:
• Placeatone
queen
• Learning “no goods”
at
a
time
• dependency directed
backtracking
• Examine each
column
1
2
3
4
X
5
6
7
Backtrack at dead-ends
8
Edward Tsang (Copyright)
12
Tuesday, 31 May 2016
Forward Checking Search
• Problem reduction
– a major technique
• Combined with
search methods
• Reduce domain of
future variables
• Detect dead-ends
– To backtrack early
Dead-end detected after Queen
4 – no legal space for row 6,
backtrack…
Edward Tsang (Copyright)
A B
C
D E
F
G H
1
2 X X
3 X X X X
4 X
X X
5 X X X
X X
X X X
6 X X X X X X X X
X X
X
7 X X X
X X
X
8 X X X
13
Tuesday, 31 May 2016
The GLS Algorithm
• Iterative local search
• In a local minimum
– Select Features
Ii(s*) = 1 if s*
exhibits feature
i; 0 otherwise
ci = cost of
feature i
c
i
I ( s*) 
i
1 p
i
• Maximize utility
– Increase penalties (strengthen constraints)
• Resume Local Search from Local
Edward Tsang (Copyright)
15
pi = penalty
Minimum
of feature I
(init. to 0)
Tuesday, 31 May 2016
Population-based Incremental Learning
(PBIL)
Model M:
x = v1 (0.5)
x = v2 (0.5)
y = v3 (0.5)
y = v4 (0.5)
…..
Sample from M
solution X, eg
<x,v1><y,v4>
Evaluation X
Modify the probabilities
• Statistical approach
• Related to ant-colonies, GA
Edward Tsang (Copyright)
16
Tuesday, 31 May 2016
Scheduling in Grid Computing
Issues
• Meeting deadline, flow
scheduling
• To minimize job span,
cost
• Execution time unknown
• M/c may breakdown
• Domains negotiate
• Security
Edward Tsang (Copyright)
Constraint Research
• Classic CP, hybrid
CP+OR
• Constraint optimization,
GLS, soft constraints
• Dynamic scheduling
• Rescheduling, e.g. PBIL
• Distributed CS
• Implementation issue
17
Tuesday, 31 May 2016
Download