# Designing a Multiobjective Human Resource Scheduling Model Using the Tabu Search Algorithm

Authors: Roghayeh Mirataollahi olya; Seyed Ahmad Shayannia; Mohammad Mehdi movahedi
Journal: Discrete Dynamics in Nature and Society
 (2022)

---

## Abstract

Nowadays, the major and substantial challenge and constraint of organizations, specifically in developing countries, are not the lack of raw materials, energy, or even technology but cases that are directly or indirectly associated with human resource management. The most significant problems that organizations face include dissatisfaction, lack of motivation, inefficiency of human resources, high amount of job turnovers, and low productivity. Today’s organizations and institutions should realize true perfection and health create the conditions for survival, order, excellence, and growth. In this research, considering the high importance of these issues, the problems of scheduling and allocation of manpower in a real place are solved. To this end, the metaheuristic Tabu search algorithm is used with the aim of minimizing the duration of activity and the presence of all manpower. For this purpose, to achieve the objectives of the research, three different scenarios related to the required manpower and the minimum-maximum presence of manpower according to whether they are on leave or not are used.


---

## Body

## 1. Introduction

Indeed, the current society is an organizational society and is having flexible employees and managers with multiple skills is a significant ideal for any organization. In general, it can be said that efficient manpower is an indicator of the superiority of one organization over other organizations. The presence of such people in the activities of any group can facilitate and expedite matters and save time and even resources [1] and provide an opportunity to develop skills and motivate. Time is a vital, irreversible, finite, and dynamic factor. It is irreversible because the passing of a minute means the end of it forever, is finite because there are 24 hours a day, and is dynamic because time is never static [2]. Time is the only thing that, if we lose it, is irreversible as well as unmaintainable and unstoppable from moving. Also, the sources of stress in the workplace are work pressure and lack of time to do tasks. But what matters is time management. Therefore, the issue of time management and time management is raised [3]. Many countries have based their development plans on increasing productivity. Improving productivity in organizations enables human resources to think better, innovate, and find a more systematic attitude, a thought that aims to create and build the future instead of the present and the past [4]. One of the issues that the traffic police always face is the optimal scheduling of personnel and equipment available to protect road safety at main and mobile police stations. But the traffic police personnel sometimes struggle with constraints and problems, and according to the goals of the organization, we should try to eliminate them. Constraints and problems that these personnel always face in their work level can include constraints of satisfaction, constraints of incompatibility of personnel, and constraints of drowsiness, which in turn decrease the level of efficiency and motivation of traffic police personnel [5]. Therefore, there are various strategies to achieve the goals and eliminate the constraints, one of which is the job rotation of employees. Job rotation is an educational technique that requires the transfer of an intern from one department to another to expand their understanding of the business and test their abilities. Noe et al. [6] stated that job rotation is the process of systematically transferring an individual from one job to another over time. Job rotation is an interesting mechanism for employees to be able to work in different positions and jobs. As a result, it leads to learning and working in different jobs to learn their suitable job. Job rotation includes job design strategies that are used to motivate employees to work or repeat tasks. Job rotation is also done to allow qualified employees to gain more insight into a company’s processes and reduce fatigue and increase job satisfaction through job changes. Job rotation benefits employees who contribute to reducing burnout, apathy, and fatigue, which ultimately increases employee satisfaction and motivation [7]. Most organizations use job rotation strategies in the form of job rotation scheduling programs. However, research on the effects of employing job rotation has yielded practically different results, so that the usefulness of job rotation in improving performance has not been proven with certainty. So far, studies and the field of applying job rotation have been more limited to modeling with ergonomic case objectives, and behavioral issues that are inherently associated with the issue of person-task allocation have recently been suggested that one of the aspects of behavioral dimensions is fatigue. The first study to conceptualize fatigue in allocation was in 2006 by. Since that year, other studies have been conducted that have somehow developed the conceptualization of fatigue [8]. Job rotation scheduling to reduce fatigue should be performed by providing mathematical models. The relevant model for scheduling tasks should be provided in a way that includes real and effective aspects of allocation [9].Job rotation is one of the job design strategies that is used to increase the motivation of employees to perform repetitive tasks. Most organizations use this strategy to make employees multifunctional and multiskilled in the form of job rotation scheduling programs [8]. Job rotation is a dynamic allocation problem from a modeling perspective and it focuses directly on the behavioral dimensions of the employee and his productivity from a behavioral science perspective. So far, however, studies and the field of applying it have been limited to modeling with case ergonomic objectives (such as lower back pain reduction and behavioral issues that are inherently associated with the problem of person-task allocation have been raised recently). One of the aspects of behavioral dimensions is fatigue [8]. Fatigue is an unpleasant and penetrating feeling but transient that occurs as a result of repetitive tasks and reduces motivation, and as a result, reduces a person’s performance during activities and affects their production rate. This type of fatigue is a kind of internal disconnection. Another type of fatigue is related to loss of focus at work due to interruption and change of allocation [10]. In this type of fatigue, despite the motivation of the person to continue working, interruptions gradually cause fatigue in them and impair their performance [11]. The first study to conceptualize fatigue in the allocation problem was in 2006 by. Since then, other studies have been conducted that have somehow developed the conceptualization of fatigue. There have also been other studies that have considered aspects of learning and forgetfulness and a person’s skill level. These studies are older than fatigue studies. The role of the individual in the cellular environment is very important because the individual directs several tasks in each rotation cycle. Therefore, given that our case study in the present research is Qazvin traffic police, considering the preferences of the individual in terms of how to allocate in terms of how to repeat and discontinue tasks can have a significant effect on his performance. Each person has different short-term motivations in performing their tasks, depending on their tenure, background, and other unique characteristics. A person may have a tendency to do similar things in a certain short period of time and may tend to have dissimilarity in assigned tasks in other periods.According to the above mention, considering the fatigue caused by the repetition or interruption of allocation based on one’s preferences in the cellular environment can give a more realistic aspect to the problem of determining the job rotation program. Therefore, this research seeks a multiperiod unbalanced allocation model that uses fatigue as a criterion for job rotation. In this way, in order to assign tasks dynamically to individuals, it considers the effects of fatigue caused by repetition and interruption of work based on the individual’s preferences.The personnel of the traffic police are composed of fixed and patrol agents. Activities are divided into three categories: patrols, mobile stations, and main stations. According to what has been raised, one of the issues that the traffic police always face is the optimal scheduling of personnel and equipment in order to protect road safety at the main and mobile stations. Therefore, the main contribution of the study is as follows:(i)
Provide a multiobjective planning model considering the cost objectives of manpower, installation, and maintenance of cameras and fuel.(ii)
Implementation using the real information and data of the traffic police of Qazvin province in Iran.The rest of study is organized as follows: Section2 presents a literature review. Section 3 presents the proposed research framework. Section 4 presents the practical research results. Finally, Section 5 presents the overall conclusion and further research for the future.


## 2. Literature Review

