# Optimal Allocation of Human Resources Recommendation Based on Improved Particle Swarm Optimization Algorithm

Authors: Jintong Wei
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

People are the most dynamic factor of productivity, and human resource allocation is both the starting point and the end point of human resource management. In modern enterprises, human resource optimization is the scientific and rational allocation of human resources within the enterprise through certain means and methods. The basic concept of particle swarm optimization (PSO) originates from the study of bird predation. It is an evolutionary computation technique based on the swarm intelligence method, which is similar to genetic algorithms and is a population-based optimization tool. This paper is inspired by the ant colony algorithm and introduces the ant colony pheromone and variation algorithm model into the PSO algorithm for further optimization. The application of this improved particle swarm optimization algorithm to the optimal allocation of human resources recommendations is demonstrated by a real case study.


---

## Body

## 1. Introduction

From the point of view of business economics, human resource allocation refers to the total amount of labor actually invested and occupied by each department within an enterprise under the combined effect of multiple factors [1]. In any society, social activities must be allocated in proportion to the prevailing production conditions. According to this economic principle, labor activities can also be classified according to the nature of the work of the employees in an enterprise: (1) craft labor, i.e., labor activities that directly change the object of labor; (2) auxiliary labor, i.e., labor activities performed to ensure the normal performance of craft labor; (3) technical and managerial labor, i.e., labor engaged in product design, research and development, organization, operation, statistics, measurement, inspection, information, and other (3) technical and managerial labor, i.e., activities that are mainly mental labor. The above three types of labor of different nature lay the foundation for the development of production and operation activities of enterprises. Therefore, the improvement of the efficiency of human resources allocation should be optimized from multiple angles and factors, which is not only reflected in the space and time of human resources but also in the quantity and quality structure of talents, and the relationship between various types of talents in the enterprise should be handled properly and adjusted within a reasonable range, so as to finally realize the scientific layout of the enterprise talent structure [2].Human resource optimization is through the recruitment, appointment, assessment, deployment of personnel, and other continuous optimization and improvement, to carry out a reasonable allocation of employees and positions and to achieve the purpose of the best use of people. In the final analysis, human resource optimization is to place the right people in the right positions to maximize the value of human resources [3].Human resource allocation is the efficient integration of physical resources and human resources by using some of people’s own abilities, such as physical strength, intelligence, and skills, to create greater value. Efficient human resource allocation is the core factor for enterprises to maintain a strong vitality, which not only makes the internal human resource structure more scientific and optimal but also is an important embodiment of the best use of human talent, human potential is brought into play, and the business objectives of the enterprise can be achieved [4]. The following is a brief description of the importance of the optimal allocation of human resources from four aspects [5]. (1) In the work of human resources management, human resources optimization is the core element of which, talent is the root of the enterprise, is the soul of enterprise development. How to retain existing talents and attract foreign talents, so that people can make the most of their talents and responsibilities, this is, the development of enterprises must pay attention to the subject, through the optimal allocation of human resources, and constantly improve the economic efficiency of enterprises and constantly improve the level of production and operation of enterprises. Times are changing, technology is advancing, the development of enterprises should also be viewed with a dynamic vision of development, and constantly optimize the allocation of human resources to ensure the efficient operation of enterprises and long-term development. (2) The optimal allocation of human resources can not only ensure the realization of organizational goals but also an important way to motivate and inspire employees, while mobilizing the enthusiasm of the staff, the economic benefits of the enterprise has been improved, the staff's self-worth has also been reflected, the staff’s motivation, the economic benefits of the enterprise to a higher level. (3) The optimal allocation of human resources is involved in the entire production and operation of the enterprise, always throughout the beginning and end of human resources management work, to improve the efficiency of the enterprise organization, and to ensure a high degree of staff and job matching. Enterprise human resources configuration is the necessary content of the development of human resources themselves, will also have a certain impact on other economic resources of the enterprise, and low human resources configuration will directly affect the business development of the enterprise. On the contrary, enterprises have a higher efficiency of human resources allocation, the work of human resources management can be carried out in an orderly and healthy manner, and the work of the enterprise will be more efficient. (4) The optimal allocation of human resources can create a good atmosphere for the work of the enterprise and constantly improve the core competitiveness of the enterprise. In the development of enterprises, talent is the first productive force and a necessary factor to improve the development ability of enterprises, so human resources are optimally configured to help enterprises improve their competitiveness. Through assessment and selection, talents are given suitable jobs, which not only can stimulate their enthusiasm and maximize their ability but also can create a positive working atmosphere, and the future development of the enterprise will be better and better.In modern enterprises, human resource optimization is to allocate human resources in a scientific and rational way through certain means and methods, so that they can be used rationally to the maximum extent and improve the efficiency of the enterprise. Its core elements include the organization, the design of the staff structure, and the training of internal staff, etc. Its main tasks include recruitment, reward system development and implementation, training, and compensation, etc. In general, there are three common approaches to HR optimization: competency-based, dynamic adjustment, and strengths-based. Using these three approaches, HR optimization controls the core system of modern enterprise management and has an irreplaceable position and value in the development of the enterprise [6]. At the present stage, with the continuous progress of society, the market competition environment of enterprises is becoming more and more intense, and modern enterprise management theories are constantly sublimated [7]. Scientific human resource allocation can effectively reduce the management costs of enterprises, fully mobilize the enthusiasm and creativity of employees, and help enterprises improve their management efficiency and create greater market profitability.Optimization of the organizational structure of the enterprise, that is, the enterprise with its own business situation, the rational allocation of resources and arrangements [8]. The unreasonable and unscientific organizational structure of the enterprise will directly affect the production and operation results of the enterprise in order to play the role of the least allocation of resources, and the enterprise operation results are not very satisfactory [9]. In the case of enterprises operating in the linear-functional model, for example, the organizational model lacks mechanisms related to the training of talents, and therefore lacks the talents, processes, and corresponding organizational structures to support projects, which leads to the phenomenon that the efficiency of projects that management is concerned about is high, while the efficiency of projects that are not concerned about is reduced, and when operating in multiple projects, the linear-functional model will directly affect the achievement of strategic business goals of the enterprise The organizational performance will be greatly reduced [10]. In addition, the organizational structure of the enterprise is unreasonable, the internal resources of the enterprise are not effectively used, the resources are idle, the personnel are at a loss, and once the external environment changes, they cannot make timely responses, the coordination between various departments is poor, and the employees are negligent, which in the long run is not conducive to the realization of strategic business objectives [11].Any organization is a system, a specific position needs to be configured what kind of people, according to the overall optimum of the system to design, rather than just choose the best employees in the same position. This means that in the selection of personnel, there should be a good identification, selection process, selected with the appropriate skills, knowledge and experience, but also to achieve the needs of the organizational system optimization. However, in the actual operation of staffing, due to the lack of scientific and feasible methods, often fail to achieve the desired results. For this reason. By exploring and analyzing the optimal allocation of human resources, a mathematical model of optimal allocation of human resources is established, which better realizes the need for system optimization in optimal allocation of human resources.In fact, in the enterprise human resource management configuration, it is often encountered that some jobs are unoccupied, while some employees have no positions. Since the conditions of each employee are different, the efficiency of completing the task is also different. The purpose of optimal allocation is to make the enterprise achieve the best overall efficiency with the least consumption of total resources as much as possible. To put it simply, each employee in the enterprise has a position, each position is occupied, each employee can be competent in their own position, and the enterprise consumes the least amount of resources. Especially in large enterprises, it is difficult to achieve the optimal effect of artificial allocation in the case of more employees and positions. It was found that this problem can be converted into a problem of maximum and optimal matching of dichotomous graphs, and then the Hungarian algorithm can be used to solve the best result, and the solution process can be easily implemented on the computer [12]. In this way, companies can use information management systems to solve the problem of optimal human resource allocation well within a very short period of time [13].Particle swarm optimization (PSO) was proposed by Kennedy and Eberhart in 1995 [14, 15]. It is a population-based evolutionary algorithm that simulates the behavior of a flock of birds flying for food and makes the flock optimal through collective collaboration among birds. The advantages of PSO are the simplicity of the algorithm, easy implementation, fast convergence, and not many parameters to be adjusted. This algorithm has been widely used in function optimization, neural network training, pattern classification, fuzzy system control, and other applications [16, 17]. Based on the characteristics of the mathematical model for optimal allocation of human resources, an improved particle swarm optimization algorithm is designed to solve this problem by embedding the idea of genetic algorithm into the particle swarm optimization algorithm, and the numerical simulation results show the effectiveness of the algorithm [18].


