[GradTrak] Joint course-to-requirement matching for double majors - #1212
Open
ethanransing wants to merge 1 commit into
Open
[GradTrak] Joint course-to-requirement matching for double majors#1212ethanransing wants to merge 1 commit into
ethanransing wants to merge 1 commit into
Conversation
Each major's requirements were evaluated in isolation, so a student with two majors could count the same upper-division course toward both without limit — or, depending on evaluation order, have a shared course consumed by the first major and reported missing from the second. Berkeley caps upper-division overlap between double majors (2 courses for L&S, CDSS, Haas and cross-college pairs; 5 when both majors are in CoE). Lower-division overlap is unrestricted. This adds a joint matching pass that runs in the frontend after per-major BtLL evaluation. It extracts the flexible leaves (count and unit thresholds) from both majors' requirement trees, then backtracks with pruning to assign each course to major A, major B, both (if the overlap cap allows), or neither, maximizing satisfied leaves. Results are written back into the trees and And/Or aggregates are recomputed. With a single major the pass is a no-op. Not handled: joint majors (different overlap rules), CoE's "5 distinct UD technical courses per major" check, and 3+ majors. Claude-Session: https://claude.ai/code/session_012F9yFMhu4JYgy3BwQSjSDC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out of #1141. Stacked on #1211. Close #1141 once this merges.
Each major was evaluated on its own, so for double majors an upper-div course could count toward both majors without limit. Berkeley caps this: 2 overlapping UD courses for L&S/CDSS/Haas/cross-college pairs, 5 if both majors are in CoE (L&S, CDSS, CoE). Lower-div overlap is unrestricted.
After per-major evaluation,
BtLLInterfacenow runs a joint pass (runJointReassignment) that pulls the flexible leaves (≥N courses, ≥T units) out of both majors' trees, assigns each course to major A, B, both (under the cap), or neither via backtracking, then writes the assignments back and recomputes And/Or parents. With a single major this is a no-op.Limitations, same as #1141:
20 new tests.