1 Introduction

There are many types of scheduling problems to consider when managing staff. The usual objectives are to minimize the operating costs while also improving the quality of life for employees. Improved quality of employee life leads to increased productivity, safer operations and lower HR costs. This field has been intensively investigated, for example Arias et al. (2018) found that a total of 1950 papers were published between 2005 and 2016 dealing with human resource allocation. However, network flow model considerations were not listed there nor was the problem of the present paper discussed. Several papers appeared already earlier on crew scheduling management including (Wren 1981), who explored a set covering based approach to solve the problem. The Hungarian method is a combinatorial optimization algorithm that solves the assignment problem in polynomial time, developed and published by Kuhn (1955) and later applied by others. Bouajaja and Dridi (2017) presented a survey on the human resource allocation problem and its applications, but none of the selected papers included network flow models.

Balakrishnan and Wong (1990) considered the rotating workforce scheduling focusing on an efficient sequence of work and rest periods spanning over some weeks. They modelled the problem as a network flow problem. There the constraints of the problem were incorporated in the network itself, while the allocation of shifts to the work periods were handled simultaneously. The shortest path gives the best schedule, while the path has to satisfy all specified constraints on the work and rest periods. Motivated by a call center application (Çezik et al. 2001) studied a workforce planning and scheduling problem in which weekly tours of agents must be designed. There a weekly tour of an agent consists of five daily shifts and 2 days off with certain constraints. They described an integer programming model, where a weekly tour is obtained by combining seven daily shifts scheduling models and days-off constraints in a network flow framework.

Recent papers involve process networks to minimize the costs and environmental impact of vehicle assignment problems, as described in Barany et al. (2011). Another study applied a P-graph model to the scenario where the available workforce was limited due to a climate change-induced crises (Aviso et al. 2017). Further research has focused on developing an efficient driver scheduling solution methodology which is flexible enough to offer several versions of quasi-optimal solutions and avoids overlapping, see Tóth and Krész (2013). Additionally, some studies have included simultaneous vehicle and crew schedule generation based on branch and price rather than solving it sequentially (Horváth and Kis 2019), proposed quantitative models that consider group heterogeneity and social cohesion (Ballesteros-Pérez et al. 2019). Others addressed team faultlines (Zhao et al. 2020), investigated variability, i.e. where the number of processing personnel and processing time are variable for one job (Su and Xie 2020), and considered competence coefficients which describe the level of the worker’s skills or capabilities to perform a specific task (Staruch and Staruch 2021). More recent investigations involved deep learning where the deep neural network training is performed on historical data and the results are of similar quality in less computational time (Quesnel et al. 2022). Another study introduced the concept of reducible working time to support a realistic evaluation framework of the applied methods (Balogh et al. 2022).

In the extensively researched airline industry, there is the so called airline crew rostering problem, where initially a crew pairing problem and then a crew assignment problem are solved, usually through a bidline, rostering or preferential bidding method. Kohl and Karisch (2004) provided a comprehensive description of real world airline crew rostering problems, including some typical rules and regulations independent of spcific case studies. These constraints exhibit a similar structure for most airline companies. Zhou et al. (2020) pointed out that the airline industry has high cost and low profitability and therefore presented an extensive review on planning and scheduling, with a focus on mathematical formulations and solution methodologies, including one network flow based method.

Ahuja et al. (1993) provided an elegant introduction to multicommodity network flows and discussed some applications. Cappanera and Gallo (2004) formulated some aspects of the airline rostering problem as a multicommodity flow problem, where each employee corresponds to a commodity. The schedule for an employee is determined by a path on a generated graph with activity arcs and compatibility arcs representing the activities and the consecutive assignments respectively. They also introduced some families of valid inequalities, and they discussed the polyhedral structure of their proposed model to achieve computational effectiveness. Ruther (2010) proposed a mixed integer multi commodity flow formulation along a short planning horizon, i.e., generated schedules close to the start of the work of the crew, allowing more detailed and accurate schedules overall. There each crew block and each aircraft were represented by one commodity, each commodity had one source and one sink node, furthermore the nodes in the network represented flight legs and the arcs represented the connections between the flight legs. They considered aircraft routing, tail assignment and crew pairing generation within their solution, which considered up to 2000 flights, 30 aircraft and a block of 100 crew.