## 2. General Application of Particle Swarm Algorithm

The basic concept of particle swarm optimization (PSO) originates from the study of bird flock predation behavior. It is an evolutionary computation technique based on the Swarm Intelligence approach. PSO is similar to genetic algorithms and is a population-based optimization tool. The system is initialized as a set of random solutions and the optimal values are searched by iterations [19]. But instead of crossover and variation operations used by genetic algorithms, the particles (potential solutions) are searched in the solution space following the optimal one. Compared to genetic algorithms, PSO has the advantage of being simple and easy to implement while having a deep intelligent background, which is suitable for both scientific research and especially for engineering applications [20]. Therefore, once PSO was proposed, it immediately attracted a lot of attention from scholars in the field of evolutionary computation and other fields [21], and a large number of research results appeared in just a few years, forming a research hotspot [22].Imagine a scenario in which a flock of birds is searching for food at random. There is only one piece of food in the area. None of the birds know where the food is. But they know how far their current location is from the food. So what is the optimal strategy to find the food. PSO takes inspiration from this model and uses it to solve optimization problems [23]. All particles have an adaptation value determined by the function being optimized, and each particle has a velocity that determines the direction and distance they fly. The particles then follow the current optimal particle and search the solution space [24]. The PSO is initialized as a group of random particles (random solutions), and the optimal solution is found by iteration [25]. In each iteration, the particles update themselves by tracking two “extreme values” [26]. The first one is the optimal solution found by the particle itself, and this solution is called the individual extreme value. The other extreme value is the optimal solution currently found by the whole population, and this extreme value is the global extreme value. Alternatively, instead of using the whole population, only some of them can be used as neighbors of the particle, then the extreme value among all neighbors is the local extreme value [27]. Let PSO be initialized as a group of random particles (random solutions), and in each iteration, the particles update themselves by tracking two “extremes.”The first one is the best solution found by the particle itself, which is called the individual extremum (denoted by pbest), another extremum in the global version of PSO is the best solution found by the whole population so far, which is called the global extremum (denoted by gbest), while the local version of PSO does not use the whole population but a part of it as the neighbors of the particle, and the best solution among all the neighbors is the local extremum (denoted by lbest). The steps of the traditional particle swarm algorithm are as follows: 1 Initialization: the positionX of the initial search point and its velocity V are usually generated randomly within the allowed range. The particle number of this optimal value is recorded and set to the current position of this optimal particle. If it is better than the current individual extreme value of the particle, it will be set as the position of the particle and the individual extreme value will be updated. If the best individual polar value of all particles is better than the current global polar value, it is set to the position of the particle, the serial number of the particle is recorded, and the global polar value is updated. 3. Update of particles: the velocity and position of each particle are updated using the above formula. 4 Check if the end condition is met. If the current iteration number reaches the predefined maximum number (or reaches the minimum error requirement), then stop the iteration and output the optimal solution, otherwise go to step 2. See Figure 1.Figure 1
Algorithmic flow of the basic particle swarm algorithm.In realistic human resource optimization, the selection and configuration needs to be based on the specifics of the organizational structure and the measurement focus of the job’s competency requirements for the staff. It is usually necessary to consider the ratings of candidates on the multiple competency elements required for the position and the weight distribution of each competency element in different positions.The basis of information particle swarm technology is the network analysis method, which is time based and expresses the engineering planning and engineering control process as a whole, so that people can intuitively understand the intrinsic connection of each subsystem and enhance the organization of work, and its tool is the network plan diagram. The network plan diagram is represented by the set of nodesN and arrows A, which could written as GN,A. It organically forms the work, events, and lines into a whole, effectively reflecting the whole picture of the task. The preparation of network plan generally includes four steps of information compilation, task decomposition, work breakdown preparation, and network diagram drawing. After drawing the network plan diagram, it can clearly express the progress between the tasks in the project and their interrelationship, and on this basis, the analysis and optimization of the network plan can be carried out.The establishment of the HR optimization model is the premise of the information particle analysis method. Based on the demand of human resource optimization, we established the following basic PSO parameter model based on the relationship between supply and demand and resource relationship as the premise, as shown below:There are three general indicators for judging the degree of resource balance, namely, the coefficient of unevenness,K, the extreme deviation, ΔQ, and the mean square deviation, σ2. These are shown in equations (1)–(3).(1)K=QmaxQm.In this case,Qmax and Qm represent the maximum and average values of resource requirements per unit time, respectively. It can be seen that the smaller the inhomogeneity coefficient K is, the better the balance of resource requirements is.(2)ΔQ=maxQi−Qm,where Qi denotes the resource requirement at the ith time period. It can be seen that the smaller the extreme difference ΔQ is, the better the balance of resource requirements is.(3)σ2=1T∑i=1TQi−Qm2,where T is the duration of the network plan. It can be seen that the smaller the mean square deviation σ2, the better the balance of resource requirements.In this paper, we use the mean squared deviationσ2 to judge the balance of resource requirements, i.e., the dispersion of resource consumption per unit time from the horizontal line y=Qm to measure the merit of a scheduling solution. The ideal situation is that the resource dynamic curve converges to a rectangular distribution, i.e., a rectangle with Qm as the height and a specified duration T as the length. The model for human resource balance optimization is shown in(4)minE=1T∫0TRt−Rm2dt=1T∫0TR2tdt−Rm2,(5)Rt=∑i,jRi,jti,j∈W,(6)Ri,jt=Ri,j0,tAi,j≤t≤tAi,j+di,j,0,Else.(7)tAk,i+dk,i≤tAi,jk,i∈Fi,j,(8)tESi,j≤tAi,j≤tLSi,j.In equation (4)–(8), minE is the minimum energy consumption; T is the total duration of the task, which is a fixed value; Rt is the sum of resource consumption of all jobs at time unit time t; Rm is the average of resource intensity distribution of current network plan; Ri,jt is the resource intensity of job i,j at time t; tESi,j is the earliest start time of job i,j; tLSi,j is the latest start time of job i,j; tAi,j is the actual start time of job i,j; di,j is the duration of job i,j; and Fi,j is the set of all the immediately preceding jobs of job i,j.The essence of the resource equilibrium problem is to use the total time difference and the free time difference to rearrange the start time of each job to stagger the peak and trough periods of resource utilization so that the mean squared difference of resource requirements is minimized. Therefore, the essence of the model is to seek the optimal combination of the actual start times of all the jobs in the task, so that the objective function is minimized.


