This repository was archived by the owner on Aug 23, 2026. It is now read-only.
Repository navigation
OR‐Tools Integration
Nishanth S edited this page May 8, 2026
·
1 revision
Teambuilder uses Google OR-Tools CP-SAT as the optimization engine for team generation.
Primary code paths:
- algorithms/CPSAT/ortools.ts
- algorithms/CPSAT/team_generator.py
- algorithms/CPSAT/README_ORTOOLS.md
- pages/generate-teams.vue
- components/generate-teams/GenerateTeamsCard.vue
Teambuilder uses OR-Tools to solve the student-to-project assignment problem as a constraint optimization task:
- The TypeScript wrapper serializes student and project data to JSON.
- The Python solver loads the JSON and builds a CP-SAT model.
- Decision variables represent student-to-project assignments.
- Hard constraints enforce feasibility.
- The objective function rewards preferred choices and other soft goals.
- The solution is returned to TypeScript and displayed in the UI.
Relevant API action:
- POST /api/teams/generate
The solver is used because team generation has many competing constraints:
- Each student must be assigned to exactly one team.
- Team sizes must stay within bounds.
- Meeting day rules must be respected.
- Preferences, returning students, skill matches, and diversity should all influence the result.
CP-SAT gives the team a practical way to produce high-quality assignments while balancing these constraints.
- A CP-SAT solver capable of mixed hard and soft constraints
- Objective maximization over student preference scores
- Support for team size limits and optional overflow handling
- Fast enough runtime for a typical semester roster
- Student choices from the database.
- Project records and meeting-day availability.
- Semester selection.
- Algorithm configuration values from the Generate Teams page.
- OR-Tools runs as a Python subprocess invoked from Node.js.
- The integration is local and does not require a remote service.
- This is a third-party library integration, not a hosted SaaS integration.
Wiki
Website Functionality
Demographics Workflows
Project Plans
- [S25] Team Formation Plan
- [S25] Demographics Plan
- [F24] Team Formation Plan
- [F24] GitHub/Discord Plan
- [F24] Demographics Plan
Resources