In this section, previous related studies are reviewed. For example, Azizi et al. [12] addressed the job rotation scheduling considering fatigue with the aim of minimizing delay caused by fatigue; they also provided the fatigue function in terms of time as an exponential model. They also investigate the factors of boredom, learning, and forgetfulness of workers in the job rotation scheduling. Asensio et al. [13] designed a genetic algorithm for obtaining a job rotation scheduling program with the aim of preventing the risk of work-related musculoskeletal disorders in repetitive work. To do this, a combination of the effectiveness of the genetic algorithm optimization with the ability to evaluate the occurrence of risk by following the ergonomic evaluation method “OCRA” is considered. Ayough et al. [11] developed the concept of fatigue and the job rotation scheduling model proposed by, so that by developing the concept of fatigue from the same work into two types of positive and negative fatigue due to doing similar work and not just the same, a flexible model is provided that can be used to schedule tasks in such a way that similar tasks in the smallest plan able period and dissimilar tasks in the largest plan able period are allocated to each operator, so that the total allocation cost including the cost of doing work and fatigue is minimized. Mousavi [14], in a study, scheduled the workforce and job rotation, taking into account ergonomic factors. A multiobjective planning is proposed to optimize the two mentioned objectives of the studied workforce scheduling problem. The linear aggregation method and Epsilon constraint are used to solve this optimization model. Furthermore, this dissertation is a new type of assignment problem called the sequencing generalized assignment problem, which is defined for workforce scheduling in a hybrid system consisting of jobs in series and parallel. This NP hybrid optimization problem has been proven to be difficult and precise methods are not able to solve large-scale cases. Hence, three approximate methods consisting of two mathematical and hybrid heuristic approaches have been developed to solve it. Mathematical methods are based on formula decomposition to decompose and simplify the original model into two or more smaller models. The third method is a greedy initiative with a local search. The efficiency of the three methods mentioned is evaluated by different cases in different sizes. In addition, in the final stage of this dissertation, human resource scheduling for a home health care system is set mathematically. Due to the system structure, integration of worker assignment and automobile routing problems is proposed. Finally, a three-step mathematical approach is proposed to solve this hybrid optimization problem. Ying et al. [15] in a study provided exact methods to solve no-wait flowshop scheduling problems with improved due date constraints. This study proposes a normal linear programming model (MILP) and a two-step counting algorithm to improve the exact methods for solving this problem with the aim of minimizing the makespan. A comprehensive computational experiment has been performed to compare the exact performance of the methods discussed. The computational results show that the proposed MILP model and the two-step counting algorithm are significantly better than the best optimization methods and provide the following solutions for several unsolved methods from the literature. Jia et al. [16] in a study presented the ant colony optimization algorithm for scheduling jobs with fuzzy processing time on parallel batch machines with different capacities. Jobs have nonuniform sizes and fuzzy processing time. After constructing a mathematical model of this problem, in this study, a fuzzy ant colony optimization (FACO) algorithm is proposed. Based on the capacity limit of the device, two lists of candidates are used to select a job to build the batch. In addition, based on the empty space of the solution, heuristic information is designed for each candidate list to guide the ant. Also, the fuzzy local optimization algorithm is included to improve solution quality. Finally, the proposed algorithm is compared with several more advanced algorithms than simulated experiments and statistical tests. Comparative results show that the proposed algorithm can find better solutions in a reasonable time than other comparative algorithms. Chaurasia et al. [17] conducted a study entitled “providing an evolutionary algorithm based on the ideological phenomenon for the job-shop scheduling problem with no-wait constraint.” In this study, an evolutionary algorithm with guided mutation (EA/G)-based hyper-heuristic for solving the job-shop problem with no-wait constraint (JSPNW) is provided. The JSPNW is an extension of well-known job-shop scheduling problem subject to the constraint that no waiting time is allowed between operations for a given job. This is a typical NP-hard problem. The hyper-heuristic algorithm comprises two-level frameworks. In the high level, an evolutionary algorithm is employed to explore the search space. The low level, which is comprised of generic as well as problem-specific heuristics such as guided mutation, multi-insert points, and multiswap. EA/G is a recent addition to the class of evolutionary algorithm that can be considered as a hybridization of genetic algorithms (GAs) and estimation of distribution algorithms (EDAs), which tries to overcome the shortcomings of both. In GAs, the location information of the solutions found so far is directly used to generate offspring. On the other hand, EDAs use global statistical information to generate new offspring. In EDAs, the global statistical information is stored in the form probability vector, and a new offspring is generated by sampling this probability vector. We have compared our approach with the state-of-the-art approaches. The computational results show the effectiveness of our approach. Rezaei et al. [18] presented a vehicle routing problem in a relief supply chain under the crisis condition considering blood types. For this purpose, a biobjective mixed-integer linear programming (MILP) model is developed for relief supply under the crisis condition. The mentioned model has two objectives: maximizing the amount of blood collected by bloodmobiles and minimizing the arrival time of the blood receiver buses and a helicopter to a crisis-stricken city after the collected blood is used up. The model is coded by CPLEX software, and the results obtained from solving the model indicate that, without considering a helicopter, the demand is not supplied within the critical period after crisis. Jahangiri et al. [19] presented a multiple criteria decision-making framework for ranking of key human resources in the humanitarian supply chain in the emergency department. Abolghasemian et al. [2] presented a delay scheduling based on discrete-event simulation for construction projects. For this purpose, a combined approach of discrete-event simulation and computational modeling is applied; then, we compare the results. Measurements show that the systems fragmented by repeated and short repetitions while referring to early are in optimal performance. Rashidi Komijan et al. [20] presented a new bus routing. For this purpose, a multiobjective mixed-integer model is proposed to handle the associated problem. Minimization of transportation cost and traveling time is the main objective. The proposed model is applied in a real case study including 4 schools in Tehran. The results indicate the efficiency of the proposed model in comparison with the existing system. Khanchehzarrin et al. [4] presented a new mixed-integer nonlinear programming model for the time-dependent vehicle routing problem with time windows and intelligent travel times. The aim is to minimize fixed and variable costs with the assumption that the travel time between any two nodes depends on traffic conditions and is considered to be a function of vehicle departure time. Depending on working hours, the route between any two nodes has a unique traffic parameter. For this purpose, each working day is considered to be divided into several equal and large intervals, termed as a time interval of traffic. For this purpose, a Tabu search optimization algorithm is devised for solving large problems. Also, after linearization, a number of random instances are generated and solved by the CPLEX solver of GAMS to assess the effectiveness of our proposed algorithm. Results indicate that the initial travel time is estimated appropriately and updated properly in accordance with the repeating traffic conditions. Hazrati et al. [21] proposed a model that is developed by considering the two objectives of minimizing overall costs and maximizing the amount of products ordered from different suppliers based on their weight value. Weights are calculated based on different criteria using the fuzzy analytic hierarchy process method for each supplier in different periods. Then, due to the multiobjective nature of the model, the proposed model has been solved by using the epsilon constraint in GAMS and nondominated sorting genetic algorithm II in MATLAB software. Momenitabar et al. [22] for the first time considered the impacts of the backup suppliers and lateral transshipment/resupply simultaneously on designing a sustainable closed-loop supply chain network (SCLSCN) to decrease the shortage that may occur during the transmission of produced goods in the network. In this manner, the fuzzy multiobjective mixed-integer linear programming model is proposed to design an efficient SCLSCN resiliently. Moreover, the concept of circular economy has been studied in this study to reduce environmental effects. This study aims to optimize total and environmental costs, including energy consumption and pollution emissions, while increasing job opportunities. Pourghader Chobar et al. [23] designed a multiobjective hub-spoke network of perishable tourism products. In order to consider the perishable factor of the products, some collection centers are considered for the products which are perished. Accordingly, the combination of hub-spoke network and supply chain is assessed here. Moreover, this combination is to use transportation discounts in the supply chain network. The desired combination is done in such a way that the distributors are considered as a set of hubs. Prez et al. [10] applied the school bus routing problem technique to reduce its execution time. To apply the partial evaluation approach in this problem, each solution contains the information of the change that was made concerning the solution, from which it originates. With this information, when evaluating the objective function, it will be only necessary to analyze the routes that changed. For this purpose, it is applied in order to reduce the computational cost of SBRP solutions based on metaheuristics. The results show that it is possible to decrease the execution time in 80% of the instances, reducing the execution time on average by 73.6%.