## 3. Specific Improved Particle Swarm Optimization Algorithm

The ideal human resource arrangement is to keep the demand for coverage resources constant for each time period. However, due to the unevenness of the operation process, there are often peaks and valleys in the demand for security resources per unit of time. Modern enterprises have more human resources project processes, and if the project plan is not arranged properly, the phenomenon of large ups and downs in the use of human resources can occur. In the peak period of resource use, the maximum human resources demand in certain periods will exceed the limit of human resources in that period, resulting in the work not being carried out normally, and also increasing the load of the security system, affecting the quality of security; in the trough period of resource use, there will be problems such as human resources not being fully utilized, thus affecting the coordinated management of technical security. Therefore, under the regulations of the task duration, some work in the network plan can be reasonably adjusted to make the resources used in a balanced way, so as to reduce the fluctuation of the demand of human resources in the process of use, reduce the difficulty of scheduling management, and improve the utilization rate of resources, which is the optimization problem of “fixed resource balance of duration,” referred to as the resource balance optimization problem.As can be seen from the mathematical model of human resource equilibrium, the activities are subject to logical relationship constraints and time relationship constraints, and the actual start time of the activity is not only limited to the earliest start time and the latest start time range but also influenced by the state of all immediately preceding activities of the activity, which makes the available total time difference subject to certain restrictions.This paper integrates the characteristics of highly hidden constraints in the engineering network plan resource balance optimization problem and proposes a dynamic time-difference-based resource balance optimization method: adding this logical constraint relationship directly to the determination of the time difference range of the activity, considering that the total time difference of the activity is not fixed in a certain range when the activity is constrained by logical and temporal relationship constraints, but with the determination of the actual start time of the immediately preceding activities in the process of engineering. The actual start time of the activity is determined and changes dynamically [28]. Based on this idea, when applying the particle swarm algorithm to the solution, the algorithm is improved accordingly to the particle swarm initialization stage and the evolutionary postprocessing process, which makes the calculation process avoid the generation of nonfeasible solutions. The specific improvement methods are as follows:When there is no tight front activity, actual starting timetA could be in a flexible set, as shown in equation (5).(9)tAi,j∈tESi,j,tLSi,j.When there are immediately preceding activities, let the set of immediately preceding activities of activity bePrea1,a2,…,ak, k be the number of immediately preceding activities of activity i,j, the upper bound of the time difference of activity i,j remains tLSi,j, and the lower bound of the time difference becomes t, and shown in equation (6):(10)t=maxtAi,j+Di|l=1,2,…,k,tESi,j,where Di is the duration of immediately preceding activity al of job i,j. Therefore, the actual starting time for the job i,j becomes tAi,j∈t,tLSi,j.In this way, the actual start time of the subsequent activity must be determined after the actual start time of the immediately preceding activity is determined, and the total range of time differences available for each activity is always in flux. It ensures that the activities satisfy both the logical relationship constraints and the temporal relationship constraints, while avoiding the generation of nonfeasible solutions and ensuring the reasonableness of the results.According to the resource balance optimization principle, the feasible solution space of the target problem can be assumed as anN-dimensional search space of particles, and N represents the number of activities in this problem. All feasible solutions of the objective problem are like discrete points scattered in the space, and the particle corresponds to the scheme, and the coordinates of each dimension of the particle correspond to the actual start time of each activity in the scheme. The particle gradually arrives at the position that is at the best fitness value, which is the best arrangement scheme for the activity, by constantly evolving and changing its position [29].Considering that the total time difference of the activities is dynamic, thus, when performing the initialization of the particle swarm, it cannot be generated randomly on specific range as in the original algorithm, and adjustments must be made [30]. To determine whether there is an activity immediately preceding the activity corresponding to a dimension of each particle, find the spatial coordinates of the particle with the largest actual completion time among all immediately preceding activities of that activity [31].Since the particle population position is not fixed and the spatial coordinates of each particle keep changing, this change makes the particles may be within the feasible space or may jump out of the feasible space and become nonfeasible solutions. Therefore, after each evolution, improvements have to be made to the basic particle swarm algorithm so that the particles can always be within the feasible solution space after each movement. That is, to determine whether there is an activity immediately preceding the activity corresponding to a certain dimension of each particle and to find the maximum actual completion time among all immediately preceding activities of that activity.Through the particle swarm initialization process and particle swarm evolution postprocessing, it is ensured that the position of each particle is always in the feasible solution space and the generated solution always satisfies the target problem, avoiding the generation of nonfeasible solutions. Based on the above analysis, this paper presents an information particle swarm algorithm design based on optimal resource allocation.