In the railway industry the problem is addressed as the railroad crew scheduling problem. Here the problem is to assign train operators to scheduled trains over a time horizon at minimal cost while meeting various operational and contractual requirements. For example, for New Zealand railroads Walker et al. (2005) developed an integer programming based method for simultaneous disruption recovery of train timetables and crew roster in real time. There the rules are relatively simplistic and therefore can be expressed in the form of integer programming constraints; while the problem is solved with the help of a column and constraint generation algorithm. More recently, Zhao et al. (2022) considered different crew depots and strict working time standards under a sustainable development strategy. They proposed a genetic algorithm and as an illustration a Chinese case study with 2 operators also serving as crew depots, 16 stations, 75 high-speed trains, trains requiring different number of crew units and independent crew scheduling. Vaidyanathan et al. (2007) developed for North American railroads a multi-commodity network flow model which maps the assignment of crew to trains and where the different crew types are modelled as different commodities within the network. There are also side constraints on a space–time network. The arcs in the network facilitated the flow of crew over time and space. They formulated an IP model and showed that solving the IP formulation using standard branch-and-bound methodology is computationally intractable. Some decomposition and relaxation techniques were proposed to exploit some special structural features to obtain speed ups during computation.

Other applications of the multicommodity flow problem include, (Bernáth et al. 2013) where in a multiplayer environment each palyer has different networks and commodities over a common node set. There, the input includes contracts between pairs of players with the obligation to route the flow between two specified nodes up to a given capacity and in return a value proportional to the flow rate is paid. Case study of a public hospital in Portugal motivated (Moz and Pato 2003). They formulated the rerostering nurse scheduling problem as an integer multicommodity flow problem. Rerostering describes the situation of changing roasters when, for unexpected reasons, workers are unable to perform tasks to which they were assigned. A heuristic was implemented as a first approach, followed by integer linear programming model and its relaxations. Later, Moz and Pato (2004) extended the model to fit further requirements and developed further binary linear programming models.

It is very common to know the popular times, as well as to have some information about the time that people typical spend at service companies and shops. For example, a simple Google search of the City of London Post Office, usually provides historical statistical data based on previous visits which is available to managers in addition to the company’s opening hours. Based on this data, the model presented in this paper can be used.

Here, unlike those previously mentioned, the human resource allocation problem is defined by the actual manpower demands of different periods, where the duration of the periods can vary arbitrarily. The most important questions from an economy point of view are when should the workers be called in-house, i.e. to start working after a holiday leave, and for how long to satisfy the preliminary known demands while also abiding by labour standards and regulations. Obviously, the necessary labour should be adequately skilled and available, and the primary target is to minimise the unnecessary labour in-house per period. Additional targets may also be set up, for example to minimise the overall number of labour units, or also considering the “comfort” expectations of the labour, so that within the event horizon, the most even working time should be realised for every worker. A general case is presented in this paper based on the multicommodity network flow models.

2 Resource allocation in case of a single position

In a workplace there are typically multiple positions for labour, requiring various skills and competences per position. Moreover, a worker having the necessary skills and knowledge may work in more than one position during their shift. This chapter investigates the simplest case which is when there is only one position.

2.1 Problem description

First, let us define the number of workers available as NoL (refer to Table 1.); and the duration of the planning horizon given as NoD, which is given in days. To ensure accurate planning, the planning horizon is divided into sufficient time periods; where demand is considered to be constant within a each period. This is necessary since demand may vary arbitrarily throughout the planning horizon, for example there are differences between weekdays, weekends, and holidays, and also differences throughout the day, such as morning hours, daytime hours, and night hours. Therefore, the planning horizon is divided into NoP time periods, where the labour demand of the i-th period is NoNi and its duration in minutes is Pi. Furthermore, the following rules and regulations are considered for the labour working hours. The minimum number of working hours is NWH, and the maximum number of working hours is XWH, both are given in minutes. Whenever a worker is released from work, they should rest for a minimum period and should not be called in for work again during this time, so the minimum number of rest hours are defined accordingly, i.e. RWH also given in minutes. Within the planning horizon the working hours of the labour must be balanced according to the labour standards, and thus \(\delta\) is introduced as the maximum acceptable difference of the working hours from the working time frame within the time horizon. If a working time frame is considered, then the working time of the actual workdays should be as evenly distributed over the time horizon as possible, and none of the differences should exceed \(\delta\). In general, \(\delta\) is regulated by labour laws.

Table 1 Problem description for the case with single positions