## 3. Research Methodology

In this section of the research, the details of the research method are introduced. For this purpose, problem statement, problem assumptions, symbolization, modeling, and problem solving methods are stated.


### 3.1. Problem Statement

Qazvin traffic police is selected as the subject of this study. Research and studies show that the current number of staff in the organizational chart is 50, but the number of available staff is 23. Of these, 4 to 5 patrols inconspicuously control the speed. There are 5 to 6 stations along the route, each with 4 to 5 car teams. According to studies, the shift of the station employees is done for 24 working hours according to the number of required employees of the checkpoint per hour of the day and night. For example, at 8 o’clock in the morning, the number of employees required for the station is set at 15, and at 6 o’clock in the afternoon, the number of employees is considered at 8. Therefore, according to the requirements of the number of workforce, the proposed method needs to be able to determine exactly the same number of people in these designated hours according to the work shift. Since there are a number of conscripts and a number of officers at each station, their working hours are also different. In this regard, the number of hours that each station employee can be present and serve at the station and also the minimum and maximum service hours are received from the user. According to the above, scheduling is performed. The total number of employees at the station, as mentioned earlier, is 50 in the organizational chart and 23 in practice. Therefore, this schedule is performed for 23 people and it is natural that some employees will be given rest time in each schedule. Of the 23 employees present at the station, 15 are conscripts and 8 are officers. The working hours of conscripts are 24 hours and the working hours of officers are 10 hours. At each time of scheduling, due to the need of the station for the presence of at least 2 officers at any time of the day and night, the working hours of 2 officers will be considered 24 hours. Obviously, the officers to whom a 24-hour shift is allocated will receive guard rest for the next 24 hours. For this purpose, in order to achieve the desired goals, three different scenarios are used, in which the work shift and the number of employees present at the checkpoint in a day and night are different. Therefore, for each scenario, it is tried to minimize the duration of activity and the presence of all officers. As mentioned, the Tabu search metaheuristic algorithm is used to solve the problem. According to the determined parameters, in which the length of the Tabu list is equal to 10 and the number of actions is equal to 20, the method of operation in this algorithm is so that the search operation of a possible answer starts based on the constraints of the problem. In this problem, a possible answer is considered for scheduling shifts of Qazvin road police employees, so that the mentioned constraints are not violated for the number of people present at any hour of the day and night and the hours during which they can be present at the station. The next step in solving the problem is to define the neighbors of this possible answer. Neighborhoods of a point can be defined in different ways. In this algorithm, the neighborhood of the answers is obtained with a one-hour shift of the presence time at the station, provided that the constraints are not violated. The answers obtained from the above method are placed in a set such asM, which are all possible answers to the problem. In the next step, using each member of the set, the shift scheduling is performed and the objective function is calculated. The member of this set that has the least value of the objective function is taken to the starting point, the operation of finding neighborhood answers is performed as above, and this operation is repeated up to the number of iterations stated in the algorithm specification table. In order to prevent moving in circular paths and returning to previous answers, the answer obtained in the previous step or the movement that leads to these answers is placed in a list called the Tabu list. If the answer obtained in any step is in this list, it is not acceptable and another member of the M set is selected as the next starting point. To solve this problem, the movement that results in the best answer in each step is saved as the Tabu movement and is prevented from being performed in subsequent iterations. Similarly, until the end of the number of iterations, the operation of search and updating the list of Tabu answers and possible answers are updated, and after the end of the 100th iteration of the algorithm, the best answer will be introduced as the optimal answer.


### 3.2. Proposed Model Assumption

Although patrol officers are needed throughout the day, the number of officers required varies at different times of the day. The objective of the proposed scheduling model is to meet the hourly needs of officers and to evaluate alternative plans in the event of a change in rest policy. Other constraints considered for the model are as follows:(1)
This model must be able to create the program in much less than 50 minutes, and the scheduling was carried out manually.(2)
A day is divided into 12 parts, the first shift starts from the beginning of the office hours of the station, that is, 7 am.(3)
The start time of the shift for the officers who begin their working day (they are not in the guard shift) must not be earlier than 7 am and the shift time for the rest of the employees, depending on the maximum and minimum hours of presence in the barracks, which is received from the user to make the model flexible is variable.(4)
The start time of the shift for the conscript personnel (noncadre soldiers), due to the 24-hour service, can start from any hour.(5)
At least one of the cadre employees must be on guard rest every day.(6)
Obviously, the holidays in each month will be rotating. Officers who have been on a 24-hour shift at the station will either be off the next day or their shift hours will be greatly reduced and will go on guard rest two days after the guard.


### 3.3. Model Notation

The symbols used in the model relationships are as follows:(i)
IndexN: a time set. A day and night are divided into 12 parts N=1,2,….,12.C: a set of conscript employees C=1.2…,15.i: the index of the ith person, i∈Cj: the jth time to start the shift, j∈Nk: the kth time interval, k∈N(ii)
VariablesYij: it has two modes 0 and 1. If Yij  = 1, the jth shift is for the ith person.xijk: the number of officers in the ith category in the kth time interval from the jth shift given by the user.(iii)
ParametersB: very large number for ease of modelingP: length of pause, P=0,2,4,6,8,10dK: requirements of officers for the kth time intervall: the lower limit of the number of employees per moment of the day (login by user)u: the upper limit of the number of employees per moment of the day (login by user)(iv)
ObjectiveThe objective function defined for the model is as follows:(1)Minimizez=∑i∈C∑j∈N∑k∈Nxijk.(v)
Constraint(2)∑i∈C∑j∈Nxijk≥dk,(3)∑i∈C∑j∈Nxijk≤BYij,(4)Yij=1,xijk=xijk+1=xijk+2+p=xijk+3+p0,OW,(5)j=k,∀i∈C,∀j∈N,∀k∈N,l≤∑j∈C∑k∈Cxijk≤u,(6)xijk≥0&xijk∈I∀i∈C,∀j∈N.The purpose of the objective function of equation (1) is to minimize the duration of activity and the presence of all officers. Equation (2) ensures that hourly needs are met at any time interval. Equations (3) and (4) determine how many officers need to be present at each time interval. When the first half of the shift is determined, the second half of the shift is determined by the length of the pause (P). The constraint of equation (5) ensures that the number of members of shifts is approximately equal to that of the declared persons, and by using equation (6), the non-negativity and integrity of the variables are guaranteed.