### 3.1. Structure and Encoding of Individual Particles

The resource allocation problem is the process of adjusting the start time of each job under the time sequence constraint using the free time difference, so as to obtain a variety of different scheduling schemes and find the one with the smallest mean squared difference of resources among the many schemes. Adjusting the free time difference of the jobs is to delay the start time of the jobs, thus the particle individual can be designed as follows: a particle corresponds to a set of job sequences, and the value of the particle represents the start time of each job within the job sequence.The start time range is calculated.The model constraint, equation (7), shows that the existence of the time difference allows the work start time to fluctuate within a certain range. Since the network plan is constantly adjusted in the process of solving the model, the start time range of the job is also changing, so to determine the start time of a job, we must find out the start time range of the job. Figure 2 shows the flow chart for calculating the start time range of the work immediately before the work after the start time of the work is determined.Figure 2
Flow chart for start-up time range regulations.


### 3.2. Initial Population Generation

The determination of the start time of one job will affect the start time range of other jobs, so when generating different particle swarms to form the initial population, if the start time is determined for each job in its corresponding time range according to the corresponding job order of the particle swarm itself, it will lead to a fixed priority, thus the probability of getting the same total time difference for the jobs in the next order is greatly reduced and the population lacks diversity. In this paper, before generating each particle population, a noncritical job order is randomly generated, and then its start time is randomly determined from its corresponding time range in turn, and after each job’s start time is obtained, the start time ranges of other jobs are redetermined. In this way, the priority of each job is theoretically the same, ensuring a wide diversity of populations. The flow is shown in Figure3. In this way, a particle population corresponds to a feasible solution in equation (4), and the initial population composed of a certain number of particle populations corresponds to a subset of the model solution space.Figure 3
Initial population generation flow chart.