Please note that this data can be presented in either in a table format or using a simple figure. In Fig. 1, for example, there are six periods considered. The demands are 3 workers demanded in period PI, 5 workers demanded in period PI+1, 8 workers demanded in period PI+2, etc. Beside these demands, there are interesting cases where there is unnecessary in-house labour, which is also highlighted. For example, case one on the left-hand side of the figure illustrates that there are two extra workers in-house in period PI (shaded in grey) above the actual demand due to some previous constraints. Case two, on the right hand side of the figure, illustrates that there is one extra worker above the actual demand in-house in period PI+5 (shaded in grey) due to some forthcoming constraints. Further, it is also highlighted how many workers should be called in-house to start their working shift or sent home at the beginning of the period, for example at the beginning of period PI+2 3 new workers should start work, while at the beginning of period PI+3 2 workers should finish their shifts and start their rest period by returning home.

Fig. 1
figure 1

Demands of different periods with interesting cases

Now let us determine the optimal working schedule and assign the workers to the demands of each period while also satisfying the labour standards and minimising the overall number of workers.

2.2 An illustrative example

Using the data from Fig. 2 as an illustration. The working day is 15 h and there are 8 periods within a day; while the labour demand of the periods are: 3, 6, 9, 6, 5, 7, 9, 4. The available number of workers is 20. The minimum number of working hours is 4, and the maximum number of working hours is 12 h.

Fig. 2
figure 2

Problem description of the illustrative example

A solution is given in Fig. 3. Where 18 workers satisfy all the demands and there are no unnecessary or extra workers in-house during the time periods. Please note that the workers in-house are depicted above the actual demands and represented by a horizontal bar. Their working shifts, i.e., start of work together with the duration of the shift, can be easily read from the table. In this figure the different colours represent deviations from the standard 8 h shift.

Fig. 3
figure 3

A possible solution of the illustrative example

The optimal solution of the illustrative example is depicted in Fig. 4, where all the demands are satisfied within the time periods and there are no unnecessary or extra workers in-house. The overall number of workers is 13. The solution is optimal in a sense that with fewer workers the demands cannot be satisfied. It can be clearly seen that the working hours of the labour show a great difference in both cases, yet the given constraints, namely minimum 4 h and maximum 12 h of a work shift, are met. This situation can be controlled by setting the maximum number of acceptable differences of the working hours from the working time frame within the time horizon. In the case of \(\delta =2\), Fig. 5 illustrates the optimal solution. Extra workers above the actual demand of the periods appear due to this constraint, they are highlighted as surplus.

Fig. 4
figure 4

Optimal solution of the illustrative example

Fig. 5
figure 5

Optimal solution of the illustrative example when \(\delta =2\), extra workers above the demands are highlighted as surplus

2.3 MILP mathematical programming model

The problem is formulated hereinafter as a multicommodity network flow model, where the graph represents the workflow, the commodities of the edges represent the workers, and the paths describe the actual schedules of the workers. The direction of the network flow is considered to be the time, as shown in Fig. 6. The worker starts from source node \({q}_{0}\) and arrives at the sink node \({q}_{NoP}\), while the following activities are performed by each worker:

  • Starting work – represented by upward edges,

  • Finishing work and starting rest period – represented by downward edges,

  • Is active, i.e., working on an assignment – represented by the edges at the top,

  • Resting – represented by the edges at the bottom.

Fig. 6
figure 6

Multicommodity network flow representation of the problem

As shown in Fig. 6, the edges between the \({p}_{0}, {p}_{1},...,{p}_{NoP}\) nodes of the graph represent the working time of the given periods, the edges between the \({q}_{0}, {q}_{1},...,{q}_{NoP}\) nodes of the graph represent the resting time of the given periods, while edges between nodes \(q\) and \(p\) represent whether a worker starts or finishes his work at the beginning of the period, depending on the direction of the edge. In return, nodes \(q\) and \(p\) represent the events or situations whether the worker is at rest or at work, respectively. Figure 7 illustrates the flow nature of the problem, where different colours represent the commodities of the flow, namely the workers. In the example there are 4 workers available for the problem of three periods. 3 workers, as represented by yellow + green + violet, start their shift at the beginning of the first period as indicated by the upward edges. These 3 workers are active through the first period, see the horizontal arrows at the top; while 1 worker, represented by blue, rests or remains at home through the first period, see the horizontal blue arrow at the bottom. At the beginning of the second period one previously active worker represented by violet colour goes to rest, see the downward arrow, and the worker represented by blue starts their work shift, see the upward arrow; the other workers do not change their status. In period 2, there are 3 workers active and working on various assignments, namely workers represented by yellow + green + blue, while one worker represented by violet, is resting. At the beginning of the third period one previously active worker represented by yellow goes to rest, see the downward arrow, and the other workers do not change their status. Thus, in period 3, there are 2 workers active and working on various assignments, namely workers represented by green + blue, while the worker represented by violet + yellow rests.

