Formulating an ILP problem in a story I find it still pretty hard to formulate an LP problem, especially when there is a story behind it. So I wondered if you could show me how to do it for this example:

There are $n$ students who have to do $3$ projects each.
There are $p$ projects available.
The students give each project a grade of $\{1,...,10\}$ that shows how much they like a project.
Let $c_{ij}$ be the grade that student $i$ gives project $j$.
There are $p$ projectrooms with capacity of $m_k$ students for room $k$.
We want to assign a student to a project and a project to a projectroom in such a way that the lowest grade that a student has given a project he is assigned to is as high as possible.

How do I formulate this as an ILP problem?
 A: Introducing new variables (often 0/1 variables) is key to these kinds of problems. Also "slack" variables can become important when you want to minimize/maximize some overall minimum or maximum. In your case, you can use variables $x_{ijk}$ which indicate whether student $i$ is assigned to project $j$ and project $j$ is assigned to room $k$. Then $\sum_{j,k} x_{ijk} = 3$ and each $x_{ijk}$ is between 0 and 1. 
Then you can encode a bijection assignment of each project $j$ to a project room $k$. For this you can use indicator variables $y_{jk}$ which are between $0$ and $1$ such that $\sum_j y_{jk} = 1$ and $\sum_k y_{jk} = 1$ for all $j,k$.
Then you need to satisfy the capacity constraints $m_k$ for each room, and also enforce that the $x_{ijk}$ respect the bijection between projects and project rooms. For this you can use $\sum_{i} x_{ijk} \leq m_k y_{jk}$ for each $j$ and $k$. 
Finally the ratings. For each $x_{ijk}$, let $c_{ij}$ be the given constant grade given by student $i$ to project $j$. Then if some $x_{ijk}$ is 0, you don't want $c_{ij}$ to have any effect due to that variable, but if $x_{ijk}$ is 1 then you want to encode the rating $c_{ij}$ somehow, and maximize it over all $i,j,k$ such that $x_{ijk}$ is 1. For this you can define variables $w_{ijk}$ and a universal "slack" variable $\epsilon \geq 0$, and set $w_{ijk}= 10(1-x_{ijk}) + c_{ij} x_{ijk} - \epsilon$. This encodes that the "rating" $w_{ijk}$, before subtracting slack $\epsilon$, will be the maximum $10$ if $x_{ijk}$ is $0$, and otherwise will be the rating $c_{ij}$ assigned by student $i$ to project $j$, if $x_{ijk} = 1$.
Now all you have to do is formulate ILP as all the previous variables and constraints, along with $w_{ijk} \geq 0$, and maximize $\epsilon$. The achieved value of $\epsilon$ will be the best possible worst-case ranking of a student assigned to a project, and the $x_{ijk}$ and $y_{jk}$ in the optimal solution will give you the assignments of students to projects, as well as the assignments of projects to rooms, that achieve the optimum.
