feat: add room capacity tolerance (10% for lecture rooms), fix teache…#7
Open
iamajaykr06 wants to merge 3 commits intomainfrom
Open
feat: add room capacity tolerance (10% for lecture rooms), fix teache…#7iamajaykr06 wants to merge 3 commits intomainfrom
iamajaykr06 wants to merge 3 commits intomainfrom
Conversation
…r-wise summary, add rebalance API
AIPCSS Bot Reviewer ReportStatus: Issues Found - Action RequiredAI Logic Reviewnull Backend ReportIssues FoundBandit SecurityNo frontend changes. |
… heuristic algorithms
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.
Description
This PR implements room capacity tolerance for lecture classrooms and fixes the teacher-wise summary API issue.
Changes Made:
Room Capacity Tolerance (10% for Lecture Rooms)
can_accommodate()inscheduler_new/models.pyFix Teacher-wise Summary API
getSummary()method toworkloadServiceGET /workload/summaryWhy These Changes:
Fixes # (room capacity mismatch issues)
Fixes # (teacher-wise summary not loading)
Type of Change
Changes Made
List the specific files and changes made:
backend/app/scheduler_new/models.pycan_accommodate()to apply 10% tolerance only for non-lab roomsfrontend/src/services/resources.service.tsgetSummary()method to workloadServicerebalanceAll()method to workloadServicefrontend/src/pages/WorkloadPage.tsx.github/PULL_REQUEST_TEMPLATE.mdTesting
Describe the tests you ran to verify your changes:
Test Scenarios:
Screenshots (if applicable)
N/A - Backend logic changes
Checklist
Additional Notes
Room Capacity Logic:
effective_capacity = capacity * 1.10→ allows 10% over-capacityeffective_capacity = capacity→ strict limit, no toleranceAPI Changes:
workloadService.getSummary()→ callsGET /workload/summary