blob: efdeb8ba1bdb664cf28670aeb1e9d2fd509c4116 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# Optimal student---topic assignment
The script `assignment.py input.toml` calculates **all** optimal student---topic assignments under the assumption
that the $i$-th topic preference of student $v$ is worth $\approx 2^{-i}$. Then we set up an ILP that maximizes the
score over all students, adds cutting planes to enumerate all optimal solutions and draws one at random from them.
It is possible to set a seed in the code to ensure the reproducibility of the procedure.
First steps:
```
pip install -r requirements.txt
```
Then: `python assignment.py input.toml`, where `input.toml` has the following format:
```
[students]
a=[1,2,3]
b=[2,4]
```
Here, we have two students `a` and `b`. Student `a` would prefer topic `1` over topic `2` over topic `3`, while student `b` would prefer topic `2` over topic `4`.
|