### 3.3. Evaluation Function

The rules of the evaluation function make the adaptation value of the individual with smaller mean variance of resource usage larger, and as the particle swarm evolves, the algorithm eventually finds the resource plan with the smallest variance. Since equation (4) seeks to minimize the objective function, the original objective function is to be converted into an fitness value function to ensure that suitable individuals have large fitness values. This can be achieved by the following conversion process.(11)fx=σmax2−σ2xσmax2−σmin2.In (5), x denotes a particle of the contemporary population; fx denotes the fitness of particle x; σmax2 and σmin2 denote the maximum and minimum values of the contemporary objective function, i.e., the mean variance of resource use; and σ2x denotes the mean variance of resource use corresponding to particle x.


### 3.4. Convergence Conditions

Convergence is an important issue in particle swarm algorithms, which can indicate whether the feasible solution found by such an algorithm is optimal or whether the currently found solution satisfies the accuracy requirement. Here we give a definition of convergence for a particle swarm optimization algorithm [13]. Let the position of a particle in the swarm at time t be xt and P be an arbitrary position in the entire search space, then the particle converges as in (8).(12)limt⟶∞xt=P.This definition suggests that the convergence of a swarm algorithm means that a particle in the swarm eventually stays at a fixed position in the search space. After analyzing the trajectories of the particles, we also find that for all particles in the swarm, they will eventually converge to the position of the global optimal particle.By the definition, it is clear that the historical best fitness value gBest of a particle swarm is a function of the iterative informationt. As t varies, gBest (t) constantly changes and tends to a fixed value as t ⟶ ∞, which is shown in (9):(13)limt⟶∞gBestt+1−gBestt=0.Theoretically, the optimization search process of an algorithm is the process of continuously preserving the historical best fitness values, which has been proved theoretically to be globally convergent, but it takes a considerable amount of time under the current computational power and conditions, which is one of the urgent problems that various intelligent bionic-like algorithms need to solve at present. In practice, an alternative strategy is usually adopted, i.e., preserving the current optimal individual values. In this way, the global optimal solution can be found with probability 1 for all the specified evolutionary generations, which is also the approximate convergence strategy currently adopted by many intelligent affine algorithms. This is done by setting a maximum evolutionary generationG before the program runs, such that the program automatically terminates after running G generations and takes the currently found optimal solution as the global optimal solution.


### 3.5. Algorithm Flow