### 3.4. Solution Approach: Tabu Search Algorithm

In this way, the steps of implementing the Tabu search algorithm are as follows:(i)
Adjusting the Parameters. The simple structure of the Tabu search algorithm requires special adjustments when solving an optimization problem. One of these adjustments is to encode the solutions. The code must be designed to have good efficiency and also be implementable. Another adjustment is to define the neighborhood structure. The neighborhood structure determines how the neighbors are obtained and their number for each solution. Another important parameter of this algorithm is how to design a Tabu list.(ii)
Forming an Initial Solution. In many cases, the initial solution is chosen randomly. But in many complex problems, generating an initial solution by chance is not easy, and steps are introduced to generate an initial solution.(iii)
Calculating the value of the objective function.(iv)
Neighborhood search and finding the best neighbor.(v)
Evaluation of Tabu Movement. After selecting the best neighbor, it is compared with the Tabu list. If it is on the Tabu list, it goes to step 6; otherwise, it goes to step 7.(vi)
Aspiration Criterion. When searching, it is possible that a movement is Tabu but doing so has a high effect on improving the performance of the algorithm. For this reason, the Tabu search uses a criterion called the aspiration criterion to get rid of constraints. This criterion is such that the Tabu movement that leads to a point that is better than all the points achieved so far is not considered. In this way, the Tabu movement is compared with the aspiration criterion, and if the aspiration criterion is met, the movement is performed; otherwise, it is returned to step 4.(vii)
Making the Movement. It is moved from the current solution to the new solution and the new solution is considered as the current solution.(viii)
Updating the Best Answer. In each step, the best solution is stored. Initially, the first solution is considered the best answer, and whenever a movement is made, the new solution is compared to the best available solution. If the new solution is better, the new solution is stored as the best solution; otherwise, the best solution will not change.(ix)
Stopping Condition. This condition determines the end of the algorithm. For example, the number of rounds can be a constraint to the stopping condition. After each round, the stopping condition is checked, and if the condition is met, then the algorithm terminates. Otherwise, the Tabu list will be updated and the steps will be repeated.The flowchart for the Tabu search algorithm is shown in Figure1.Figure 1
Flowchart for the Tabu search algorithm.The optimization method of the present research is that first the number of necessary employees in each of the hours of the day and night is determined and the hours that each of the 23 serving employees can be present at the station are determined and given to the program. Naturally, changes in presence hours can be applied and optimal results can be achieved. Finally, the output of the program is the hours of presence of each employee during 24 hours at the station. Obviously, service hours for conscripts are considered 24 hours. Also, the service hours for the cadre employees are 10 hours.The proposed model is flexibly defined. In this way, by changing the presence hours of the person at the station and also the number of required employees in each hour of the day and night, a new scheduling will be provided using the Tabu search algorithm.


## 3.1. Problem Statement

Qazvin traffic police is selected as the subject of this study. Research and studies show that the current number of staff in the organizational chart is 50, but the number of available staff is 23. Of these, 4 to 5 patrols inconspicuously control the speed. There are 5 to 6 stations along the route, each with 4 to 5 car teams. According to studies, the shift of the station employees is done for 24 working hours according to the number of required employees of the checkpoint per hour of the day and night. For example, at 8 o’clock in the morning, the number of employees required for the station is set at 15, and at 6 o’clock in the afternoon, the number of employees is considered at 8. Therefore, according to the requirements of the number of workforce, the proposed method needs to be able to determine exactly the same number of people in these designated hours according to the work shift. Since there are a number of conscripts and a number of officers at each station, their working hours are also different. In this regard, the number of hours that each station employee can be present and serve at the station and also the minimum and maximum service hours are received from the user. According to the above, scheduling is performed. The total number of employees at the station, as mentioned earlier, is 50 in the organizational chart and 23 in practice. Therefore, this schedule is performed for 23 people and it is natural that some employees will be given rest time in each schedule. Of the 23 employees present at the station, 15 are conscripts and 8 are officers. The working hours of conscripts are 24 hours and the working hours of officers are 10 hours. At each time of scheduling, due to the need of the station for the presence of at least 2 officers at any time of the day and night, the working hours of 2 officers will be considered 24 hours. Obviously, the officers to whom a 24-hour shift is allocated will receive guard rest for the next 24 hours. For this purpose, in order to achieve the desired goals, three different scenarios are used, in which the work shift and the number of employees present at the checkpoint in a day and night are different. Therefore, for each scenario, it is tried to minimize the duration of activity and the presence of all officers. As mentioned, the Tabu search metaheuristic algorithm is used to solve the problem. According to the determined parameters, in which the length of the Tabu list is equal to 10 and the number of actions is equal to 20, the method of operation in this algorithm is so that the search operation of a possible answer starts based on the constraints of the problem. In this problem, a possible answer is considered for scheduling shifts of Qazvin road police employees, so that the mentioned constraints are not violated for the number of people present at any hour of the day and night and the hours during which they can be present at the station. The next step in solving the problem is to define the neighbors of this possible answer. Neighborhoods of a point can be defined in different ways. In this algorithm, the neighborhood of the answers is obtained with a one-hour shift of the presence time at the station, provided that the constraints are not violated. The answers obtained from the above method are placed in a set such asM, which are all possible answers to the problem. In the next step, using each member of the set, the shift scheduling is performed and the objective function is calculated. The member of this set that has the least value of the objective function is taken to the starting point, the operation of finding neighborhood answers is performed as above, and this operation is repeated up to the number of iterations stated in the algorithm specification table. In order to prevent moving in circular paths and returning to previous answers, the answer obtained in the previous step or the movement that leads to these answers is placed in a list called the Tabu list. If the answer obtained in any step is in this list, it is not acceptable and another member of the M set is selected as the next starting point. To solve this problem, the movement that results in the best answer in each step is saved as the Tabu movement and is prevented from being performed in subsequent iterations. Similarly, until the end of the number of iterations, the operation of search and updating the list of Tabu answers and possible answers are updated, and after the end of the 100th iteration of the algorithm, the best answer will be introduced as the optimal answer.


## 3.2. Proposed Model Assumption

