Java Implementation of the Interval Partitioning greedy algorithm
Given a set of lectures (jobs) with start & end times, schedule all lectures to use the fewest rooms (resources)
- Times are treated as integers, but converted to strings when printing output (
getTimeFromInt()
method ofLecture
class) - Times are integers. 3-digits for the morning (9AM = 900), 4-digits for afternoons (10:30 = 1030)
- Uses 24-hour clock (2:30 PM is 14:30)
- Enter the Lectures/Jobs in
IntvlPart
constructor
Sorted by start time later, can be in any order - Run the program to view optimal schedule
- Multiple optimal solutions may be found depending on the order lectures were added in the constructor
- Prints the room where a lecture is schedued when it is scheduled
- A List of all the rooms and the lectures in that room
- Output is printed to the screen as well as written to a file
output.txt