An optimization-based approach to thesis defense planning
Engineering Thesis Project
This project presents an intelligent scheduling system for academic thesis defenses, leveraging multi-objective optimization techniques to generate optimal defense schedules. The system considers multiple constraints including staff availability, committee composition requirements, and interpersonal preferences among committee members.
The core optimization engine uses the NSGA-II (Non-dominated Sorting Genetic Algorithm II) algorithm to find Pareto-optimal solutions that balance multiple competing objectives.
- Multi-objective Optimization: Simultaneously optimizes for committee member affinity and defense start times
- Constraint Handling: Respects hard constraints (availability, committee composition) and soft constraints (preferences)
- Web-based Interface: Modern, responsive UI for data management and schedule visualization
- RESTful API: Flask-based backend with comprehensive endpoints for all operations
- Docker Support: Fully containerized deployment with PostgreSQL and Nginx
- Bilingual Support: User interface available in English and Polish
- Real-time Simulation: Live progress tracking during optimization runs
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Nginx (Reverse Proxy) β
β Port 80 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Flask API (Gunicorn) β
β Port 5000 β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββββββ β
β β Routes β β Services β β Optimization Engine β β
β β β β β β (pymoo / NSGA-II) β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PostgreSQL Database β
β Port 5432 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Each decision variable represents the selected time slot and committee composition option for a thesis defense.
- Maximize Committee Affinity (minimize negative affinity): Sum of preference scores between committee members
- Minimize Average Start Time: Earlier defenses are preferred
-
Hard Constraints:
- All committee members must be available during the defense
- No scheduling conflicts (a staff member cannot be in two committees simultaneously)
- Committee must consist of exactly 3 members (chairperson, supervisor, reviewer)
-
Soft Constraints:
- Preferences between staff members (likes/dislikes)
- Docker and Docker Compose
- Git
-
Clone the repository
git clone https://github.com/WinterWollf/Engineering-thesis.git cd Engineering-thesis -
Configure environment variables (optional)
# Create .env file with custom settings cat > .env << EOF POSTGRES_DB=thesis POSTGRES_USER=thesis_user POSTGRES_PASSWORD=your_secure_password EOF
-
Start the application
docker-compose up -d
-
Access the application
- Web Interface: http://
IP - API Health Check: http://
IP/api/health
- Web Interface: http://
For development without Docker:
-
Create virtual environment
python -m venv venv source venv/bin/activate # Linux/macOS # or: venv\Scripts\activate # Windows
-
Install dependencies
pip install -r requirements.txt
-
Run the development server
python web/api/app.py
The project includes a comprehensive test suite using pytest.
# Install development dependencies
pip install -r tests/requirements-dev.txt
# Run all tests
pytest tests/unit_tests/
# Run with coverage report
pytest tests/unit_tests/ --cov=optimization --cov=adapters --cov-report=html
# Run specific test file
pytest tests/unit_tests/test_algorithms.py -v| Method | Endpoint | Description |
|---|---|---|
| GET | /api/staff |
List all academic staff |
| POST | /api/staff |
Add new staff member |
| PUT | /api/staff/{id} |
Update staff member |
| DELETE | /api/staff/{id} |
Remove staff member |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/availability |
List all availability entries |
| POST | /api/availability |
Add availability slot |
| DELETE | /api/availability/{id} |
Remove availability |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/preferences |
List staff preferences |
| POST | /api/preferences |
Add preference relationship |
| DELETE | /api/preferences/{id} |
Remove preference |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/theses |
List all theses |
| POST | /api/theses |
Register new thesis |
| DELETE | /api/theses/{id} |
Remove thesis |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/simulation/run |
Start optimization |
| GET | /api/simulation/status |
Get simulation progress |
| GET | /api/simulation/results |
Retrieve optimization results |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health |
Service health check |
Key configuration parameters in config.py:
# Data source configuration
DATASOURCE = "postgres" # 'excel' or 'postgres'
SINK = "postgres" # 'excel' or 'postgres'
# NSGA-II Algorithm parameters
POP_SIZE = 300 # Population size
N_GEN = 100 # Number of generations
CROSSOVER_PROB = 0.9 # Crossover probability
CROSSOVER_ETA = 20 # SBX distribution index
MUTATION_ETA = 20 # PM distribution index
# Solution selection weights
AFFINITY_WEIGHT = 0.8 # Weight for committee affinity
START_TIME_WEIGHT = 0.2 # Weight for start time minimization- Python 3.12 - Core programming language
- Flask 3.1 - Web framework
- Gunicorn - WSGI HTTP server
- pymoo 0.6 - Multi-objective optimization framework
- NumPy - Numerical computing
- Pandas - Data manipulation
- psycopg 3 - PostgreSQL adapter
- Pydantic - Data validation and settings
- HTML5 / CSS3 - Structure and styling
- Vanilla JavaScript - Interactive functionality
- Responsive Design - Mobile-friendly interface
- Docker - Containerization
- PostgreSQL 17 - Relational database
- Nginx - Reverse proxy and static file serving
- pytest - Testing framework
- Hypothesis - Property-based testing
- pytest-cov - Coverage reporting
-- Core entities
academic_staff -- Staff members with academic ranks
theses -- Thesis registrations with supervisors/reviewers
staff_availability -- Time slots when staff is available
soft_constraints -- Preference relationships between staff
committee_date -- Available dates for defenses
-- Results
defense_schedule -- Generated committee schedules
committee_thesis_assignment -- Thesis-to-committee mappingsThis project was developed as an engineering thesis at a AGH University of Cracow.
Wiktor Szyszka - Engineering Thesis Project
If you use this project or find it helpful, please consider citing the pymoo library which powers the optimization engine:
@ARTICLE{pymoo,
author={J. {Blank} and K. {Deb}},
journal={IEEE Access},
title={pymoo: Multi-Objective Optimization in Python},
year={2020},
volume={8},
pages={89497-89509},
doi={10.1109/ACCESS.2020.2990567}
}Blank, J., & Deb, K. (2020). pymoo: Multi-Objective Optimization in Python. IEEE Access, 8, 89497-89509. https://doi.org/10.1109/ACCESS.2020.2990567