Although patrol officers are needed throughout the day, the number of officers required varies at different times of the day. The objective of the proposed scheduling model is to meet the hourly needs of officers and to evaluate alternative plans in the event of a change in rest policy. Other constraints considered for the model are as follows:(1)
This model must be able to create the program in much less than 50 minutes, and the scheduling was carried out manually.(2)
A day is divided into 12 parts, the first shift starts from the beginning of the office hours of the station, that is, 7 am.(3)
The start time of the shift for the officers who begin their working day (they are not in the guard shift) must not be earlier than 7 am and the shift time for the rest of the employees, depending on the maximum and minimum hours of presence in the barracks, which is received from the user to make the model flexible is variable.(4)
The start time of the shift for the conscript personnel (noncadre soldiers), due to the 24-hour service, can start from any hour.(5)
At least one of the cadre employees must be on guard rest every day.(6)
Obviously, the holidays in each month will be rotating. Officers who have been on a 24-hour shift at the station will either be off the next day or their shift hours will be greatly reduced and will go on guard rest two days after the guard.


## 3.3. Model Notation

The symbols used in the model relationships are as follows:(i)
IndexN: a time set. A day and night are divided into 12 parts N=1,2,….,12.C: a set of conscript employees C=1.2…,15.i: the index of the ith person, i∈Cj: the jth time to start the shift, j∈Nk: the kth time interval, k∈N(ii)
VariablesYij: it has two modes 0 and 1. If Yij  = 1, the jth shift is for the ith person.xijk: the number of officers in the ith category in the kth time interval from the jth shift given by the user.(iii)
ParametersB: very large number for ease of modelingP: length of pause, P=0,2,4,6,8,10dK: requirements of officers for the kth time intervall: the lower limit of the number of employees per moment of the day (login by user)u: the upper limit of the number of employees per moment of the day (login by user)(iv)
ObjectiveThe objective function defined for the model is as follows:(1)Minimizez=∑i∈C∑j∈N∑k∈Nxijk.(v)
Constraint(2)∑i∈C∑j∈Nxijk≥dk,(3)∑i∈C∑j∈Nxijk≤BYij,(4)Yij=1,xijk=xijk+1=xijk+2+p=xijk+3+p0,OW,(5)j=k,∀i∈C,∀j∈N,∀k∈N,l≤∑j∈C∑k∈Cxijk≤u,(6)xijk≥0&xijk∈I∀i∈C,∀j∈N.The purpose of the objective function of equation (1) is to minimize the duration of activity and the presence of all officers. Equation (2) ensures that hourly needs are met at any time interval. Equations (3) and (4) determine how many officers need to be present at each time interval. When the first half of the shift is determined, the second half of the shift is determined by the length of the pause (P). The constraint of equation (5) ensures that the number of members of shifts is approximately equal to that of the declared persons, and by using equation (6), the non-negativity and integrity of the variables are guaranteed.


## 3.4. Solution Approach: Tabu Search Algorithm

In this way, the steps of implementing the Tabu search algorithm are as follows:(i)
Adjusting the Parameters. The simple structure of the Tabu search algorithm requires special adjustments when solving an optimization problem. One of these adjustments is to encode the solutions. The code must be designed to have good efficiency and also be implementable. Another adjustment is to define the neighborhood structure. The neighborhood structure determines how the neighbors are obtained and their number for each solution. Another important parameter of this algorithm is how to design a Tabu list.(ii)
Forming an Initial Solution. In many cases, the initial solution is chosen randomly. But in many complex problems, generating an initial solution by chance is not easy, and steps are introduced to generate an initial solution.(iii)
Calculating the value of the objective function.(iv)
Neighborhood search and finding the best neighbor.(v)
Evaluation of Tabu Movement. After selecting the best neighbor, it is compared with the Tabu list. If it is on the Tabu list, it goes to step 6; otherwise, it goes to step 7.(vi)
Aspiration Criterion. When searching, it is possible that a movement is Tabu but doing so has a high effect on improving the performance of the algorithm. For this reason, the Tabu search uses a criterion called the aspiration criterion to get rid of constraints. This criterion is such that the Tabu movement that leads to a point that is better than all the points achieved so far is not considered. In this way, the Tabu movement is compared with the aspiration criterion, and if the aspiration criterion is met, the movement is performed; otherwise, it is returned to step 4.(vii)
Making the Movement. It is moved from the current solution to the new solution and the new solution is considered as the current solution.(viii)
Updating the Best Answer. In each step, the best solution is stored. Initially, the first solution is considered the best answer, and whenever a movement is made, the new solution is compared to the best available solution. If the new solution is better, the new solution is stored as the best solution; otherwise, the best solution will not change.(ix)
Stopping Condition. This condition determines the end of the algorithm. For example, the number of rounds can be a constraint to the stopping condition. After each round, the stopping condition is checked, and if the condition is met, then the algorithm terminates. Otherwise, the Tabu list will be updated and the steps will be repeated.The flowchart for the Tabu search algorithm is shown in Figure1.Figure 1
Flowchart for the Tabu search algorithm.The optimization method of the present research is that first the number of necessary employees in each of the hours of the day and night is determined and the hours that each of the 23 serving employees can be present at the station are determined and given to the program. Naturally, changes in presence hours can be applied and optimal results can be achieved. Finally, the output of the program is the hours of presence of each employee during 24 hours at the station. Obviously, service hours for conscripts are considered 24 hours. Also, the service hours for the cadre employees are 10 hours.The proposed model is flexibly defined. In this way, by changing the presence hours of the person at the station and also the number of required employees in each hour of the day and night, a new scheduling will be provided using the Tabu search algorithm.


## 4. Results

In this section, first, the items used in each scenario are discussed and then the results related to that scenario are provided.


### 4.1. Scenario 1

