Skip to content

Auto gen schedule - #600

Open
AbhiramTadepalli wants to merge 15 commits into
developfrom
auto-gen-schedule
Open

Auto gen schedule#600
AbhiramTadepalli wants to merge 15 commits into
developfrom
auto-gen-schedule

Conversation

@AbhiramTadepalli

Copy link
Copy Markdown
Contributor

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 it

Other Notes

Tried to implement a greedy-ish approach that is more likely to select

  • sections with professors assigned
  • sections with professors who are higher-rated in rmp
  • sections of a professor with a higher median-gpa
  • sections that start after 9am and before 5pm

@AbhiramTadepalli
AbhiramTadepalli requested a review from egsch as a code owner March 29, 2026 01:52
@vercel

vercel Bot commented Mar 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
utd-trends Ready Ready Preview, Comment Mar 30, 2026 1:06am

Request Review

@TyHil TyHil left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't review the actual algorithm too much but all the supporting code looks good

}
}
}
const newSectionMeetings = newSection.meetings

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI comments 😔

Remove

' — ' + displaySemesterName(latestSemester, false))}
</Typography>

<Button

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Button looks wonky:

Image

Comment thread src/modules/scheduleGenerator.ts Outdated
if (searchResult) {
const grades = calculateGrades(searchResult.grades);
// grades data
if (grades.total > 0) {

@egsch egsch Mar 30, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants