Content deleted Content added
No edit summary |
mNo edit summary |
||
(11 intermediate revisions by 10 users not shown) | |||
Line 1:
The '''modified due-date''' (MDD) scheduling heuristic is a [[greedy heuristic]] used to solve the
== Presentation ==
The modified due date scheduling is a scheduling heuristic created in 1982 by Baker and Bertrand
== Algorithm ==
=== Principle ===
This heuristic works the same way as other
=== Implementation ===
Here is an implementation of the MDD algorithm in pseudo-code.
bestTask = unsortedTasks.getFirst()
bestMdd = mdd(processed, bestTask)
'''for''' task '''in''' unsortedTasks
mdd = mdd(processed, task)
'''if''' mdd < bestMdd '''then'''
bestMdd = mdd
bestTask = task
sortedTasks.'''pushBack'''(bestTask)
unsortedTasks.'''remove'''(bestTask)
processed += bestTask.processTime
== Practical example ==
In this example we will schedule flight departures.
* a due date: The time after which the plane is expected to have taken off
* a processing time: The amount of time the plane takes to take off
* a weight: An arbitrary value to specify the priority of the flight.
We need to find an order for the flight to take off that will result in the smallest total weighted tardiness.
{| class="wikitable alternance"
Line 68 ⟶ 64:
| 4
| 14
|
| 8
|-
Line 74 ⟶ 70:
In the default order, the total weighted tardiness is 136.
The first step is to compute the modified due date for each flight. Since the current time is 0 and
{| class="wikitable alternance"
Line 95 ⟶ 92:
|}
The flight with the smallest MDD (Flight n° 3) is then processed, and the new modified due date is computed.
{| class="wikitable alternance"
Line 122 ⟶ 118:
| 4
| 14
|
| 14
|-
|}
The operation is repeated until no more flights are left unscheduled.<
We obtain the following results:
Line 147 ⟶ 143:
| 4
| 14
|
|-
| 2
Line 155 ⟶ 151:
|}
In this order, the total weighted tardiness is 92.
This example can be generalized to schedule any list of job characterized by a due date and a processing time.
== Performance ==
Applying this heuristic will result in a sorted list of tasks which tardiness cannot be reduced by adjacent pair-wise interchange
== Variations ==
There is a version of MDD called
== References ==
{{reflist|colwidth=30em}}
==See also==
* [[Scheduling (computing)]]
[[Category:
[[Category:Processor scheduling algorithms]]
|