Fig. 7
figure 7

Human resource allocation network flow representation

It is obvious, that in case of \(NoL\) workers, the problem can be formulated as a multicommodity network flow model with \(NoL\) commodities. Furthermore, a binary variable can describe the status of a worker related to any edge, that is, whether the worker is present or absent. Therefore, the status of \(NoL\) workers related to an arrow can be given by a binary vector of \(NoL\) length.

Please note that the problem has its own peculiarities, therefore not all of the edges need to be assigned with a \(NoL\) long binary vector, and fewer variables are sufficient for the mathematical programming model. As discussed later, it is sufficient to assign the \(NoL\) long binary vectors to the edges between the \({p}_{0}, {p}_{1},...,{p}_{NoP}\) nodes, i.e. \(\forall i\in \left\{\mathrm{1,2},...,NoP\right\} \left({p}_{i-1},{p}_{i}\right) \to \left({x}_{i 1}, {x}_{i 2},...,{x}_{i NoL}\right)\). Since the \(\left({p}_{i-1}, {p}_{i}\right)\) edge describes the i-th period, it can also be said that the \(NoL\) long binary vectors are assigned to the periods. Further variables and parameters are given to formulate the MILP mathematical programming model.

2.3.1 Variables and their relations

The variables and their relationships are presented in Table 2 and Fig. 8, while Fig. 9 illustrates the assignment schedule for a single worker. Please note that the green arcs represent a potential assignment schedule of a single worker within the time horizon. It should also be noted that due to the commodity nature of the proposed model, each worker will have a specific path from the source node to the sink node, representing the beginning and end of the planning horizon. Further, represented by variables \(w\) and \(h\), the length of the continuous shifts and continuous rests spanning over a number of periods is controlled.

Table 2 Variables and their relationships
Fig. 8
figure 8

Variables assigned to the graph objects

Fig. 9
figure 9

Assignment schedule of a single worker

2.3.2 General constraints

In the following formula, let M be a large number, \(M=1+\sum_{i=1}^{NoP}{P}_{i}\) is a potentially effective option.

The constraints related to the working time (see C1) are given in Eq. (1) through (3). If worker k does not work in the i-th period, then at the end of the i-th period their continuous working time since the start of their last shift is zero. If worker k works in the i-th period, then at the end of the i-th period their continuous working time since the start of their last shift is equal to the length of the period plus their working time beforehand. This model has a total of \(NoL\bullet NoP\) C1 constraints each.

$$\forall k\in \left\{\mathrm{1,2},...,NoL\right\} and \forall i\in \left\{\mathrm{1,2},...,NoP\right\}$$
(C1)
$${w}_{i k} \le {x}_{i k}*M\, and\, {w}_{0 k}=0$$
(1)
$${w}_{i k} \le {w}_{i-1 k}+{P}_{i}$$
(2)
$${w}_{i k} \ge {w}_{i-1 k}+{{x}_{i k}*P}_{i}+\left({x}_{i k}-1\right)*M$$
(3)

Similarly, constraints related to the rest (C2) are given in Eq. (4) through (6). If worker k works in the i-th period, i.e., \({x}_{i k}=1\), then at the end of the i-th period their continuous rest time is obviously zero. If worker k does not work in the i-th period, i.e., \({x}_{i k}=0\), i.e., they are resting, then at the end of the i-th period their continuous rest time equals to the length of the period plus the rest hours previously. In the model there are \(NoL\bullet NoP\) number of C2 constraints each.

$$\forall k\in \left\{\mathrm{1,2},...,NoL\right\} and \forall i\in \left\{\mathrm{1,2},...,NoP\right\}$$
(C2)
$${h}_{i k} \le \left(1-{x}_{i k}\right)*M\, and\, {h}_{0 k }=0$$
(4)
$${h}_{i k} \le {h}_{i-1 k}+{P}_{i}$$
(5)
$${h}_{i k} \ge {h}_{i-1 k}+{\left(1-{x}_{i k}\right)*P}_{i}-{x}_{i k}*M$$
(6)

