Skip to content

GaiusJ/TimeTableUniversity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

University Semester Planner

Preview

An optimization tool for academic course scheduling, balancing workload distribution (ECTS/LP) while strictly preventing time-slot conflicts.

Core Features

  • Workload Balancing: Minimizes the variance of credit points (LP) across all semesters using a quadratic objective function to ensure a manageable and steady workload.
  • Time-Slot Conflict Prevention: Enforces hard constraints ensuring no two modules occupy the same time slot within a single semester.
  • Seasonal & Continuity Logic: Automatically respects seasonal availability (Winter/Summer/Both) and ensures multi-semester modules are completed consecutively without interruption.
  • Status Quo Integration: Allows fixing specific modules to predetermined semesters to account for courses already completed or currently in progress.

Technical Stack

  • Language: Python 3.14.3
  • Solver: Gurobi (via gurobipy) — requires a valid Gurobi license (free academic license available)
  • Libraries: Matplotlib (visualization), Collections (data structures)

How the Optimizer Works

The tool distributes a list of modules over a set number of semesters ($S$). It solves a Mixed-Integer Quadratic Program (MIQP):

Objective: $$\min \sum_{s=1}^{S} (LP_s - \overline{LP})^2$$

Key Constraints:

  • Enrollment: Each module must be started exactly once.
  • Duration: Active modules in semester $s$ must account for their required duration $d$.
  • Capacity: Prohibits overlapping assignments for weekly slots (Mon–Fri, 8–20h).

Setup & Installation

  1. Install Dependencies:
    pip install -r requirements.txt
  2. Activate Gurobi License: Ensure your academic license is active via grbgetkey.
  3. Run Optimizer
    python TimeTablePlanningUniversity.py
    

Configuration

Courses and their specific requirements are defined using the module dataclass within the script:

module(
    name="Medtech 1",
    duration=1,                 # number of semesters
    time=[3, 4, 5, 6],          # 2h slots (e.g., 3=Mon 12-14h)
    lp=6,                       # credit points
    start="winter"              # "winter", "summer", or "both"
)

License & Terms of Use

This is an academic side project.

  • Personal & Educational Use: Feel free to explore, learn from, and use this tool for private purposes.
  • Commercial Use: Prohibited. Contact me directly for written permission.

About

MILP-based university timetable optimizer for balanced credit point distribution across semesters

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages