Simulation of Enterprise Human Resource Scheduling Algorithm Optimization in the Context of Smart City

,


Introduction
Due to the difference in economic development, people flock to the economically developed areas in order to increase their income, making the first-tier cities more and more populated. For the influx of large numbers of people, enterprise management is becoming more and more difficult, and the people's poor environmental awareness caused the frequent problems of haphazard dumping, unlicensed businesses, and emergency enterprises. e traditional urban enterprise management, due to the lack of information, cannot quickly and accurately locate this type of emergency. Because of its inability to know the precise location of the various types of staff, it cannot quickly identify the most appropriate personnel scene deal with such events. As a result, the public feels that the city manager did not respond to their reports in a timely manner, which makes the public's satisfaction to decrease. How to quickly and accurately locate this type of emergency problem is becoming a big challenge to the city management [1]. To solve these emergencies, you can use the Internet of ings technology to build a smart city and to make city management more intelligent [2]. e smart city concept proposed by IBM in 2008 was aimed at the Internet of ings and cloud computing and other new information technology applications to city management, so that city managers can make a rapid response to the city's emergency corporate events and other types of demand [3]. e concept was proposed at a time of financial crisis when many countries see the new generation of information technology as a new source of economic growth [4]. With the help of the Internet of ings (IoT), city managers can collect a large amount of data, and if they do not take advantage of it, then they cannot take the advantages that IoT brings. is paper argues that city managers can use these data for simulation to make better decisions. Simulation is the creation of a model of another system to represent its key features or behaviors or functions based on some purposes that seek to systematize and formalize the system so that its key features can be simulated [5]. e model represents the system, and the simulation represents the temporal behavior of the system [6].
e system being simulated is referred to as a physical system, which can be either an actual system, such as a bank queuing system, or virtual, such as multiple alternatives for an event [7]. e use of computer simulation is a modern management technique that assists management in making decisions and developers in designing systems [8].
Andrisano et al. experimentally verified the positive impact of introducing IoT technology in emergency management at every stage of emergency management [9]. Moustaka et al. proposed an urban disaster prevention and emergency command method based on IoT-related technologies to detect and classify urban disasters, different categories correspond to different treatment methods and use ant colony algorithms to find the best path, and traditional algorithms cannot avoid the defects caused by the complexity of urban disasters that are difficult to accurately describe disasters with a single model, but with the help of IoT [10]. Bibri et al. pointed out that when the traditional communication network is damaged after a disaster, the dynamic network can be rebuilt with the help of IoT technology and the banker algorithm can be used to plan resource dispatching with the help of IoT technology, which has better results than the driven FACES brute force approach [11]. In a study, Wang et al. proposed a GPS/GISbased personnel scheduling solution. Personnel users completely offload tasks when considering resources to maximize the economic efficiency of the MISS service under the condition of service experience [12]. Lv et al. used Markov's theory to optimally allocate communication resources to different users under a variety of communication services to minimize the average transmission delay of the network [13]. e various simulation methods mentioned in this section have been studied and applied to solve certain problems in ordinary environments without considering the possibility that the introduction of IoT in an intelligent environment may lead to various problems, such as the problem of scheduling nurses in a certain department of a hospital, which makes them fixed inputs when using data to validate the simulation model, which brings problems that may lead to the optimal solution obtained only when the current conditions are used, and these conditions may change in the future, which may lead to the failure of the current simulation model. With the help of IoT, we can collect all types of data in real time, and in this case, all types of conditions in the whole problem are variable, which requires the simulation system or model to be flexible enough, and these research results do not have such flexibility. e various types of scheduling algorithms introduced have similar problems with the current simulation research that does not have flexibility. In addition to the problem of flexibility, the various types of scheduling algorithms are mainly heuristics, which tend to have high time complexity and thus can take a lot of time to obtain the optimal solution for big data problems.

Optimized HR Scheduling Algorithm Design.
Model fusion is based on the first step of a single submodel after the completion of training. e model performance of each assumption is independent, in order to take an appropriate approach to the combination of model results.
is assumption is often difficult to achieve, so even if the errors between the models are correlated, an appropriate method can still be used to combine the strengths of each model to achieve the fusion effect. e methods of fusion used in this study are average and stacking. When dealing with realworld specific problems, overfitting can occur because the amount of training data is insufficient to support complex models [14]. e average is a method of combining the predictions of all individual models in a weighted average, which is simple, efficient, and easy to implement. e linear combination of the prediction results of each model by average can alleviate the phenomenon of overfitting to some extent [15]. As shown in Figure 1, a single model produces a line with a green boundary due to overfitting; however, the black line boundary has better generalization ability. By training multiple models and averaging the model results, the fit to the noise will be reduced due to averaging and the boundary will only move closer to the black line.
In this paper, we address the regression problem of workforce scheduling by using an averaging fusion for both XGBoost and LightGBM models. e formalized formula (1) is shown as follows [16]: Until the IoT is introduced to TPWD, the TPWD has no way of knowing the real-time location of collectors and personnel; the practice of handling emergency sanitation incidents at this point is similar to the practice of shift scheduling where a shift is scheduled in advance; and when an emergency sanitation incident is reported, employees are assigned to go on a rotating basis according to the duty schedule.
Assuming that an area information collector has already scheduled his or her shift and receives a call from the public, according to the shift schedule, c should be assigned to that area information collector, but based on the distance of the current event, c is not the closest collector to the emergency. e GBDT model is a learning enhancement method using decision trees as the base classifier, which uses a linear combination of base functions and a forward distribution algorithm to superimpose multiple decision trees on each other. e output is obtained by accumulating several decision trees, each of which implements a fit to the predicted residuals of the previous decision trees and modifies the overall model utilizing a loss function N. e GBDT model is based on the following model [17]. e mathematical model can be expressed as follows: A forward distribution algorithm is used. en, the n-th step of the model is determined as follows: 2 Complexity e basic principle of XGBoost is the same as that of GBDT, and its objective function is given by e EFB is known as mutually exclusive feature bundling and reduces the number of features by bundling them. Highdimensional data often have sparse features, and it is sparsity that gives us the possibility to design methods that reduce features and do not affect the model effect [17]. In sparse data, many features are mutually exclusive; i.e., the values of two features will not be zero at the same type of method: all features are scanned, the features are sorted by the number of nonzero values, and then the features are combined to construct a feature histogram. e histogram is constructed so that (n data (n features)) becomes (n data (m bundled features)), and m (bundled features) is smaller than n (features), thus speeding up the training of the model.
To solve the problem of not being able to quickly find the most suitable candidate for each dispatch, enterprises start to build smart cities, aiming to introduce relevant technologies such as IoT and cloud computing to make enterprise city management more intelligent and modern. After receiving a report from a citizen, the Shenzhen city management dispatch center will find the nearest collector to the incident location based on the real-time location of the collector collected by IoT technology and assign the task of confirming the authenticity of the incident to the collector.
If the event is real, the dispatch center will then assign the task of handling the event to the nearest person based on the person's location information. is person will first handle the work in hand and then proceed to the designated location to handle the emergency sanitation event. e field confirms that the incident processing is up to standard, and if so, it is reported back to the dispatch center, which marks the incident as processed; otherwise, the above process needs to be repeated until the incident processing is up to the standard. Based on the field research, the collectors and personnel return to patrol around the area to which they belong when not on assignment, and upon receipt of an assignment, they follow a nonmotorized road to the incident location rather than going directly in a straight line, returning to the patrol route as soon as possible after the collectors and personnel have processed the current incident, and only after returning to the patrol path, the collectors and clean-up personnel proceed to the next incident location.  Complexity maintenance tasks; only after the assignment of emergency sanitation event handling tasks, they can determine the movement route, which is not solved by the current heuristic algorithm. No longer limited by hardware conditions, as long as the location of the technical staff can accessed by the Internet, you can directly call the supercomputing resources through the web for calculation and analysis, so that inspiration can be realized at any time, to better meet the needs of the enterprise mobile office, off-site office. e heuristic algorithm takes a long time to compute the optimal solution and the resulting optimal solutions are only applicable to the current scenario; the urban emergency sanitation event management problem is a dynamic problem, and the conditions may change at any time; for example, the area may be replanned [18]. erefore, this paper argues that the scheduling algorithm for emergency sanitation event management should not be too complex and the time complexity should be low. After synthesizing the second part of this paper, this paper analyses the unreasonableness of the current task assignment of the enterprise, and this paper argues that a lot of information can be collected with the help of the Internet of ings, and it is unreasonable for the current enterprise to use only the real-time location of the employees; for example, through the information collected by the IoT, we should be able to get the movement speed of each employee, which should also be an important factor that affects the task assignment, in order to get the case of these elements, it is also unreasonable to assign tasks based only on distance. Also, the IoT collects historical data on each area, and based on these data, it is possible to obtain the distribution of the number of emergency sanitation incidents and the distribution of processing time for each area.

