## 3 Competency-Driven Staff Allocation
### Model  
The declarative framework-driven reference model of AAPDO presented below allows, in a natural way, for the formulation of a constraint satisfaction problem to generate competency frameworks robust to disruptions caused by teacher absenteeism. A university potential and the student curricula requirements can be represented as a model linking two main elements: set of jobs, \(Z\) (courses), and competency framework, \(G\), representing the competencies possessed by the university teachers. Set of courses \(\mathcal{Z}\): The courses determined by student curricula are represented by set \(\mathcal{Z}=\{Z_{1},\ldots,Z_{i},\ldots,Z_{n}\}\), where \(Z_{i}\) is the \(i\)-th course. It is generally assumed that lectures on a given subject (course \(Z_{i}\)) are conducted for a number of student groups. The implementation of course \(Z_{i}\) is, therefore, related to the implementation of a certain number of tasks (\(q_{i}\)) of given durations (sizes) (\(l_{i}\) ). Tasks of \(Z_{i}\) can have different sizes \(\{l_{i_{1}},l_{i_{2}},\ldots,l_{i_{q_{i}}}\}\), however, for simplicity, let us assume that each task of \(Z_{i}\) is of the same size, i.e., \(l_{i_{1}}=l_{i_{2}}=\ldots=l_{i_{q_{i}}}=l_{i}\). In that context, course \(Z_{i}\) is described by two elements: the number of tasks (\(q_{i}\)) and their duration (\(l_{i}\)):  
\[Z_{i}=(q_{i},l_{i}) \tag{2}\]  
where: \(q_{i}\) is the number of tasks of course \(Z_{i}\), and \(l_{i}\) is the duration (size) of each task of course \(Z_{i}\). It is assumed that courses \(Z_{i}\) are conducted by a competent teacher. University teaching staff: A staff of teachers, \(\mathcal{P}\), employed by the university is allocated to perform the planned tasks. Set \(\mathcal{P}=\{P_{1},\ldots,P_{k},\ldots,P_{m}\}\) defines a staff of teachers, where \(P_{k}\) is a pair:  
\[P_{k}=\left(s_{k},z_{k}\right) \tag{3}\]  
where: \(s_{k}\) is the minimum working hours of the \(k\)-th teacher (\(s_{k}\in\mathbb{N}\)), and \(z_{k}\) is the maximum working hours of the \(k\)-th teacher (\(z_{k}\in\mathbb{N}\)). University teaching staff, \(\mathcal{P}\), corresponds to the competency framework defined as a function \(G:\mathcal{P}\times\mathcal{Z}\rightarrow\{0,1\}\) that assigns to each pair \((P_{k},Z_{i})\) a value from the set \(\{0,1\}\): 0--when teacher \(P_{k}\) does not have the competence to execute tasks from course \(Z_{i}\), and 1--when teacher \(P_{k}\) has the competence to execute tasks from course \(Z_{i}\). To simplify the notation, it is assumed that \(G(P_{k},Z_{i})=g_{k}i\). As a result, the matrix representation of the competency framework of a staff of teachers, \(\mathcal{P}\), takes the form:  
\[G=\left[g_{k,i}\right]_{k=1\ldots m;i=1\ldots n} \tag{4}\]  
where: \(g_{k,i}\in\{0,1\}\),  
\[g_{k,i}= \begin{cases}1&\text{when teacher $P_{k}$ has the competencies to execute tasks from course $Z_{i}$}\\ 0&\text{in remaining cases.}\end{cases} .\]  
Teacher allocation, \(X\), specifies which tasks are assigned to each member of staff, \(\mathcal{P}\), in the execution of tasks from course \(\mathcal{Z}\). The allocation is a function \(X:\mathcal{P}\times Z\rightarrow\mathbb{N}\) that assigns to each pair \((P_{k},Z_{i})\) a value from set \(\{0,1,\ldots,q_{i}\}\): 0--when teacher \(P_{k}\) does not execute tasks of course \(Z_{i}\), and \(1,\ldots,q_{i}\)--whenteacher \(P_{k}\) executes tasks of course \(Z_{i}\). For simplicity considerations, it is assumed that \(X(P_{k},Z_{i})=x_{k,i}\), and the resulting matrix representation of allocation takes the form:  
\[X=\left[x_{k,i}\right]_{k=1\dots m;i=1\dots n} \tag{5}\]  
where: \(x_{k,i}\in[0,1,\dots,q_{i}]\) represents the number of tasks from course \(Z_{i}\) executed by teacher \(P_{k}\). It is further assumed that:  
* Tasks can only be executed by a competent teacher, i.e., \(\forall_{k=1\dots m,i=1\dots n}x_{k,i}\leq q_{i}\times g_{k,i}\).