termly.ca - a UBC course scheduler
- the app picks an optimal section from each activity (e.g. labs, tutorials, discussions and lectures) of a course
- the app removes a course in one term when the user selects the same course in the other term
- select a term
- select either a course or a specific section from the dropdown list
- (optional if scheduling takes too long) use the left most button to limit the number of sections per course
- e.g. CPSC 121, CPSC 110, ENGL 112 and CPSC 310
- (optional) all of the following actions will trigger re-scheduling:
- add/remove a course/section
- change the number of sections per course
- repeat step 1 to 4
- follow the generated links to register courses
- adding courses in one term when the app is scheduling courses for the other term leads to a schedule inconsistent with the course list
the app uses https://ubc-courses-api.herokuapp.com for fetching subject/course/section data.
many thanks to @qstevens for making this api!
- convert time intervals of sections to binary representions (helps detect section conflicts in O(1) time)
- sort courses by the number of sections in an increasing order (cut the computation tree early when a conflict is detected)
scheduling process might terminate early when sections are evenly distributed over 7 am to 10 pm
for (time = 7; time <= late; time += 0.5) {
// sped up the scheduling process by reducing the number of sections per course
const subList = list.map(c => c.filter(s => s.end <= time));
schedules = getSchedules(subList);
if (schedules.length !== 0) break;
}
- sections end as early as possible
- sections as close to each other as possible
- include 2-term courses
- filter out sections with no remaining seats in real-time
- add option to include waitlist
- add more schedule evaluation methods