Human Resource
Once the urban planning changes, the solution must be solved again, and heuristic algorithms are not applicable. It is necessary to find the right candidate quickly after the event has occurred, which determines that overly complex scheduling algorithms cannot solve the problem. Emerging neural network schemes, in addition to the shortcomings of heuristic algorithms, require many training samples to train the neural network, which is also inappropriate for Shenzhen, which is currently just starting its smart city construction, as shown in Figure 2.
In summary, the simulation system in this paper decides to use the time taken from the incident being reported to the incident being confirmed by the collector and handled by the staff as the criterion for assigning tasks, which is determined by three factors: the first is the time it takes for the staff to handle all the tasks in hand [19], the second is the speed at which the staff member moves, and the third is the distance between the staff member's location and the event after processing the task in hand. e first part is to confirm the number of emergency sanitation events generated during the simulation cycle; the second is the length of time each event requires staff to handle, the length of time refers to how long it takes staff to finish the matter after arriving at the scene; and the third part is to confirm the location of the event and generate the event [20].
is paper assumes that the number of emergency sanitation events is in line with the normal distribution; this paper is based on the historical data collected by the enterprise's every half month statistics of the number of emergency sanitation events in each region; after this can be calculated in each region of the mean and variance of the number of emergency sanitation events and the mean and variance of the event processing time, this paper randomly generated the normal distribution of each emergency, which required to deal with the length of time; and the third part of the event location and time of occurrence is determined after the location of each region is determined. is paper uses a random algorithm to take random points in the region and the points obtained are the location of the event, while the time of occurrence is randomly generated during the simulation cycle using a random number generation algorithm.
In this paper, we hope using simulation techniques helps corporate governments configure better human resource solutions and modes of action to deal with emergency sanitation events. Firstly, a suitable simulation method needs to be selected, based on the first part of this paper, to treat the corporate urban emergency sanitation incident handling process as a system with three elements: emergency, personnel, and collector. Discrete and continuous simulations are used to simulate the system, while multiagent simulations are suitable to simulate the system.
After the selection of simulation technology, we should choose the development platform. Generally, the simulation system will choose the general software such as logic or arena, but this kind of software does not meet the requirements of this study. It also moves in real time, and the movement path needs to change depending on the task assigned. Secondly, this kind of software is expensive, and subsequent maintenance and upgrades require additional charges. After the research, we decided to develop a simulation system by using the object-oriented programming language C# and the database management software SQL Server. e interface of the simulation system is developed in C#, and with the help of information, it is relatively easy to develop a graphical desktop interface. First of all, you need to input the number of blocks and the duration of the simulation; the default is 4 blocks and 1 day; you can click OK or close the window directly; after inputting, the corresponding menu will appear in the sidebar; and according to the menu, you can input the basic information of each area in order, including the coordinates of the four vertices, the basic number of emergent sanitation events, the number of times, and the size of the contingency. Figure 2 is a screenshot of the simulation, on the left is a simple animation effect, and on the right is a search portal where you can view the current location of each employee and select the corresponding block number to view the real-time location and coordinates of all employees in the current block. e simulation results are shown in the form of a table and a histogram, respectively.
In addition to the single block simulation system, a query center is also developed in this paper. e simulation system in this paper can run on multiple computers to simulate 4 Complexity multiple blocks at the same time, and a control center is needed to view the simulation of each block at the same time. e simulation results of the current region can be queried by selecting the corresponding number and the number of collectors.

