17 lines
475 B
Plaintext
17 lines
475 B
Plaintext
% Input facts
|
|
#const deadline = 90.
|
|
#const processors = 8.
|
|
#include "data30.lp".
|
|
|
|
1 { start(T, Time) : Time = 0..deadline } 1 :- task(T, _).
|
|
1 { end(T, Time) : Time = 0..deadline } 1 :- task(T, _).
|
|
|
|
:- start(T, Time), end(T, End), task(T, Length), End != Time + Length.
|
|
|
|
:- Time = 0..deadline, not #count{ T : start(T, StartTime), end(T, EndTime), StartTime <= Time, Time < EndTime } <= processors.
|
|
|
|
:- task(T, _), end(T, Time), Time > deadline.
|
|
|
|
#show start/2.
|
|
#show end/2.
|