Figure 10 illustrates multiple cases; case a) illustrates the situation when the worker starts a new shift at the beginning of the i-th period; case b) illustrates the situation when the worker started their shift earlier and continues the shift, case c) illustrates the situation when the worker ends their shift and starts the rest at the beginning of the i-th period and case d) illustrates the situation when the worker has not worked in the previous period and continues their rest.

Fig. 10
figure 10

Explanation of the equalities (1) through (6)

It is important to distinguish between active workers and others. A worker is considered active who has already worked, no matter how many times they have started a new shift, until the end of the i-th period. Equations (7) and (8) are related to this constraint. In the model there are \(NoL\bullet NoP\) number of C3 constraints each.

$$\forall k\in \left\{\mathrm{1,2},...,NoL\right\} \forall i\in \left\{\mathrm{1,2},...,NoP\right\}$$
(C3)
$${d}_{i k}\le \left({x}_{i k}+{d}_{i-1 k}\right)\, and\, {d}_{0 k}=0$$
(7)
$${d}_{i k}\ge \left({x}_{i k}+{d}_{i-1 k}\right)/2$$
(8)

Please note that constraints C3 can be replaced by C3_B, i.e. Equations (9) through (11); in the model there are \(NoL\bullet NoP\) number of C3_B constraints each.

$$\forall k\in \left\{\mathrm{1,2},...,NoL\right\} \forall i\in \left\{\mathrm{1,2},...,NoP\right\}$$
(C3B)
$${d}_{i k}\le \left({x}_{i k}+{d}_{i-1 k}\right)\, and\, {d}_{0 k}=0$$
(9)
$${d}_{i k}\ge {d}_{i-1 k}$$
(10)
$${d}_{i k}\ge {x}_{i k}$$
(11)

2.3.3 Resource demands

Strict constraints related to the resource demands in every period should be satisfied, i.e. the minimum number of labour units should be met in each period; see C4, Eq. (12). In the model there are \(NoP\) number of C4 constraints.

$$\forall i\in \left\{\mathrm{1,2},...,NoP\right\}$$
(C4)
$$\sum_{k=1}^{NoL}{x}_{i k }\ge {NoN}_{i } if {NoN}_{i}=0 then \sum_{k=1}^{NoL}{x}_{{NoN}_{i} k }=0$$
(12)

2.3.4 Labour standards 1: maximum number of working hours within a shift in minutes

Regulations related to the maximum number of working hours, XWH, control the length of the working shifts, as given in Eq. (13). In other words, longer shifts cannot be assigned to the workers. In the model there are \(NoL\bullet NoP\) number of C5 constraints.

$$\forall k\in \left\{\mathrm{1,2},\dots ,NoL\right\} and \forall i\in \left\{\mathrm{1,2},\dots ,NoP\right\}$$
(C5)
$${w}_{i k} \le XWH$$
(13)

2.3.5 Labour standards 2: minimum number of working hours within a shift in minutes

Regulations related to the minimum number of working hours, NWH, also control the length of the working shifts; it is given in Eq. (14). In other words, shorter shifts cannot be assigned to the workers. In the model there are \(NoL\bullet NoP\) number of C6 constraints.

$$\forall k\in \left\{\mathrm{1,2},...,NoL\right\} \,and\, \forall i\in \left\{\mathrm{1,2},...,NoP-1\right\}$$
(C6)
$${w}_{i k} \ge \left({x}_{i k}-{x}_{i+1 k}\right)*NWH\, and\, {w}_{NoP k} \ge {x}_{NoP k}*NWH$$
(14)

2.3.6 Labour standards 3: minimum number of rest hours after a shift in minutes

Regulations related to the minimum number of rest hours, RWH, control the length of rest after a work shift; it is given in Eq. (15). In other words, whenever a worker is released from work and sent to rest, they can only return to work after the minimum number of rest hours has elapsed. Obviously, \(i=NoP\) does not need to be verified, since after the last period a new shift cannot be started. In the model there are \(NoL\bullet NoP\) number of C7 constraints.

$$\forall k\in \left\{\mathrm{1,2},...,NoL\right\} and \forall i\in \left\{\mathrm{1,2},...,NoP-1\right\}$$
(C7)
$${h}_{i k} \ge \left({x}_{i+1 k}-{x}_{i k}\right)*RWH+ \left({d}_{i k}-1\right)*M$$
(15)

2.3.7. Labour standards 4: deviation from the standard 8 h.