Design of Evaluation Indicator Parameters.
e first criterion is the average emergency handling time, i.e., the time taken from the receipt of a public report to the arrival of the staff to handle the emergency. is paper has three evaluation criteria for each human resource allocation scheme. e first one is the employee workload ratio, which is the ratio of the time each employee spends on handling emergency incidents to the working hours per day; the larger this value is, the busier the employee's work is. After the corporate research, the load ratio of the collectors should not be higher than 0.6; if it is higher than 0.6, the collectors will not be able to complete their daily patrol maintenance tasks. For the staff, the load factor should not be higher than 0.55; if it is higher than 0.55, the staff will not be able to complete the daily street cleaning and maintenance tasks; the smaller the load factor for the staff, the better [21]. e second one is the average emergency handling time; the smaller the value, the better. e third is the cost of labor. In the corporate survey, one collector was paid 4500 yuan per month and one staff member was paid 5000 yuan per month, and the lower the cost, the better [22]. e evaluation of a program should be a combination of these three indicators, rather than just looking at one of them. e evaluation method used in this paper is that a program can only be considered a passable program if it meets the load factor of the collectors and personnel, and then the cost and work hours are combined using a linear formula to get a value, which is as small as possible.
e evaluation method used in this paper is that a scheme can only be qualified if it meets the load factors of collectors and personnel, and then the cost and working hours are combined using a linear formula to obtain a value, and the smaller the better [23]. e summary of the three scenarios is shown in Table 1; for example, although Scenario A has the lowest average processing time and cost, the collector and personnel load factors are too high for this scenario to be desirable.
For which cost is better, B or C, it depends on which indicator the decision-maker prefers, assuming that the average processing time is A and the cost is B. In this paper, the indicator for evaluating the solution is C, which blends the two indicators of time and cost. A and B are two weighting coefficients, and the specific value depends on which indicator the decision-maker prefers, and if more preferred to time B, then the value of A is larger; for example, A takes 0.8 and B takes 0.2. In this case, the indicator M of Scenario B is 22.1, and the indicator M for Scenario C is 22.8, so Scenario B is the better option. On the other hand, if cost C is preferred, the value of A is larger, so that the indicator of Scenario B is 16.4 and the indicator of Scenario C is 16.2, and Scenario C is the better solution. In addition, due to the cost calculation, the value will be very large. is paper firstly reduces the cost by 1000 times; in the enterprise field inspection, the government is more focused on the average processing time of the incident, so in this paper, the C value is decided to be 0.7.