In this scenario, the number of employees required for the station from 18 to 6 am is 7 people, 12 from 7 to 8 am, 14 at 8 am, and 15 people from 9 am to 17. The number of iterations is considered 100. Table1 lists the number of employees required to be present at the station in 24 hours and Table 2 lists the day and the hours of presence of each employee and the minimum and maximum hours of their presence at the station, respectively.Table 1
Station requirement during 24 hours a day.
HourRequired staff17273747576771281491510151115121513151415151516151715187197207217227237247Table 2
Minimum and maximum hours of presence of employees at the station.
Type of workforce at the stationMaximumoperatinghoursMinimumoperatinghoursAvailabilityOfficer886–16Officer2480–6, 18–24Officer8812–24Officer2480–24Officer8812–24Officer2480–24Officer886–18Officer2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier880–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier880–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier1280–24Soldier1280–24As mentioned earlier, all working hours are 24 hours for all conscript personnel under the Armed Employees Act, and personnel on a 24-hour shift are considered to be on duty for the next 24 hours. Table2 lists the availability to apply unpredictable hourly leave by changing the last column, the available hours of the employee. Figure 2 shows the convergence process of the algorithm for the first scenario. As can be seen, this convergence process is repeated up to 100 times.Figure 2
Convergence process of the Tabu search algorithm for the first scenario.As can be seen, the implemented algorithm has reached convergence in approximately the 10th iteration. Figure3 also shows the graph of the dispersion of shifts, the upper part of the graph is about the minimum hours required to be filled by the station employees (both officers and conscripts), and the lower part of the graph is about the minimum hours of each shift.Figure 3
Graph of the number of shift hours and total hours to be filled.Also, as mentioned in Table3, the number of required stations in each hour of the day and night at the station is specified. Therefore, one of the features of the algorithm used in the research should be that in each hour of the day and night, the number of employees to whom shift is assigned is exactly the same number required in Table 3. Figure 4 shows the graph of the number of employees required and the number of scheduled employees simultaneously in a graph.Table 3
Station requirement during 24 hours a day.
HourRequired staff18283848586871381591610161116121613161416151616161716188198208218228238248Figure 4
Number of employees required and scheduled in each hour of the day and night.In the graph above, the blue graph shows the number of employees required and the red graph indicates the number of scheduled employees. Also, the horizontal graph shows the hour of the day and night and the vertical graph shows the number of employees at the same hour. As can be seen, the number of scheduled employees at all hours of the day and night is exactly equal to the number of employees required by the station. Therefore, according to this figure, we can say in the first scenario, in terms of quantitative employee scheduling, the performance of the proposed algorithm has been very good. In Figure5, the shifts of each employee are assigned to them. What is clear is that the employees, against which there was no blue row, are resting on this particular day. Naturally, employees to whom shifts are assigned throughout the day can have a 24-hour rest on the next day.Figure 5
Graph of shifts related to each of the station staff.The graph above shows the horizontal axis of the day and night and the vertical graph shows each employee. As mentioned in the previous sections, the number of conscript employees (soldiers) shown in the graph above is 13 and the number of officers or cadre officers is 8. Another assumption that has been applied in this section is that at any time of the day and night, at least 2 cadre employees must be present as commanders of the conscript employees at the station. It can also be seen in Figure5 that at least 5 employees, including one officer and 4 conscripts, are always on guard rest. Also, 5 conscripts can go on hourly leave (leave after office hours). Therefore, a total of 5 conscripts are always present at the station during nonoffice hours.


### 4.2. Scenario 2

In this scenario, the number of required employees at any hour of the day and night is increased by 1 person and the proposed method is reimplemented and the results will be evaluated. The number of employees required by the station during 24 hours a day is listed in Table3.Also, the minimum hours of the officer employees being available, which varied between 8 and 12 in the previous scenario, have been increased to at least 10 hours, in order to compensate for the increase in the number of employees at different hours of the day. Table4 lists the different employees and their available hours for 24 hours a day.Table 4
Minimum and maximum hours of presence of employees at the station.
Type of workforce at the stationMaximum operating hoursMinimum operating hoursAvailabilityOfficer1086–16Officer2480–6, 18–24Officer10812–24Officer2480–24Officer10812–24Officer2480–24Officer1086–18Officer2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier1080–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier1080–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24In this scenario, as in the first scenario, first, the convergence process of the algorithm will be examined, as shown in Figure6.Figure 6
Convergence graph of the proposed method for the second scenario.Considering that in the previous scenario, convergence of the algorithm occurred in iterations below 10. In this section, all the graphs studied in the first scenario are exactly generated and evaluated for this scenario. Figure7 shows the graph of the number of shift hours and the total number of hours required.Figure 7
Graph of shift hours and the number of hours required by the station for the presence of employees.Given that in this scenario, the number of employees required by the station increased compared to the first scenario, naturally, the number of hours required by the station for the presence of employees must increase, which is confirmed by the above graph. Another important factor that was examined in the previous scenario is the number of required employees and the number of scheduled employees at any hour of the day and night, which is one of the factors that indicate the efficiency of the algorithm.By examining work shifts in the first scenario, it can be seen that some of the employees are present in the work shift most of the hours of the day and night and are out of the shift in only 1 or 2 hours; the reason for this in this algorithm is observing the same equality of the number of required employees with the number of scheduled employees. Other reasons for this can also be maximizing the resting hours of all employees. Figure8 shows a comparative graph of the number of employees required at any hour of the day and night and the number of employees scheduled by the algorithm at the same hours.Figure 8
Number of employees required and scheduled in 24 hours a day.As can be seen, as in the previous scenario, the number of required and scheduled employees is exactly the same at all hours, and the algorithm has no errors in this case. Figure9 also shows the shifts of each employee over the next 24 hours. As can be seen in the figure, the number of employees who are at rest every day is 5, of which 4 are conscripts and 1 is a cadre. In terms of the number of employees at rest, it is not different from the previous scenario. However, due to the increase in the number of employees required at different hours in order to be present at the station, it can be seen that the average rest hours of the employees in the second scenario are less than the first scenario. This issue and the rest hours of the employees are examined in the last section and the average rest hours of each conscript and cadre are evaluated separately from each other and the efficiency of the algorithm is examined.Figure 9
Shifts of employees in the next 24 hours in the second scenario.


### 4.3. Scenario 3

In this scenario, given that the conscript employees in most organs of the armed employees are sent in turn on long-term leave, the number of available employees is always considered to be 21 people. This means that 2 conscripts are always on leave, and with the same assumption as well as the assumptions of the first scenario for Table5, the number of required employees at any hour of the day and night and the available hours of conscripts go on according to scenario 1. The main difference is in the presence schedule, from which two members of the conscript employees have been removed and are as listed in Table 5.Table 5
Minimum and maximum hours of presence of employees at the station.
Type of workforce at the stationMaximum operating hoursMinimum operating hoursAvailabilityOfficer886–16Officer2480–6, 18–24Officer8812–24Officer2480–24Officer8812–24Officer2480–24Officer886–18Officer2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier1280–24Soldier1280–24The Tabu search algorithm will be examined and its steps will be described as follows: in the first and second scenarios, the convergence process for the objective function of the Tabu search algorithm is first examined, as shown in Figure10.Figure 10
Convergence process of the Tabu search process in the third scenario.As can be seen in Figure10, the convergence graph of the algorithm’s objective function has reached convergence in the 11th iteration. According to the convergence trends in the three scenarios under study, it can be said that the Tabu search algorithm has a strong performance and good speed in converging the objective function defined for the present study. In Figure 11, the graphs of the minimum hours required to be present at the station as well as the hours of shifts are shown.Figure 11
Graph of the number of shift hours and the minimum hours required to be present at the station.As shown in Figure11, the number of hours required by the employees has increased compared to the first scenario due to the reduction of 2 employees (considering leave for 2 conscripts), despite the fact that the number of employees required at different hours of the day has not changed compared to the employees of the first scenario. The graph of the number of required employees and the number of scheduled employees is also shown in Figure 12.Figure 12
Number of employees required and number of scheduled employees in the third scenario.As in the previous two scenarios, in this section, scheduling is performed as the same number of required employees. Figure13 also shows the shifts assigned to each employee during 24 hours.Figure 13
Shifts assigned to each employee during 24 hours.As can be seen in the work shift graph of the employees in the third scenario, unlike the previous two scenarios, the total number of employees resting for one day has been reduced to 4, of which 3 are conscripts and one is an officer. It is also clear in the above graph, and it was mentioned earlier in the optimization conditions that at least two officers must be present at the station at all hours of the day and night, which is also observed in the above graph. Among these two people, in this case, one person goes to the guard rest the next day and one person only works during office hours and his guard rest is reserved.


