Auto gen schedule - #600
Conversation
…ly calls `setPlanner()` once
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…nnerCard needs it. `generateOptimalSchedule()` does not
TyHil
left a comment
There was a problem hiding this comment.
Didn't review the actual algorithm too much but all the supporting code looks good
| } | ||
| } | ||
| } | ||
| const newSectionMeetings = newSection.meetings |
There was a problem hiding this comment.
Has the output of hasConflict changed? Or just the way in which it computes its output? Like is the new function equivalent to the old?
There was a problem hiding this comment.
it is equivalent to the old except
(a) the logic of "if time overlaps BUT the sections are from the same course, then allow the section to be selected" is pulled out into only PlannerCard (which is functionally the same)
(b) Therefore, we can send in only the meeting times instead of the entire section object
| } from '@/types/SearchQuery'; | ||
| import { Alert, Snackbar, Typography } from '@mui/material'; | ||
| import AutoFixHighIcon from '@mui/icons-material/AutoFixHigh'; // Added Icon | ||
| import { Alert, Button, Snackbar, Typography } from '@mui/material'; // Added Button |
| ' — ' + displaySemesterName(latestSemester, false))} | ||
| </Typography> | ||
|
|
||
| <Button |
| if (searchResult) { | ||
| const grades = calculateGrades(searchResult.grades); | ||
| // grades data | ||
| if (grades.total > 0) { |
There was a problem hiding this comment.
I think the changes I just made to grades in #602 might conflict with this since total could now be > 0 with no valid GPA if all grades are P/W/CR/NC/I. Might want to add another check here?

Overview
Auto-complete a myplanner schedule
What Changed
It uses the same
hasConflict()logic we already have alongside a constraint-sat algo to try and select sections from each course in MyPlanner. If a user has already selected a few, it respects the decision and works around itOther Notes
Tried to implement a greedy-ish approach that is more likely to select