Analysis of Human Resource Dispatch Results for Smart
Cities. Figure 3 shows the trend of the average time spent to handle emergency sanitation events at low event frequencies for small and large regions, respectively, using the scheduling algorithm of this paper and the enterprise's current scheduling algorithm. It can be seen that the scheduling algorithm of this paper is superior to the current scheduling algorithm used by the enterprise under most of the scenarios, and overall, the use of this paper's scheduling algorithm will first decrease the average time spent when the number of collectors and personnel increases, while the trend of the average time spent under the enterprise's scheduling algorithm fluctuates greatly because the enterprise's scheduling algorithm is not reasonable, and the selection is based only on the distance of the employees. Proximity is unreasonable and does not take into account the possibility that there may be situations where employees are currently traveling to the site of an emergency event when they can only travel to deal with a new emergency sanitation event after dealing with an already assigned emergency event. Based on the simulation results, it is demonstrated that the scheduling algorithm in this paper is more reasonable than the current scheduling algorithm in the enterprise and that the employees can be more effectively dispatched to handle emergency sanitation events in the city using the scheduling algorithm in this paper when there are more employees of various types. Figure 4 shows the trend of the composite indicator M for small regions with low-frequency events. According to the data parameters in this paper, there should be 25 scenarios, but according to the evaluation criteria in this paper, the scenarios that do not meet the load factor requirements are unqualified, so Figure 4 shows only 16 scenarios results. According to this indicator, it can be found that the best staffing for small regions with lowfrequency events is two collectors and two personnel. Figure 4 shows the trend of the average processing time for events at low frequencies in a small area, again excluding scenarios where the load factor is not met, and the small size of the area makes the average processing time for these scenarios not very different, with a maximum value of 31.14 minutes and a minimum value of 30 minutes, a difference of fewer than two minutes, and the scenario with the lowest average time In the case of staffing four collectors and three personnel, the labor cost is much higher than in the case of two collectors and two personnel; the difference in processing time is less than one minute unless the labor cost is completely disregarded; and two collectors and two personnel is the optimal human resource allocation for small regions under low-frequency events. Figure 4 shows the variation of employee load factor for a small area under low-frequency events, and an increase in the number of the same employees can make the load factor of such employees decrease; for example, when the number of collectors increases, the average load factor of both collectors decreases, while the load factor of collectors does not increase due to the increase in the number of personnel and vice versa. After the event, the personnel only will enter the busy state, and similarly only after the personnel to deal with the emergency sanitation event, the collectors will be assigned to confirm the work, so the number of employees of one category will not have an impact on the load rate of another category of employees. By looking at the trend of the average processing time, this paper finds that the average duration does not always decreases with the increase in the number of people, as can be seen in Figure 4; for small areas of low-frequency time, when 4 collectors and 3 personnel are allocated, the number of people is reduced to a minimum, and later either the increase in the number of collectors or the increase in the number of personnel will make the processing time unchanged or increase. e obtained sequences are analyzed by R/S to calculate the Hurst index, respectively. Figure 5 shows the calculated Hurst index for each line, which is greater than 0.5 and less than 1, indicating that the traffic flow is fractal; i.e., the future trend of the series is positively correlated with the historical trend, which means that the previous traffic flow affects the current and the next traffic flow, indicating that the historical traffic flow should be used for traffic flow prediction. Also, the mean value of the Hurst index for the five traffic series with 20-minute statistics is larger than the index for the traffic series with other time scales, which means that the 20-minute traffic time series has the strongest autocorrelation and is the most suitable for the study of traffic flow problems.
As shown in Figure 6, it may be assumed that 10 existing moorings are recruited to perform reliable collaborative edge computing. For each mooring crew, the overhead cost c of performing each Giga CPU cycle varies randomly from 0.1 to 2. e maximum computational load that can be sustained is 1000 giga CPU cycles, and the current computational load is uniformly distributed over [100,500].
To evaluate the advocated Telematics edge computing scheme for federated parkers, this paper compares the existing scheme, which purely utilizes MEC servers to handle computing tasks in Telematics. Next, it is shown that by combining the free resources from the parkers with the current resources from the MEC servers, the resource capacity of the Telematics network can be further extended so that sufficient resources can be dispatched on demand to support various services. us, by improving the network Table 1: Summary of the 3 scenarios.   Type  Average load factor for collectors  Average employee load factor  e average length of incident processing time  Cost  A  4  2  3  8  B  3  5  6  7  C  4  4  5  10 6 Complexity resource capacity, the Telematics Edge Computing for federated parkers can serve more people.

