Title: Finite Capacity Scheduling
1Finite Capacity Scheduling
2Overview of Presentation
- What is Finite Capacity Scheduling?
- Types of Scheduling Problems
- Background and History of Work
- Representation of Schedules
- Representation of Scheduling Problems
- Solution Algorithms
- Summary
3Solution Algorithms
- Dispatch Algorithms
- MILP
- Relation to A, constructive constraint-based
- Constructive Constraint-Based
- Iterative Repair
- Simulated Annealing
- How A heuristics can be used here (relaxation of
deadline constraints) - Genetic Algorithms
4Constructive Constraint-Based
- Fox, et. al., ISIS
- Best-first search with backtracking
- Tasks for orders scheduled one at a time
- Incrementally adds to partial schedule at each
node in the search - If infeasibility is reached (constraint
violation) - Backtrack to resolve constraint
- Advantages
- Relatively simple, can make use of standard
algorithms like A - Use of A allows for incorporation of heuristics
- Such heuristics are often used by human
schedulers
5Constructive (con.)
- Discrete manufacturing example
- Automobile assembly
- Process plan
6Operation/Task Attributes
- Assemble Doors
- Continuous start_time, finish_time, duration
- Discrete power_windows?
- Assemble Car
- Continuous start_time, finish_time, duration
- Discrete deluxe?
- Changeover
- Continuous start_time, finish_time, duration
- Discrete start_state, finish_state
7Resource Requirement/Resource Attributes
- Door Machine
- Utilization discrete function of time
- Can be 0 or 1, depending on time in scheduling
horizon - Power_windows? discrete function of time
- Can be yes or no, depending on time in scheduling
horizon - Discrete functions of time represented as
collection of discrete events, rather than vector
with fixed time intervals - Continuous time rather than discrete time
representation - Event is double of value and time
- Ex. 0, 500
- Ex. Collection
- ((0 000) (1 200) (0 600) (1 1200))
- Collection supports queries of form
get_value(time)
8Constraints
- Time
- AssembleDoors.finish_time AssembleDoors.start_ti
me AssembleDoors.duration - AssembleDoors.duration 0.5
- Changeover.finish_time Changeover.start_time
Changeover.duration - AssembleCar.finish_time AssembleCar.start_time
AssembleCar.duration - AssembleCar.duration 0.5
- Changeover.start_time gt AssembleDoors.finish_time
- AssembleCar.start_time gt AssembleDoors.finish_tim
e
9Constraints
- Resource Utilization and Capacity
- For all t such that AssembleDoors.start_time lt
t lt AssembleDoors.finish_time - DoorMachine.utilization 1
- For all t such that Changeover.start_time lt t lt
Changeover.finish_time - DoorMachine.utilization 1
- (represented by events (1 start_time) (0
finish_time) in utilization collection) - - DoorMachine.utilization lt 1
- (Automatically enforced by utilization
collection mechanism, two start events not
allowed without intervening finish event)
10Constraints
- Resource State
- For all t such that AssembleDoors.start_time lt t
lt AssembleDoors.finish_time - DoorMachine.power_windows? AssembleDoors.power_w
indows? - (represented by events (pw? start_time) (pw?
finish_time) in power_windows? collection) - For all t such that Changeover.start_time lt t lt
Changeover.finish_time - DoorMachine.power_windows? Changeover.start_stat
e - At t Changeover.finish_time
- DoorMachine .power_windows? Changeover.finish_st
ate - Represented by events (start_state start_time)
(finish_state finish_time) - If Changeover.start_state ! Changeover.finish_sta
te - Changeover.duration 0.5
- else
- Changeover.duration 0
-
11Algorithm Pseudocode
- Instantiate tasks based on process plan and
orders - One queue of tasks for each order
- Loop
- Pick order not yet scheduled
- Loop
- Pop task from queue for order
- Assign task to resource
- Propagate constraints
- If feasible, continue
- If not feasible, backtrack
-
12Simple Example with 4 Orders
Order Type Due Time
1 Standard 3.0
2 Deluxe 3.0
3 Standard 3.0
4 Deluxe 3.0
13Task Instantiation
14Schedule Order 1
Assign tasks and propagate constraints
15Schedule Order 2
Assign tasks and propagate constraints
16Schedule Order 3
17Order 4 infeasible
- Order deadline is violated
- Need to backtrack
18Order 4 before 3 also infeasible
19Success after two backtracks
- Almost achieves schedule 2 times, then succeeds
on third try - Requires search of 3 entire branches of tree
20Final Schedule
21Problem with constructive approach
- Search tree size (R x O)!
- R is number of resources, O is number of orders
- Exponential, np complete
- As shown in previous example, problems typically
not encountered until last few orders are
scheduled - As a result, typically searches entire branch of
tree before finding out it is infeasible - Swapping to eliminate changeover requires
backtracking - Results in significant amount of backtracking
- Does not work for large, difficult scheduling
problems - Even when heuristics are used
- Even when A is used
- Partial schedule is often not a good indicator of
how good schedule will be
22Constructive Constraint-Based (con.)
- Important disadvantage (often a show-stopper)
- A simple swap of ordering of two tasks on a
resource (something that human schedulers often
do) may require significant backtracking - Ex.
- Swapping to eliminate large changeover (asymetric
TSP) requires backtracking - Unravels everything done between order 1 and n
23Iterative Repair
- Zweben, et. al., GERRY, Red Pepper Software
- Scheduling of space shuttle ground operations
- Johnston and Minton
- Scheduling of Hubble space telescope
- Begin with complete but possibly flawed schedule
- Generate initial schedule quickly using simple
dispatching - Iteratively modify to repair constraint
violations, and to make more optimal - Each step in search is a repair step (single
modification to complete schedule) - Results in either better or worse schedule
- Hill-climbing (best-first) search
- Searches space of possible complete assignments
24Iterative Repair Example Beer Scheduling
- Filtering of alcoholic vs. non-alcoholic beer
prior to packaging
25Iterative Repair Example Beer Scheduling
26Beer Scheduling- Operation/Task Attributes
- Filtering
- Continuous start_time, finish_time, duration,
size - Discrete beer_type
- Backwash
- Continuous start_time, finish_time, duration
- Packaging
- Continuous start_time, finish_time, duration,
size - Discrete beer_type
27Resource Requirement/Resource Attributes
- Aged Beer
- quantity continuous function of time
- Representation similar to discrete functions of
time - Collection of (value time) doubles
- Intermediate values obtained by linear
interpolation - beer_type discrete
- Holding Tank
- utilization continuous function of time
- beer_type discrete function of time
- Filter
- beer_type - discrete function of time
- Packaged Beer
- quantity continuous function of time
- beer_type - discrete
-
28Time Constraints
- Filtering.duration 0.2 Filtering.size
- Filtering.finish_time Filtering.start_time
Filtering.duration - Changeover.finish_time Changeover.start_time
Changeover.duration - (Note that no need for finish start precedence
constraints, falls out of resource utilization
constraints)
29Resource Utilization/Capacity Constraints
- At t Filtering.finish_time, Aged_beer.quantity
dec.(Aged_beer.quantity, Filtering.size) - Implemented by inserting event (decremented_size,
finish_time) into quantity collection - At t Filtering.finish_time, Holding_tank.utiliza
tion inc.(Holding_tank.utilization,
Filtering.size) - At t Packaging.finish_time, Holding_tank.utiliza
tion dec.(Holding_tank.utilization,
Packaging.size) - For all t, Holding_tank.utilization lt 100
(gallons)
30Resource State Constraints
- Filtering.beer_type Aged_beer.beer_type
- Filtering.beer_type Holding_tank.beer_type
- Holding_tank.beer_type Packaging.beer_type
- At t Changeover.start_time,
- if Changeover.beer_type ! Holding_tank.beer_type
- Changeover.duration 0.5
- else
- Changeover.duration 0.1
- At t Changeover.finish_time, Holding_tank.beer_t
ype Changeover.beer_type -
-
31Cost
- Cost based on lateness penalty
- At t due time, if (packaged_beer.quantity lt
required_quantity), cost K (required_quantity
- packaged_beer.quantity) -
32Scheduling Decisions
- Task sequence for filtering
- Holding tank to use
- Task size
- Repair steps
- Change resources (holding tank)
- Change task position in sequence
- Change task size
- For batch processes, latter two are often
equivalent -
33Iterative Repair Algorithm
- Generate initial schedule using simple
dispatching - Loop until cost acceptable
- Try repair step
- Propagate constraints
- If reduces cost, continue
- If increases cost, continue with small
probability - Otherwise, retract repair step
-
34Iterative Repair Example Beer Scheduling
- Assume holding tank capacity is 100 gallons
- 3 orders each for 80 gallons alcoholic,
non-alcoholic beer, interspersed as follows - (packaging tasks fixed)
35Iterative Repair Example Beer Scheduling
- Simple dispatching produces following (flawed)
schedule
36Iterative Repair Example Beer Scheduling
- Iterative repair batches second A, NA tasks with
first - Note that further batching is not possible (would
need more tanks)
37Iterative Repair (con.)
- Disadvantage
- May get stuck in local optimum (as with all local
search techniques) - Can be mitigated using simulated annealing
approach - Allow repair step that increases cost with some
non-zero probability - Advantages
- Inherently provides for rescheduling
- Current schedule is initial (flawed) schedule for
new requirements - Assumes new requirements not that different from
old - Complete schedule available at all times
- Though it may not be such a great schedule
- Constraint relaxation is easy (a repair step)
- Swapping tasks to reduce changeovers is easy
(repair step) - A complete assignment is often more informative
in guiding search than a partial assignment
(Johnston and Minton)
38Summary
- Focus of this lecture was on generally useful
techniques - Solution of real-world scheduling problems can
make use of these techniques, but also, often
requires use of problem specific heuristics - As with other problems, scheduling becomes easier
as computers get faster (less need for
problem-specific heuristics)