McNaughton's Algorithm

Version 1.3.0.0 (1,86 KB) von Lorenzo
McNaughton’s algorithm:jobs has to be scheduled on processors to minimize schedule length
821 Downloads
Aktualisiert 19. Mai 2009

Lizenz anzeigen

This is a function that calculate the schedulation sequence of fixed number of jobs on any number of machines.
McNaughton’s algorithm solves problem

(numberOfProcessors,durationOfJobs),

where a set of independent jobs has to be scheduled on identical processors in order to minimize schedule length. This algorithm consider preemption of the job and the resulting schedule is optimal.

The maximum length of task schedule is Makespan that can be defined as maximum of this two values:

max (averageDurationOnProcessors ,moreLongJob).

At first we calculate the Makespan and then we create a matrix where every elements is zero, in which the program writes the duration of jobs processed by that processor.
The number of lines is the number of processors, while every element of the matrix is, like I wrote before, the time of every job processed by every processor.

At the end the program show a figure where there is the Gant of every processor.

Example
McNaughton(2,[2,1,3,4,])
where 2 are the processors, and [2,1,3,4,] is the vector of the duration of job.

The solution is that one:

2 1 2 0
1 4 0 0

Zitieren als

Lorenzo (2025). McNaughton's Algorithm (https://de.mathworks.com/matlabcentral/fileexchange/24148-mcnaughton-s-algorithm), MATLAB Central File Exchange. Abgerufen.

Kompatibilität der MATLAB-Version
Erstellt mit R2007b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Problem-Based Optimization Setup finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise
1.3.0.0

I added the figure..

1.0.0.0