### 4.4. Computation Rest Time

In this section, the proposed method for scheduling rest shifts was implemented. As mentioned in previous sections, the proposed method is based on the Tabu search algorithm. In this optimization, the main goal is to maximize the rest hours of the employees due to the constraint of manual scheduling. In this regard, to evaluate the proposed method, three scenarios were defined by changing the various components, and the average rest hours of the conscripts and officers in each of the scenarios will be examined. Table6 lists the average rest hours.Table 6
The average rest hours of each employee in a day and night.
ScenarioAverage rest of officerAverage rest of conscriptFirst14.6 hours13.2 hoursSecond11.75 hours12.06 hoursThird14 hours11.46 hoursAs can be seen in Table6, the maximum rest time for officer and conscript employees occurred in the first scenario, but taking into account the long-term leave of two conscript employees in the third scenario and the rest time of officer in this scenario, which is about 35 minutes less than in the first scenario, it can be said that the optimal scenario in this research for the station is the third scenario, where two employees are always on long-term leave, which can be added to the rest time of the employees. Then, in the fifth section, the general conclusion of the research and suggestions for improving the work will be discussed.


## 4.1. Scenario 1

In this scenario, the number of employees required for the station from 18 to 6 am is 7 people, 12 from 7 to 8 am, 14 at 8 am, and 15 people from 9 am to 17. The number of iterations is considered 100. Table1 lists the number of employees required to be present at the station in 24 hours and Table 2 lists the day and the hours of presence of each employee and the minimum and maximum hours of their presence at the station, respectively.Table 1
Station requirement during 24 hours a day.
HourRequired staff17273747576771281491510151115121513151415151516151715187197207217227237247Table 2
Minimum and maximum hours of presence of employees at the station.
Type of workforce at the stationMaximumoperatinghoursMinimumoperatinghoursAvailabilityOfficer886–16Officer2480–6, 18–24Officer8812–24Officer2480–24Officer8812–24Officer2480–24Officer886–18Officer2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier880–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier880–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier1280–24Soldier1280–24As mentioned earlier, all working hours are 24 hours for all conscript personnel under the Armed Employees Act, and personnel on a 24-hour shift are considered to be on duty for the next 24 hours. Table2 lists the availability to apply unpredictable hourly leave by changing the last column, the available hours of the employee. Figure 2 shows the convergence process of the algorithm for the first scenario. As can be seen, this convergence process is repeated up to 100 times.Figure 2
Convergence process of the Tabu search algorithm for the first scenario.As can be seen, the implemented algorithm has reached convergence in approximately the 10th iteration. Figure3 also shows the graph of the dispersion of shifts, the upper part of the graph is about the minimum hours required to be filled by the station employees (both officers and conscripts), and the lower part of the graph is about the minimum hours of each shift.Figure 3
Graph of the number of shift hours and total hours to be filled.Also, as mentioned in Table3, the number of required stations in each hour of the day and night at the station is specified. Therefore, one of the features of the algorithm used in the research should be that in each hour of the day and night, the number of employees to whom shift is assigned is exactly the same number required in Table 3. Figure 4 shows the graph of the number of employees required and the number of scheduled employees simultaneously in a graph.Table 3
Station requirement during 24 hours a day.
HourRequired staff18283848586871381591610161116121613161416151616161716188198208218228238248Figure 4
Number of employees required and scheduled in each hour of the day and night.In the graph above, the blue graph shows the number of employees required and the red graph indicates the number of scheduled employees. Also, the horizontal graph shows the hour of the day and night and the vertical graph shows the number of employees at the same hour. As can be seen, the number of scheduled employees at all hours of the day and night is exactly equal to the number of employees required by the station. Therefore, according to this figure, we can say in the first scenario, in terms of quantitative employee scheduling, the performance of the proposed algorithm has been very good. In Figure5, the shifts of each employee are assigned to them. What is clear is that the employees, against which there was no blue row, are resting on this particular day. Naturally, employees to whom shifts are assigned throughout the day can have a 24-hour rest on the next day.Figure 5
Graph of shifts related to each of the station staff.The graph above shows the horizontal axis of the day and night and the vertical graph shows each employee. As mentioned in the previous sections, the number of conscript employees (soldiers) shown in the graph above is 13 and the number of officers or cadre officers is 8. Another assumption that has been applied in this section is that at any time of the day and night, at least 2 cadre employees must be present as commanders of the conscript employees at the station. It can also be seen in Figure5 that at least 5 employees, including one officer and 4 conscripts, are always on guard rest. Also, 5 conscripts can go on hourly leave (leave after office hours). Therefore, a total of 5 conscripts are always present at the station during nonoffice hours.


## 4.2. Scenario 2

In this scenario, the number of required employees at any hour of the day and night is increased by 1 person and the proposed method is reimplemented and the results will be evaluated. The number of employees required by the station during 24 hours a day is listed in Table3.Also, the minimum hours of the officer employees being available, which varied between 8 and 12 in the previous scenario, have been increased to at least 10 hours, in order to compensate for the increase in the number of employees at different hours of the day. Table4 lists the different employees and their available hours for 24 hours a day.Table 4
Minimum and maximum hours of presence of employees at the station.
Type of workforce at the stationMaximum operating hoursMinimum operating hoursAvailabilityOfficer1086–16Officer2480–6, 18–24Officer10812–24Officer2480–24Officer10812–24Officer2480–24Officer1086–18Officer2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier1080–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier1080–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24In this scenario, as in the first scenario, first, the convergence process of the algorithm will be examined, as shown in Figure6.Figure 6
Convergence graph of the proposed method for the second scenario.Considering that in the previous scenario, convergence of the algorithm occurred in iterations below 10. In this section, all the graphs studied in the first scenario are exactly generated and evaluated for this scenario. Figure7 shows the graph of the number of shift hours and the total number of hours required.Figure 7
Graph of shift hours and the number of hours required by the station for the presence of employees.Given that in this scenario, the number of employees required by the station increased compared to the first scenario, naturally, the number of hours required by the station for the presence of employees must increase, which is confirmed by the above graph. Another important factor that was examined in the previous scenario is the number of required employees and the number of scheduled employees at any hour of the day and night, which is one of the factors that indicate the efficiency of the algorithm.By examining work shifts in the first scenario, it can be seen that some of the employees are present in the work shift most of the hours of the day and night and are out of the shift in only 1 or 2 hours; the reason for this in this algorithm is observing the same equality of the number of required employees with the number of scheduled employees. Other reasons for this can also be maximizing the resting hours of all employees. Figure8 shows a comparative graph of the number of employees required at any hour of the day and night and the number of employees scheduled by the algorithm at the same hours.Figure 8
Number of employees required and scheduled in 24 hours a day.As can be seen, as in the previous scenario, the number of required and scheduled employees is exactly the same at all hours, and the algorithm has no errors in this case. Figure9 also shows the shifts of each employee over the next 24 hours. As can be seen in the figure, the number of employees who are at rest every day is 5, of which 4 are conscripts and 1 is a cadre. In terms of the number of employees at rest, it is not different from the previous scenario. However, due to the increase in the number of employees required at different hours in order to be present at the station, it can be seen that the average rest hours of the employees in the second scenario are less than the first scenario. This issue and the rest hours of the employees are examined in the last section and the average rest hours of each conscript and cadre are evaluated separately from each other and the efficiency of the algorithm is examined.Figure 9
Shifts of employees in the next 24 hours in the second scenario.