The flow of PSO is shown in Figure4, where pBest is the individual extreme value.Figure 4
Improved information particle swarm algorithm. Reoptimization is based on ant colony idea and variation idea.In the ant colony algorithm, the pheromone concentration on the ant’s route is analyzed, and the one with higher pheromone concentration is selected as the forward direction according to a certain probability, so as to achieve the goal of finding the optimal solution of the problem. If the global optimal solution of the swarm is close to the local optimal solution during the whole evolution process, the particle may fall into the local optimal and cannot continue to search further in the solution space. Inspired by the ant colony algorithm to introduce the pheromone model for PSO, a local search in the neighborhood of the current local optimal solution (pi) of each particle generates k points ppi, shown in (10) and (11), and record k points generated by local search in the neighborhood of the current local optimal solution of the ith particle.(14)ppij∈ppi1,ppi2,…,ppik,(15)ppij=pi+rdi,where r is the step size and di is the direction.Let the current locally optimal solutionpi of the ith particle be ppik+1. Establish the corresponding probability selection in the PP sequence. In this paper, we construct the probability of each current locally optimal solution for selecting the points in the PP sequence as (12).(16)pij=maxfppij,q≫q0,fppij∑i=1k+1fppij,q<q0.Hereq0 is a given parameter 0≤q0≤1 and the function fx is the fitness of the point x, as shown in (7) above.From the selection probability, it is known that the point with higher fitness in the PP sequence is more likely to be selected as gBest in (9). The PP sequence and the selection probability are obtained by embedding the neighborhood search mechanism, which introduces a mechanism similar to the pheromone in the ant colony algorithm in the PSO algorithm, and selects the appropriate locally optimized solution as the evolutionary direction in the extended PP sequence according to a certain strategy. The PP sequence is obtained through the neighborhood search mechanism, which provides multiple choices of particle swarm evolutionary directions and increases the diversity of differences among particles, thus improving the ability of the particle swarm algorithm to avoid local optima.Further, in order to retain the advantage of fast convergence of the basic particle swarm algorithm, an optimization strategy based on the clustering degree is designed, and the clustering degree of particles is characterized by the variance of the particle fitness function, as shown in (13):(17)σ2=∑i=1mfi−FaveF2,where F is the adjusting factor, detailed operation shown in (14). The main role of this factor is to limit the size range of σ2. Fave is the mathematic average of the adjusting factor, F.(18)F=max1≤i≤mfi−Fave,max1≤i≤mfi−Fave>1,1,max1≤i≤mfi−Fave≤1.When the particle distribution is scattered, the whole swarm has a strong search ability and the obtainedσ2 value is large, and only the highest fitness point in the PP sequence needs to be selected during iteration to ensure the convergence speed; while the σ2 value gradually becomes small to indicate that the swarm starts to converge, and the selection range of the PP sequence is gradually expanded to increase the diversity of particles. The segmentation function, equation (19), is designed to determine the range of k.(19)k=0,σ3>σ1,Kvσ<σ2.Also the variational strategy is applied to the global optimal solution when the clustering of particlesσ2<1, shown in (16) and (17):(20)pBest=pBest+N0,σd,(21)σd=expτN0,1,where N0,1 denotes a random normal distribution with mean 0 variance 1 and τ is the step parameter. In this way, when the particle aggregation degree σ2<1, the particle may occur prematurely and the aggregation phenomenon, which is perturbed to the current optimal position of the particle, can be avoided. Based on the above discussion, the improved PSO based on ant colony algorithm idea and mutating strategy (AMPSP) is proposed.At this point, the problem of optimizing the resource allocation of the optimized information particle swarm algorithm has been solved. However, since the numerical modeling still requires the evolution and comparison of formulas, we introduce the validation model here. In this paper, classical functions are used to test the performance of AMPSO, conventional PSO algorithms. Generalized Rosenbrock's function and Generalized Rastrigin’s function are used, respectively. In the algorithm running test, the number of particles is 30,c1 = c2 = 1.7, k = 10, and the inertia weights are linear decreasing strategy. The algorithms were run 50 times for each function, and the results were averaged over the optimal adaptation values, which are compared in Table 1.(22)f1x=∑i=110100xi+1−xi2+xi−12,xi∈−100,100,(23)f2x=∑i=110xi2−10cos2πxi+10,xi∈−10,10.Table 1
Algorithmic test of the standard formula for the average optimal adaptation value.
PSOAMPSOFunction 1, equation (22) number of iterations5004539.0211468.538510006434.2409201.600015001702.592978.58332000850.440717.4000Function 2, equation (23) number of iterations40027.901113.538580021.78126.2500100019.21183.5714By analyzing the advantages and disadvantages of the particle swarm optimization algorithm and introducing the ant colony algorithm model and variation strategy, the problem of premature convergence of the particle swarm optimization algorithm is improved. The algorithm has shown strong adaptability, robustness, and high efficiency for complex test function optimization problems, and the experiments show that the algorithm improvement is feasible.


## 3.1. Structure and Encoding of Individual Particles

The resource allocation problem is the process of adjusting the start time of each job under the time sequence constraint using the free time difference, so as to obtain a variety of different scheduling schemes and find the one with the smallest mean squared difference of resources among the many schemes. Adjusting the free time difference of the jobs is to delay the start time of the jobs, thus the particle individual can be designed as follows: a particle corresponds to a set of job sequences, and the value of the particle represents the start time of each job within the job sequence.The start time range is calculated.The model constraint, equation (7), shows that the existence of the time difference allows the work start time to fluctuate within a certain range. Since the network plan is constantly adjusted in the process of solving the model, the start time range of the job is also changing, so to determine the start time of a job, we must find out the start time range of the job. Figure 2 shows the flow chart for calculating the start time range of the work immediately before the work after the start time of the work is determined.Figure 2
Flow chart for start-up time range regulations.


## 3.2. Initial Population Generation

The determination of the start time of one job will affect the start time range of other jobs, so when generating different particle swarms to form the initial population, if the start time is determined for each job in its corresponding time range according to the corresponding job order of the particle swarm itself, it will lead to a fixed priority, thus the probability of getting the same total time difference for the jobs in the next order is greatly reduced and the population lacks diversity. In this paper, before generating each particle population, a noncritical job order is randomly generated, and then its start time is randomly determined from its corresponding time range in turn, and after each job’s start time is obtained, the start time ranges of other jobs are redetermined. In this way, the priority of each job is theoretically the same, ensuring a wide diversity of populations. The flow is shown in Figure3. In this way, a particle population corresponds to a feasible solution in equation (4), and the initial population composed of a certain number of particle populations corresponds to a subset of the model solution space.Figure 3
Initial population generation flow chart.


## 3.3. Evaluation Function

The rules of the evaluation function make the adaptation value of the individual with smaller mean variance of resource usage larger, and as the particle swarm evolves, the algorithm eventually finds the resource plan with the smallest variance. Since equation (4) seeks to minimize the objective function, the original objective function is to be converted into an fitness value function to ensure that suitable individuals have large fitness values. This can be achieved by the following conversion process.(11)fx=σmax2−σ2xσmax2−σmin2.In (5), x denotes a particle of the contemporary population; fx denotes the fitness of particle x; σmax2 and σmin2 denote the maximum and minimum values of the contemporary objective function, i.e., the mean variance of resource use; and σ2x denotes the mean variance of resource use corresponding to particle x.


## 3.4. Convergence Conditions

