Module schrage

Module schrage 

Source
Expand description

Implements Schrage and Part Time Schrage algorithms.

The Schrage algorithm is a meta-heuristic algorithm that tries to optimize scheduling of different processes. Using the Graham’s notation the problem can be written as: $$ 1|r_{j}, q_{j}|C_{max} $$

It tried to optimize a set of jobs using the greedy-algorithm method by iterating over the jobs and time and first choosing jobs that are available at the moment given their readiness time (r) and choosing the one with the highest value of cooldown time (q).

$j$1234567
$r_j$1013112030030
$p_j$5674362
$q_j$72624218170

Natural arrangement of jobs:

t
t
Cmax
Cmax
1
1
2
2
3
3
4
4
5
5
6
6
7
7
Cmax = 58
Cmax = 58
Text is not SVG - cannot display

Schrage sub-optimized arrangement gives the value of $53$ for the $C_{max}$ value:

Cmax = 53
Cmax = 53
t
t
Cmax
Cmax
6
6
1
1
2
2
3
3
4
4
5
5
7
7
Text is not SVG - cannot display

Compared to the $50$ which is the optimal solution to this particular set of jobs:

t
t
Cmax
Cmax
Cmax = 50
Cmax = 50
6
6
3
3
2
2
4
4
1
1
5
5
7
7
Text is not SVG - cannot display

Functions§

part_time_schrage
Part time Schrage algorithm.
schrage
Schrage algorithm.