## 4.3. Scenario 3

In this scenario, given that the conscript employees in most organs of the armed employees are sent in turn on long-term leave, the number of available employees is always considered to be 21 people. This means that 2 conscripts are always on leave, and with the same assumption as well as the assumptions of the first scenario for Table5, the number of required employees at any hour of the day and night and the available hours of conscripts go on according to scenario 1. The main difference is in the presence schedule, from which two members of the conscript employees have been removed and are as listed in Table 5.Table 5
Minimum and maximum hours of presence of employees at the station.
Type of workforce at the stationMaximum operating hoursMinimum operating hoursAvailabilityOfficer886–16Officer2480–6, 18–24Officer8812–24Officer2480–24Officer8812–24Officer2480–24Officer886–18Officer2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier2480–24Soldier1280–24Soldier1280–24The Tabu search algorithm will be examined and its steps will be described as follows: in the first and second scenarios, the convergence process for the objective function of the Tabu search algorithm is first examined, as shown in Figure10.Figure 10
Convergence process of the Tabu search process in the third scenario.As can be seen in Figure10, the convergence graph of the algorithm’s objective function has reached convergence in the 11th iteration. According to the convergence trends in the three scenarios under study, it can be said that the Tabu search algorithm has a strong performance and good speed in converging the objective function defined for the present study. In Figure 11, the graphs of the minimum hours required to be present at the station as well as the hours of shifts are shown.Figure 11
Graph of the number of shift hours and the minimum hours required to be present at the station.As shown in Figure11, the number of hours required by the employees has increased compared to the first scenario due to the reduction of 2 employees (considering leave for 2 conscripts), despite the fact that the number of employees required at different hours of the day has not changed compared to the employees of the first scenario. The graph of the number of required employees and the number of scheduled employees is also shown in Figure 12.Figure 12
Number of employees required and number of scheduled employees in the third scenario.As in the previous two scenarios, in this section, scheduling is performed as the same number of required employees. Figure13 also shows the shifts assigned to each employee during 24 hours.Figure 13
Shifts assigned to each employee during 24 hours.As can be seen in the work shift graph of the employees in the third scenario, unlike the previous two scenarios, the total number of employees resting for one day has been reduced to 4, of which 3 are conscripts and one is an officer. It is also clear in the above graph, and it was mentioned earlier in the optimization conditions that at least two officers must be present at the station at all hours of the day and night, which is also observed in the above graph. Among these two people, in this case, one person goes to the guard rest the next day and one person only works during office hours and his guard rest is reserved.


## 4.4. Computation Rest Time

In this section, the proposed method for scheduling rest shifts was implemented. As mentioned in previous sections, the proposed method is based on the Tabu search algorithm. In this optimization, the main goal is to maximize the rest hours of the employees due to the constraint of manual scheduling. In this regard, to evaluate the proposed method, three scenarios were defined by changing the various components, and the average rest hours of the conscripts and officers in each of the scenarios will be examined. Table6 lists the average rest hours.Table 6
The average rest hours of each employee in a day and night.
ScenarioAverage rest of officerAverage rest of conscriptFirst14.6 hours13.2 hoursSecond11.75 hours12.06 hoursThird14 hours11.46 hoursAs can be seen in Table6, the maximum rest time for officer and conscript employees occurred in the first scenario, but taking into account the long-term leave of two conscript employees in the third scenario and the rest time of officer in this scenario, which is about 35 minutes less than in the first scenario, it can be said that the optimal scenario in this research for the station is the third scenario, where two employees are always on long-term leave, which can be added to the rest time of the employees. Then, in the fifth section, the general conclusion of the research and suggestions for improving the work will be discussed.


## 5. Conclusion

Planning and scheduling in every aspect are a time-saving revolution that has wide applications in manufacturing and service environments. Scheduling is the allocation of resources to perform a set of tasks over a specified period of time. Finding an optimal scheduling in work environments due to constraints and performance indicators can be very easy or very difficult. Scheduling has a great impact on increasing efficiency and achieving goals, so that effective scheduling will improve the performance criteria of the production line such as line output, production costs, percentage of using bottleneck station, and customer satisfaction. One of the most important issues in scheduling is the allocation of manpower along the scheduling horizon. One of the factors that reduces the efficiency of scheduling models developed for production environments is not considering manpower during the process of scheduling the tasks. Organizing manpower in a system requires a coherent planning taking into account the conditions of the parties to achieve the best productivity. Manpower scheduling means assigning a work pattern (day shift) according to the wants and needs of the system and the workforce with the aim of minimum cost. Many production and service systems require multishift scheduling. This problem is generally NP-hard and solving it through usual ways takes a long time. Today, several heuristic methods have been proposed to solve such problems. In this research, due to the high importance of these issues, the problem of scheduling and allocation of manpower in a real place, namely, Qazvin road police, has been solved. The metaheuristic Tabu search algorithm is used to minimize the duration of activity and the presence of all officers. Therefore, the main advantages of the study are as follows: (i) providing a multiobjective planning model considering the cost objectives of manpower, installation, and maintenance of cameras and fuel and (ii) implementation using the real information and data of the traffic police of Qazvin province in Iran. For this purpose, in order to achieve the objectives of the research, three different scenarios related to the required manpower and the minimum-maximum presence of officers have been used according to whether they are on leave or not. Accordingly, in the first scenario, the number of employees required for the station from 18 to 6 am is 7 people, 12 from 7 to 8 am, 14 at 8 am, and 15 people from 9 am to 17. In the second scenario, the number of required employees at any hour of the day is increased by 1 person, and in the third scenario, given that the conscript employees in most organs of the armed forces is sent in turn to long-term leave, we always considered the number of available employees to be 21. The results show that unlike the first and second scenarios, in the third scenario, the total number of employees resting for one day has been reduced to 4, of which 3 are conscripts and one is an officer. It was also observed that the maximum rest time for the officer and conscript occurred in the first scenario, but considering the long-term leave of the two conscripts in the third scenario and the officer rest time in this scenario, which is 35 minutes less than the first scenario, it can be said that the third scenario is the most optimal scenario in this research that two of the employees are always on long leave, which can be added to the rest time of the employees. The main limitation is that the researcher can have time management problems and struggle with finishing the research on time due to bad organization. In order to avoid time management problems, the researcher will prepare a schedule with deadlines for every section of the work, so he can monitor his progress and know if he is working as planned. For further research, it is suggested that parameters of uncertainty be considered in model development and that the problem be remodeled with appropriate approaches such as robust planning.



---

*Source: 5223535-2022-06-28.xml*