Convergence is an important issue in particle swarm algorithms, which can indicate whether the feasible solution found by such an algorithm is optimal or whether the currently found solution satisfies the accuracy requirement. Here we give a definition of convergence for a particle swarm optimization algorithm [13]. Let the position of a particle in the swarm at time t be xt and P be an arbitrary position in the entire search space, then the particle converges as in (8).(12)limt⟶∞xt=P.This definition suggests that the convergence of a swarm algorithm means that a particle in the swarm eventually stays at a fixed position in the search space. After analyzing the trajectories of the particles, we also find that for all particles in the swarm, they will eventually converge to the position of the global optimal particle.By the definition, it is clear that the historical best fitness value gBest of a particle swarm is a function of the iterative informationt. As t varies, gBest (t) constantly changes and tends to a fixed value as t ⟶ ∞, which is shown in (9):(13)limt⟶∞gBestt+1−gBestt=0.Theoretically, the optimization search process of an algorithm is the process of continuously preserving the historical best fitness values, which has been proved theoretically to be globally convergent, but it takes a considerable amount of time under the current computational power and conditions, which is one of the urgent problems that various intelligent bionic-like algorithms need to solve at present. In practice, an alternative strategy is usually adopted, i.e., preserving the current optimal individual values. In this way, the global optimal solution can be found with probability 1 for all the specified evolutionary generations, which is also the approximate convergence strategy currently adopted by many intelligent affine algorithms. This is done by setting a maximum evolutionary generationG before the program runs, such that the program automatically terminates after running G generations and takes the currently found optimal solution as the global optimal solution.


## 3.5. Algorithm Flow

The flow of PSO is shown in Figure4, where pBest is the individual extreme value.Figure 4
Improved information particle swarm algorithm. Reoptimization is based on ant colony idea and variation idea.In the ant colony algorithm, the pheromone concentration on the ant’s route is analyzed, and the one with higher pheromone concentration is selected as the forward direction according to a certain probability, so as to achieve the goal of finding the optimal solution of the problem. If the global optimal solution of the swarm is close to the local optimal solution during the whole evolution process, the particle may fall into the local optimal and cannot continue to search further in the solution space. Inspired by the ant colony algorithm to introduce the pheromone model for PSO, a local search in the neighborhood of the current local optimal solution (pi) of each particle generates k points ppi, shown in (10) and (11), and record k points generated by local search in the neighborhood of the current local optimal solution of the ith particle.(14)ppij∈ppi1,ppi2,…,ppik,(15)ppij=pi+rdi,where r is the step size and di is the direction.Let the current locally optimal solutionpi of the ith particle be ppik+1. Establish the corresponding probability selection in the PP sequence. In this paper, we construct the probability of each current locally optimal solution for selecting the points in the PP sequence as (12).(16)pij=maxfppij,q≫q0,fppij∑i=1k+1fppij,q<q0.Hereq0 is a given parameter 0≤q0≤1 and the function fx is the fitness of the point x, as shown in (7) above.From the selection probability, it is known that the point with higher fitness in the PP sequence is more likely to be selected as gBest in (9). The PP sequence and the selection probability are obtained by embedding the neighborhood search mechanism, which introduces a mechanism similar to the pheromone in the ant colony algorithm in the PSO algorithm, and selects the appropriate locally optimized solution as the evolutionary direction in the extended PP sequence according to a certain strategy. The PP sequence is obtained through the neighborhood search mechanism, which provides multiple choices of particle swarm evolutionary directions and increases the diversity of differences among particles, thus improving the ability of the particle swarm algorithm to avoid local optima.Further, in order to retain the advantage of fast convergence of the basic particle swarm algorithm, an optimization strategy based on the clustering degree is designed, and the clustering degree of particles is characterized by the variance of the particle fitness function, as shown in (13):(17)σ2=∑i=1mfi−FaveF2,where F is the adjusting factor, detailed operation shown in (14). The main role of this factor is to limit the size range of σ2. Fave is the mathematic average of the adjusting factor, F.(18)F=max1≤i≤mfi−Fave,max1≤i≤mfi−Fave>1,1,max1≤i≤mfi−Fave≤1.When the particle distribution is scattered, the whole swarm has a strong search ability and the obtainedσ2 value is large, and only the highest fitness point in the PP sequence needs to be selected during iteration to ensure the convergence speed; while the σ2 value gradually becomes small to indicate that the swarm starts to converge, and the selection range of the PP sequence is gradually expanded to increase the diversity of particles. The segmentation function, equation (19), is designed to determine the range of k.(19)k=0,σ3>σ1,Kvσ<σ2.Also the variational strategy is applied to the global optimal solution when the clustering of particlesσ2<1, shown in (16) and (17):(20)pBest=pBest+N0,σd,(21)σd=expτN0,1,where N0,1 denotes a random normal distribution with mean 0 variance 1 and τ is the step parameter. In this way, when the particle aggregation degree σ2<1, the particle may occur prematurely and the aggregation phenomenon, which is perturbed to the current optimal position of the particle, can be avoided. Based on the above discussion, the improved PSO based on ant colony algorithm idea and mutating strategy (AMPSP) is proposed.At this point, the problem of optimizing the resource allocation of the optimized information particle swarm algorithm has been solved. However, since the numerical modeling still requires the evolution and comparison of formulas, we introduce the validation model here. In this paper, classical functions are used to test the performance of AMPSO, conventional PSO algorithms. Generalized Rosenbrock's function and Generalized Rastrigin’s function are used, respectively. In the algorithm running test, the number of particles is 30,c1 = c2 = 1.7, k = 10, and the inertia weights are linear decreasing strategy. The algorithms were run 50 times for each function, and the results were averaged over the optimal adaptation values, which are compared in Table 1.(22)f1x=∑i=110100xi+1−xi2+xi−12,xi∈−100,100,(23)f2x=∑i=110xi2−10cos2πxi+10,xi∈−10,10.Table 1
Algorithmic test of the standard formula for the average optimal adaptation value.
PSOAMPSOFunction 1, equation (22) number of iterations5004539.0211468.538510006434.2409201.600015001702.592978.58332000850.440717.4000Function 2, equation (23) number of iterations40027.901113.538580021.78126.2500100019.21183.5714By analyzing the advantages and disadvantages of the particle swarm optimization algorithm and introducing the ant colony algorithm model and variation strategy, the problem of premature convergence of the particle swarm optimization algorithm is improved. The algorithm has shown strong adaptability, robustness, and high efficiency for complex test function optimization problems, and the experiments show that the algorithm improvement is feasible.