Within the planning horizon, i.e., during the \(NoD\) days, the total number of working hours of every active worker may only differ with \(\delta\) minutes from the standard 8 h working time frame; see C8, i.e. Equations (16) and (17). In the model there are \(NoL\) number of C8 constraints each.

$$\forall k\in \left\{\mathrm{1,2},\dots ,NoL\right\}$$
(C8)
$$\sum_{i=1}^{NoP}{x}_{i k}*{P}_{i} \ge {d}_{NoP k}*\left(480*NoD-\delta \right)$$
(16)
$$\sum_{i=1}^{NoP}{x}_{i k}*{P}_{i} \le {d}_{NoP k}*\left(480*NoD+\delta \right)$$
(17)

2.3.7 Objective function 1

The objective function is to minimize the number of workers in each period, it is given by equation (O1).

$$\sum_{i=1}^{NoP}\sum_{k=1}^{NoL}{x}_{i k} \to MIN$$
(O1)

2.3.8 Objective function 2

The above given objective function can be extended, for example to minimize the weighted value of the number of active workers plus the number of workers in each period, as given by equation (O2). Here \({d}_{NoP\bullet k}\) binary variable refers to the active workers mentioned above.

$$K* \sum_{k=1}^{NoL}{d}_{NoP k}+ \sum_{i=1}^{NoP}\sum_{k=1}^{NoL}{x}_{i k} \to MIN$$
(O2)

2.4 Typical cases

In this chapter there are some typical cases presented. First, it is illustrated how: (i) a single shift, 8 h working day; (ii) more than one shift, but less than 24 h; and (iii) 3 shifts, totalling 24 h continuously; can be handled.

The first case refers to the single, one shift, 8 h long day assignment schedules. The multicommodity network flow model and the corresponding MILP mathematical programming model can be given as detailed above. First, the periods should be specified. Obviously, the planning horizon may refer to a whole week including weekdays as well as the weekend where the demands of the periods differ according to prerequisites.

Please note that to be able to apply the model appropriately, a technical period should be introduced after the last period of each day and the first period of the next day, where the actual workforce demand should be set to zero. This technical period together with its actual duration refers to the rest between the last working hours of the day and first working hours of the next day. Obviously, this technical period is not necessary after the last day.

The second case refers to the more than one shift long, but less than 24 h long assignment schedules. This case is similar to the one shift schedule and the same technical periods should be included. In this case, with the careful selection of the minimum number of rest hours, RWH, it can be ensured that workers fulfil their 8 h working period in two 4 h shifts, for example.

The case where there are 3 shifts within a 24 h long schedule can be considered as a continuous working case and no technical rest period is necessary for the model.

3 Resource allocation in case of multiple positions

In this chapter, a more general situation than the one described above is considered, namely, when there are multiple positions for the labour at the workplace, and workers with the necessary skills and knowledge may work in more than one position during their shift. Please note that this case is very similar to that described in the previous chapter, therefore only the main points are highlighted.

Here, obviously, more information is necessary. In addition to the previously mentioned data, the number of positions, i.e., \(NoB\), together with the labour demand for this position in every i-th period, i.e., \(No{N}_{Bi}\), have to be given.

The variables, together with their relationships, representing the assignment schedule situation of a single worker in the case of multiple positions, are given in Table 3. Figures 11 and 12 illustrates the situation with A and B positions, i.e., the graph is extended according to these. Again, the green edges represent a potential assignment schedule of a single worker within the time horizon, and furthermore, every worker will have a specific path between the start and end of the planning horizon. Further, represented by variables \(w\) and \(h\), the length of the continuous shifts and continuous rests spanning over a number of periods is controlled.

Table 3 Variables and their relationships for the case with multiple positions
Fig. 11
figure 11

Variables assigned to the graph objects for the case with A and B positions

Fig. 12
figure 12

Assignment schedule of a single worker for the case with A and B positions

The assignment of the variables to the graph representing the human resource allocation problem with multiple positions is done in a similar manner as described previously for the problem with a single position. Finally, the MILP mathematical programming model is also generated in a similar manner.

4 Conclusion

The optimal human resource allocation problem is a widely studied area of high importance. The present paper discusses a fast and effective method to handle general cases and special situations with relative ease. Different scenarios can be constructed to support efficient labour scheduling. These scenarios may include, for example, cases of sickness, or cases when labour demand rises unexpectedly, or cases with very tight constraints, or with extreme conditions for the workers. Based on the method presented, an effective application may be implemented to support HR managers in their work.