Welcome to the P4 Project for the SPORTS system. This project provides a mini web server to give you hands-on experience with the end-to-end process of auto-scheduling teams across various venues. The server is powered by FastAPI, a Python-based web framework. You can find its documentation here:
FastAPI Documentation
The SPORTS system web portal includes three primary pages:
- Landing Page: Can be ignored for this assignment.
- Scheduler Page: Contains buttons to test and run your scheduling code. Refer to the "Test Cases" section for details about each dataset.
You are free to implement the auto-scheduler in a language of your choice. However, the initial setup requires Python libraries to run the FastAPI server. Using the server is optional but highly recommended for testing your scheduler.
Run the following bash scripts to set up and launch the server:
./bin/build-env
source ./bin/run-env
./bin/launchAfter running the launch script, open a browser and navigate to:
https://localhost:8000/
If you decide to use a different language to implement the auto-scheduler, follow these guidelines to ensure compatibility with the FastAPI instance.
Each test case directory contains three input files:
team.csv: Team information.league.csv: League details.venue.csv: Venue availability and properties.
Your program should generate a schedule.csv file in the same directory as the input files.
The scheduler must run from the command line with the following format:
./bin/<language>/schedule <case>
Supported languages include Python (py), Java (java), and C++ (cpp). For example, to
run case 6 using Python:
./bin/py/schedule case6
To assist with this assignment, two modules have been provided:
IntervalTree: A utility for detecting overlaps and managing schedules. While you are free to design your own solution, it is strongly recommended to use this approach.Game: Encapsulates the attributes required for the final schedule, ensuring your output aligns with the front-end rendering.
Your final output file (schedule.csv) must contain the following headers:
team1Name: Name of Team 1.team2Name: Name of Team 2.week: Week number of the year (1–52).day: Day of the week (1–7, where Monday = 1).start: Match start time (0–23.5, in 30-minute increments).end: Match end time (0–23.5, in 30-minute increments).season: Year of the season (assume 2024 for all matches).league: Name of the league.location: Venue description in the format"<venue_name> Field #<field_number>".
Testing is best conducted through the web server. However, tests can also be run via the CLI:
./bin/test <case>
Later test cases are evaluated on thresholds rather than completeness due to limited availability. Passing all test cases does not guarantee an "A." Ensure your work is well-documented and reach out on Piazza for questions.
- Case 1: 8 Teams, 1 League, 1 venue, 4 fields, uniform availability.
- Case 2: 8 Teams, 3 Leagues, 1 venue, 4 fields, uniform availability.
- Case 3: 16 Teams, 1 League, 1 venue, 1 field, uniform availability.
- Case 4: 24 Teams, 1 League, 1 venue, 1 field, limited availability.
- Case 5: Synthetic data with 52 teams, 3 leagues, limited venues, and limited availability.
- Case 6: Synthetic data with 104 teams, 3 leagues, limited venues, and limited availability.
- Case 7: Synthetic data with 104 teams, 3 leagues, varied games, limited venues, and availability.
- Case 8: Synthetic data with 104 teams, 3 leagues, 1 venue, full availability.
- Generated: Large randomly generated set of data, for the brave and bold. More varied attributes with some erroneous data points.
For submission, please make sure to submit a zip file of your codebase to Canvas. Include a brief write-up describing any extra code your team implemented and/or build instructions if anything was changed. Additionally, provide a summary of how your algorithm works and why you chose the given design.