## 4. Case Study

Suppose an engineering design project consists of 9 tasks with the process parameters shown in Table2 The network plan diagram and resource distribution histogram of the tasks are shown in Figure 5. The total duration is 14 d and the critical line is A-D-G-I. As seen from the figure, the human resources are very unevenly distributed. The highest value reaches 20 people/d, while the lowest value is only 5 people/d, and the mean square deviation is 24.41, with very large ups and downs. Therefore, it is necessary to optimize the resource allocation for this task.Table 2
Parameters of the jobs.
Job namePreimmediate workWorking daysResource required/peopleEarliest starting timeLatest starting timeA2611B4314C5516DA4433EA37310FB7458GC/D6577HC/D43711IE/G251313Figure 5
Preoptimization work network diagram and HR histogram.In accordance with the design of the start time flow chart, the start time of each job in this task was calculated to obtain the process parameter table shown in Table2. Among them, the earliest/late start time is between 1 and 14 because the total duration is 14 d.As described in part 3, the histogram of resources of the optimized solution is shown in Figure6, and the mean squared deviation of the optimized solution is 10.70, using the traditional particle swarm algorithm for resource balancing optimization of the algorithm.Figure 6
Histogram of HR after optimization of the traditional particle swarm model.In order to verify the effective convergence of this AMPSO information model, this algorithm is performed in this paper. The parameters of the particle swarm algorithm are set as follows: the initial population of particle swarm is taken as 20, the length of individual particles is taken as 9 according to the task requirements, where each one represents the start time ofA-I jobs; the earliest and latest start times of each job in the particles are shown in Table 1; the acceleration constants c1 and c2 are taken as 1.2 and 0.8, respectively; the inertia weight coefficient ω is taken as 0.9; and the evolutionary generation is 100.The network diagram and resource histogram of the optimized AMPSO information particle swarm model are shown in Figure7, and the start-up schedule is shown in Table 3. The change of the minimum resource usage mean squared deviation per generation of the particle swarm algorithm is shown in Figure 8, and comparison of the three schemes is shown in Table 4.Figure 7
Optimized work network diagram and HR histogram.Table 3
Starting time of each job after optimized by AMPSO.
JobWorking daysA1B2C1D3E6F8G7H9I13Figure 8
Schematic diagram of the iterative convergence result of the AMPSO algorithm.Table 4
Comparison of the three schemes.
Schemeσ2Minimum human resourceMaximum human resourceOriginal24.41520Regular PSO10.70519AMPSO2.84916It can be seen that in the ordinary PSO optimization scheme, the mean variance of resource requirements is 10.70, which is 56.2% less than the initial scheme. In this paper, the average variance of resource requirement in the information AMPSO optimization scheme is 2.84, which is 88.4% less than the initial scheme and 73.4% less than the conventional PSO optimization scheme, and the range of resource usage is also greatly reduced to avoid the phenomenon of large fluctuations in resource usage. Obviously, the method in this paper has better optimization effect.


## 5. Discussion

In order to improve the efficiency of human resources utilization in business operation, this paper studies the optimal allocation of human resources in enterprise-level projects. The current evaluation model of resource balancing optimization problem is analyzed, the optimization method based on dynamic time difference is introduced, the resource balancing optimization method based on particle swarm algorithm is proposed, and the improved particle swarm algorithm AMPSO with ant colony idea and variation idea is proposed. Algorithm thus verifies the feasibility and effectiveness of the human resource optimization allocation method in the enterprise-level project.The premise of sustainable, healthy, and stable development of the enterprise is the scientific and reasonable human resource allocation work, only the optimal allocation of human resources, employees can be motivated to work, personal value advantages can be maximized, and the development of the enterprise will be more stable and rapid. Therefore, the development of enterprises must pay attention to the optimization of human resources allocation, combined with the business objectives of enterprises at different stages, analyze some of the current problems in the allocation of human resources, and constantly optimize and adjust and actively improve the human resources allocation structure of enterprises, laying a solid human resources foundation for the development of enterprises, in order to achieve leapfrog development of enterprises.



---

*Source: 2010685-2022-08-29.xml*