## 3 Competency-Driven Staff Allocation
### Model
\begin{tabular}{l l} \(X:\) & Teacher allocation, \(X=\left[x_{k,i}\right]_{k=1,\ldots,mj=1,n}\), where: \(x_{k,i}\in\{0,1,\ldots,q_{i}\}\) means the number of tasks \\  & from course \(Z_{i}\) executed by teacher \(P_{k}\). \\ \(X^{\Theta}:\) & Allocation in situations when teachers defined in set \(\Theta\) are absent from work: \\  & \(X^{\Theta}=\left[x^{\Theta}_{k,i}\right]_{k=1,\ldots,mj=1,n}\), where: \(x_{k,i}\in[0,1,\ldots,q_{i}]\) represents the number of tasks from course \\  & \(Z_{i}\) executed by teacher \(P_{k}\). \\ \(c^{\Theta}:\) & A variable that specifies whether there exists allocation \(X^{\Theta}\) ensuring execution of tasks from courses, \(\mathcal{Z}\). The value of variable \(c^{\Theta}\in\{0,1\}\) depends on ancillary sub-variables: \(c^{\Theta}_{1,i^{\prime}}c^{\Theta}_{2,k^{\prime}}c^{\Theta}_{3,k}\), which specify whether constraints (6)-(13) are satisfied. \\ \end{tabular}  Constraints:  
1. The element \(g^{\Theta}_{k,i}\) of matrix \(G^{\Theta}\) that characterises the absence of teacher \(P_{k}\) (\(P_{k}\in\Theta\)) takes the value 0: \[g^{\Theta}_{k,i}= \begin{cases}g_{k,i}&\text{when }P_{k}\
otin\Theta\\ 0&\text{when }P_{k}\in\Theta\end{cases} \] (6)
2. Tasks are only executed by teachers who have the appropriate competence: \[x^{\[PERSON]}_{k,i}\leq q_{i}\times g^{\[PERSON]}_{k,i},\text{ for }k=1\ldots m;i=1 \ldots n;\[PERSON]\in U_{\omega}\] (7)
3. All tasks, \(q_{i}\), from course \(Z_{i}\) should be executed: \[(\sum_{k=1}^{m}x^{\[PERSON]}_{k,i}=q_{i})\Leftrightarrow\left(c^{\[PERSON]}_{1,i}=1 \right),\text{ for }i=1\ldots n;\ \[PERSON]\in U_{\omega}\] (8)
4. Workload of teacher \(P_{k}\) is equal to or greater than the minimum number of working hours, \(s_{k}\): \[(\sum_{i=1}^{n}x^{\Theta}_{k,i}\times l_{i}\geq s_{k})\Leftrightarrow\left(c^ {\Theta}_{2,k}=1\right),\text{ for }P_{k}\in\mathcal{P}\backslash\Theta;\ \Theta\in U_{\omega}\] (9)
5. Workload of teacher \(P_{k}\) is not greater than the maximum number of working hours, \(z_{k}\): \[(\sum_{i=1}^{n}x^{\Theta}_{k,i}\times l_{i}\leq z_{k})\Leftrightarrow\left(c^ {\Theta}_{3,k}=1\right),\text{ for }P_{k}\in\mathcal{P}\backslash\Theta;\ \Theta\in U_{\omega}\] (10)
6. Robustness, \(R^{\mathcal{Z}}_{\mathcal{P}}(\omega)\), is calculated as a ratio of the number of absence scenarios \(\left|LP_{\omega}\right|\) for which the competency framework is robust to the absence of \(\omega\) teachers to all possible disruption scenarios (\(\left|U_{\omega}\right|\)): \[R^{\mathcal{Z}}_{\mathcal{P}}(\omega)=\frac{\left|LP_{\omega}\right|}{\left|U _{\omega}\right|}\geq\,^{*}R^{\mathcal{Z}}_{\mathcal{P}}(\omega)\,\] (11) \[\left|LP_{\omega}\right|=\sum_{\Theta\in U_{\omega}}c^{\Theta}\,\] (12) \[c^{\Theta}=\prod_{i=1}^{n}c^{\Theta}_{1,i}\prod_{k=1}^{m}c^{\Theta}_{2,k}\prod _{k=1}^{m}c^{\Theta}_{3,k}\.\] (13)  
To summarise, the model proposed above comprises a set of decision variables (describing competency framework, the measure of its robustness and teacher allocation), discrete domains of decision variables and a set of constraints (relationships connecting the decision variables) which specify the requirements for the competency framework and the execution of planned courses. The concepts of the competency framework and teacher allocation, \(X\), are represented by decision variables \(G\), \(G^{\Theta}\) and \(X^{\Theta}\). Allocation, \(X^{\Theta}\), in the event of teacher absence defined in set \(\Theta\), which meets constraints (6)-(13), is hereafter referred to as a permissible allocation. Given the assumptions presented above, the model is deterministic. From how the model is specified, that is being limited to defining the decision variables, variable domains and the constraints on subsets of variables, the problem under consideration belongs to the class of Constraint Satisfaction Problems (CSP).