% TORSCHE Scheduling Toolbox for Matlab
% http://rtime.felk.cvut.cz/scheduling-toolbox/
%
% Horn algorithm example
%
% ARTIST2 Graduate Course on Embedded Control Systems in Prague
% Authors: P. Sucha, M. Kutil
% Date:    7.4.2006

% Definition of tasks
t1 = task('task1', 5, 1, inf, 12);
t2 = task('task2', 2, 0, inf, 11);
t3 = task('task3', 3, 5, inf, 9);

% Definition of taskset
T = [t1 t2 t3];

% Problem definition
p = problem('1|rj,pmtn|Lmax');

% Scheduling
TS = horn(T,p);

% Gantt chart
plot(TS,'proc',0)