Analysis of Simulation Experiment Results.
As the city grows, more events will likely be treated as emergency sanitation events in the future, which could potentially make the number of emergency sanitation events in an area skyrocket. According to the input number of emergency sanitation events, the number of emergency sanitation incidents in each area is generated based on a normal distribution with a mean of 40 and variance of 10, while the processing time per incident is generated based on a normal distribution with a mean of 10 minutes and variance of 4. For these conditions, due to many scenarios per region, only the trend of each indicator is given here. Figure 7 shows   Complexity staff load factor for small and large regions with many emergency sanitation events. First, the trends of composite M and employee load factors are the same as in Section 3.1, so the system is still valid for many emergency sanitation events and can help decision-makers to find the optimal allocation of human resources. e trend of the average duration shows that, in the case of a large number of emergency sanitation events, it is not the case that the more the employees, the shorter the processing time, but still the first decreases with the increase in the number of employees, and after reaching a certain threshold, the increase in the number of employees will not reduce the average processing time, but may make the average processing time increase.
For example, if the decision-maker does not care about the labor cost, but just wants to deal with the emergency as soon as possible, the decision-maker only needs to find the solution with the shortest average processing time according to the simulation results. e first layer of Stacking Integrated Learning uses three models, Random Forest, XGBoost, and Light GBM, and uses a 5-fold cross-validation method to learn the training set. e correlation coefficients between the three models are calculated as the correlation coefficients between the models for the predicted traffic flow in this experiment (see Figure 8). Figure 8 shows the experimental results of the 5-fold crossvalidation of the training set, and we can see that the error of Stacking on the MAPE index is smaller than that of other models, which shows the accuracy and robustness of Stacking. e results obtained by continuing the experiments in the test set are shown in Figure 8. Regardless of MAPE or RMSE, the results by Stacking fusion not only outperform the single model SVM and random forest but also outperform the method by Average combination. For the Average combination method, a new combination scheme based on traffic flow prediction is proposed, which is experimentally shown to be less erroneous than the single model prediction. For another stacking approach, a two-layer stacking framework is developed in this section, and the prediction obtained is not only better than the single model but also slightly better than the first combination scheme.
In summary, the numerical results presented show that the game approach is feasible and efficient for both service providers who optimize their decisions from the user's perspective and for parked vehicles involved in collaborative edge computing, as shown in Figure 9.
After introducing the main entities in the network, a secure and reliable interaction protocol is designed to guarantee legitimate authentication, anonymization, and secure communication, personal privacy protection, and reward authenticity when service providers dispatch parked vehicles. ereafter, the serviceability of different parked vehicles in collaborative edge computing is evaluated, and the resource scheduling optimization problem between parked vehicles and MEC servers is modeled and solved using the Stackelberg game method. Finally, an iterative algorithm based on the gradient method is proposed to determine the computational load distribution between both of them to ensure the economic optimality of the user-oriented service provision. rough experimental simulations based on real datasets, it is demonstrated that the proposed scheme offers superior performance in terms of increased user capacity and reduced computational offload service overhead compared to existing work.
To discuss the Stackelberg game model in the incentive mechanism, RSUs in a randomly selected defense scheme is observed to analyze the effect of different system parameters on the optimal response of the RSUs and the participating vehicles. In the Stackelberg game model, the main system parameters include the virtual packet transmission cost c, the parameter θ that measures the negative impact on the normal in-vehicle service, and the given reward parameter R, 8 Complexity for all participating vehicles, and the total number of virtual packets in the incentive is positively influenced by the reward parameter R. us, as the value of R, increases, the total number of virtual packets increases. Also, the total number of virtual packets is limited by the threshold value d, mentioned to avoid generating too many virtual packet flows, as shown in Figure 10.
In summary, the above numerical results prove that the designed Stackelberg game approach is effective and feasible for implementing a defense scheme based on virtual traffic transport.

Conclusion
In the background of the study, we first introduce the source of smart cities and why the world is building smart cities and then explain how to use the Internet of ings in smart cities to help city managers to manage better and how the data collected by IoT technology can be used for simulation to further optimize urban sanitation management. In the analysis of the current research status at home and abroad, the four fields of IoT, urban sanitation management, simulation, and human scheduling are introduced. Firstly, the source and development of IoT and the main technologies and latest applications involved in IoT are introduced. In the urban sanitation management section, the research status of urban sanitation management is presented. In the simulation section, the concept of simulation and the three commonly used simulation methods are introduced, and the research and application of the three simulation methods in various fields are also introduced. e application of various heuristic algorithms to various human scheduling problems is described in the human scheduling section. In this paper, the simulation system can find the solution that makes the Complexity shortest average processing time for events in an area based on the frequency of events, and can also find the solution with the best human cost while meeting the requirements of employee load factor. Meanwhile, the core algorithm of the simulation system designed in this paper can be easily implemented by any kind of programming-oriented software, which can save the cost for the managers compared with the expensive simulation software like Analogic.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no known conflicts of interest or personal relationships that could have appeared to influence the work reported in this paper.