# Community Sports Facility Ant Colony Algorithm Collocation under the Environment of National Fitness

Authors: Yongmei Sun; Yifan Wu; Nannan Hu
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

The construction of sports facilities is gradually gaining public attention in the national fitness environment. Community sports facilities make a great contribution in making up for the shortage of urban gymnasiums, but there are many similarities in the existing community sports facilities, and the collocation is only to meet the basic needs. Based on this, this paper investigates the study of an ant colony algorithm for the collocation of community sports facilities in a national fitness environment. Based on a brief analysis of the construction of community sports facilities and the study of ant colony algorithms, a model of community sports facility matching is constructed and an ant colony algorithm is introduced to optimize the design of the scheme. The multiobjective function model is combined with the demand for community sports settings collocation, and the optimal solution set for different planning objectives is proposed in the optimal design of sports facility collocation. The objective function is combined with the ant colony algorithm to continuously update the objective function value and obtain the optimal solution after stabilization, providing a more excellent configuration for sports facility collocation. The simulation results show that the performance of this algorithm is more stable than that of traditional algorithms, and it can provide more diverse solutions for sports facility matching with greater stability.


---

## Body

## 1. Introduction

With the improvement of people’s living standards, the demand for fitness is also increasing [1]. The development of sports resources refers to a series of technical and economic measures and actions taken to make full use of sports resources, improve the utilization rate of sports resources, and make sports production smoothly. The purpose of the development of sports resources is to tap and use all kinds of sports resources to provide sports products to meet people’s sports needs. The national level has even raised the issue of a reasonable mix of sports resources at the National Seminar on Sports Development Strategies, requiring that every citizen’s demand for sports be ensured and that strengthening the reasonable allocation of sports resources becomes a problem that must be addressed in urban construction [2]. The Singapore government has built bicycle paths in many housing estates and connected them with Park lanes. People can ride bicycles from home to parks and scenic spots. Riding along the road network all over the city, people can not only enjoy the riverside landscape but also explore the mangrove reserve in the park. Riding has also become a convenient way to visit Singapore. At present, the total length of Singapore’s bicycle lane network is 460 kilometers, and the government plans to expand it to 1300 kilometers by 2030 so that people can ride more safely and comfortably in the city. In the construction of sports facilities in the community, certain improvements have been made, and in addition to traditional facilities such as treadmills and running tracks, various large, medium, and small gymnasiums have been added, and a variety of community sports facilities have been introduced to meet the needs of residents [3]. However, the mix of community sports facilities shows unbalanced characteristics, as the focus is different, the facilities will always focus on one aspect, and the mix is not reasonable enough and is basically the same as the community sports facilities, without showing the difference and not much attraction [4]. In addition to the lack of comprehensiveness in the mix of sports facilities, the most significant feature lies in the lack of space utilization, where there are conflicts in space utilization and constant outbreaks of various sports activities competing with each other for space [5]. There are few community sports facilities, which can be strengthened in many ways. Some communities have limited conditions and do not have enough sites to accommodate sports facilities. This requires the community to use their brains, revitalize resources such as idle land and marginal land, and plan and build sports venues close to the community and accessible. In recent years, the rainbow trail has gradually been welcomed by citizens. Conditional communities can lay rainbow trails along both sides of the river, which can not only meet the fitness needs of residents but also beautify the city’s appearance and environment and promote the fine management of the city.Based on this background, this paper investigates the study of the ant colony algorithm for the collocation of community sports facilities under the environment of national fitness, which is divided into four main chapters. Chapter 1 first makes a brief introduction about the construction of community sports facilities and the chapter arrangement of this study; Chapter 2 introduces the current research status of domestic and foreign research on the construction needs of community sports facilities and the related research and application of ant colony algorithms and summarizes the shortcomings in the current research. Chapter 3 constructs an ant colony algorithm-based model for matching community sports facilities in a comprehensive fitness environment, analyzes the performance of the ant colony algorithm through different examples, and improves the algorithm for better community space utilization. Section4 presents a simulation of the community sports facility matching model constructed in this paper. The parameters of the ant colony algorithm are optimized by analyzing the accuracy, and the performance of the algorithm is analyzed by analyzing the variation and error of the solution. The experimental results show that this algorithm has a greater advantage over other algorithms in heterogeneous cases, with an optimal number of iterations of 40, an ant population of 200, optimal solutions, and measurement errors, and that this algorithm has greater stability and can provide more solutions for community sports facility collocation.The innovation of this paper lies in the application of the ant colony algorithm. Ant colony algorithm is different from traditional programming mode. Its advantage is that it avoids lengthy programming and planning. The program itself is based on random operation of certain rules to find the best configuration. In other words, when the program first finds the target, the path is almost impossible to be optimal and may even contain countless wrong choices and extremely lengthy. Most of the studies related to the collocation of community sports facilities use the survey method, but this paper constructs a model for the application of the ant colony algorithm and proposes a new collocation strategy to address the shortcomings of the ant colony algorithm itself. In the initial pheromone update, a combination of random generation and assignment is chosen, and a segmented selection update is used to address the problems caused by pheromone volatility. In addition, in the evaluation of community spatial use adaptation, it is integrated with a multiobjective optimization system, which abstracts and processes the objectives and can provide more collocation solutions for spatial planning.


## 2. State of the Art

Community sports is mainly a regional mass sports within the jurisdiction of the subdistrict office, which takes the natural environment and sports facilities as the material basis, takes all community members as the main object, and takes meeting the sports needs of community members and improving the physical and mental health of community members as the main purpose. Since the reform and opening up, the most prominent phenomenon in urban sports in China is the rapid rise of community sports. The issue of matching community sports facilities is coming to the fore in the context of a national fitness environment, and there are many research gaps in the current studies relating to the matching of community sports facilities, in terms of the role of community sports facilities, differences in the level of matching, regional differences, and differences in services. For example, Johnston et al. conducted a study on British children and concluded that attending schools with inadequate community sports facilities was associated with a statistically significant and moderate reduction in the likelihood of participating in sport in adulthood [6]. Of the applications of intelligent algorithms in this area, most have focused on site selection. For example, in a study on the siting of community sports facilities, Zhang et al. designed SpoVis, an interactive visual analysis system that incorporates factors such as urban population distribution, construction costs, existing community sports facilities, traffic conditions, and development potential to provide a more comprehensive siting solution [7]. Zhu et al. analyzed the operation of sports facility sites, using the IVIFHPWG model for solving multiattribute decision out problems [8]. Wu et al. evaluated sports risk and proposed a video summarization algorithm based on block sparse representation, dividing videos into multiple blocks based on similarity, embedding multiple video blocks, and selecting representative video blocks to evaluate sports risk in university stadiums [9]. The main focus in the study of ant colony algorithms is on improvements and their applications. In their study, Wang et al. combined ant colony algorithms with optimal support vector machine algorithms to improve the coding algorithm and optimize the design of parameters and features to improve the adaptive nature of the algorithm [10]. In their study, Falcón-Cardona et al. proposed a continuous search space multiobjective ant colony optimization algorithm for continuous multiobjective optimization problems, which showed strong competitiveness in most of the measurement metrics [11]. Ye et al. proposed an improved algorithm with a negative feedback mechanism, using search history information, continuously acquiring failure experience, optimally exploring the unknown space, and identifying high-quality solutions superior to other algorithms [12]. Ikhlef et al. in a study of gearbox conditions performed a maximum overlap discrete wavelet packet transform to calculate the time domain features. An ant colony optimization algorithm was then used to remove redundant and unimportant parameters that could mislead the classification and optimize the parameters of the classifier to obtain the highest classification accuracy [13].In summary, it can be seen that most of the contemporary research related to community sports facilities is qualitative in nature, using survey methods to analyze the deficiencies in community sports facilities and then propose improvement strategies. As an intelligent algorithm, the ant colony algorithm has been greatly developed in recent years, covering all aspects of the algorithm itself in theoretical research and in application, the ant colony algorithm has mostly been applied to path optimization design, with good results. However, ant colony algorithms have rarely been applied to the study of community sports facilities, and there have been few research results combining the two. Therefore, it is important to carry out research on the matching of ant colony algorithms for community sports facilities in a whole-body fitness environment.


## 3. Methodology

### 3.1. Community Sports Facility Collocation Model

Community sports facilities are closely related to the living standard of residents. There are many problems in many communities, such as less sports facilities, aging facilities, low utilization rate, and remote location, especially the problems of old communities are more prominent. To solve these problems, we need to strengthen the construction of community sports facilities according to the actual situation and constantly improve the utilization efficiency to meet the sports and fitness needs of residents. A popular community sports ground is often an important place for residents to communicate. Community sports facilities are close to residents. In the long run, building and using community sports facilities can not only improve residents’ physique but also help to build a harmonious community relationship. In the current construction of facilities, they are mostly in line with the construction of sports facilities within the community, covering indoor fitness places (gymnasiums), outdoor fitness places (badminton places, basketball courts, football fields, walking places, children’s play facilities, etc.), emergency shelter places, etc. Common community sports facilities cover space walkers, spinning machines, Tai Chi frames, upper limb tractors, etc. In the early stages of construction, most of the facilities were built to meet national construction requirements, and the actual needs of the residents were not taken into consideration, either in terms of the matching and purchase of sports facilities or in terms of maintenance at a later stage. In setting up the collocation construction, the use of ant colony algorithm is considered to achieve the specific process shown in Figure1. The community’s sports facility site construction is collated, multiple functional units are divided, reasonable evaluation indicators are selected, weights are determined, the level of each facility is determined, and then a reasonable mix is made.Figure 1
General process of sports facility matching.To facilitate the analysis, the community sports area as a whole was divided into regular grids, on top of which the corresponding sports sites needed to be allocated [14]. Specifically, they are divided into five categories, namely, ball, indoor land, general land for residents’ exercise, children’s land, and others. It is assumed that the grid land type is denoted by G and the number of iterations is denoted by t. As the land resources for community sports facilities are very limited and the allocation of resources is not uniform, so the degree of adaptation is different. In the design of the sports facility’s collocation is to allocate the land area to different community sports facilities under the guidance of the optimization objective. The scientific allocation based on land resources is reasonable and can meet the needs of community sports facility collocation to the greatest extent. The community area adaptability function can be expressed as
(1)FS=∑i=1I∑l=1LSkil,where S denotes the value of community vacant land adaptation. The degree of community sports land aggregation is not only related to the type of land itself but also needs to be combined with the needs of community sports facilities themselves [15]. The current degree of distance aggregation of community sports facility utilization is expressed using the homogeneity index, assuming the current grid is a central grid and all sports land within a certain unit with the same window is the domain homogeneity index. Using the eight-neighborhood approach, the spatial aggregation of community sports facility sites can be expressed as
(2)FJ=∑i=1I∑l=1LUkil8.Using a normalization process, this index is all less than 1. The closer to 1, the higher the degree of aggregation of land for community sports facilities. When allocating land for sports facilities, multiple objectives need to be achieved, and in application, heuristic information functions need to be created [16]. In this paper, a method of transforming it into a single objective is used to evaluate the dominant ant in the analysis. Combined with community building requirements, sports facility collocation needs to meet area requirements as well as terrain requirements. In the area constraint, it is required to be able to meet the actual available area situation, and the constraint is expressed as
(3)Areamaxk>∑i=1I∑l=1LXilk>Areamink,wheremax denotes the maximum area available for community sports facilities and min denotes the minimum area available for community sports facilities. The conversion of land for community sports facilities needs to comply with the relevant regulatory requirements and also needs to meet the needs of the community sports facilities themselves [17]. The constraint is expressed as
(4)Tkqil=1,k⟶Pallowed,0,else.


### 3.2. Improvement of the Ant Colony Algorithm

The ant colony algorithm used in the community sports facility configuration optimization has a memory function that enables it to find the next path based on the path taken, without choosing it again; it has a global communication capability that allows it to leave pheromones behind when constructing paths, giving priority to paths with high concentration and thus achieving optimal path design [18]. Ant colony algorithms show greater advantages in terms of communication as well as computation. However, there are certain problems with the ACO in community sports facility configuration optimization. The algorithm requires a long running time, each step needs to be calculated as a probability before the next path can be selected, the algorithm is too complex, and the large scale of community sports facility configuration further increases the computational difficulty [19]. Ant colony algorithm has the characteristics of positive feedback. The pheromones in the initial environment are exactly the same. Ants almost complete the construction of solutions in a random way. These solutions will inevitably have advantages and disadvantages. During pheromone updating, ant colony algorithm leaves more pheromones on the path of the optimal solution, and more pheromones attract more ants. This positive feedback process rapidly expands the initial difference and guides the whole system to evolve towards the optimal solution. Although positive feedback makes the algorithm have a better convergence speed, if the better solution obtained by the algorithm at the beginning is a suboptimal solution, then positive feedback will make the suboptimal solution quickly take advantage, making the algorithm fall into local optimization and difficult to jump out of local optimization [20]. This paper therefore makes improvements when utilizing the ant algorithm, with pheromones being used in both random and assigned ways. Specifically, the ant-specific values are limited to 0 to 1, and the other pheromones are assigned.In the update of the pheromone, the ant transfer probability is introduced. Because the pheromone and heuristic information of different paths are different, the probability of transferring to each path is also different. Specific implementation can use roulette selection. The greater the transfer probability, the more ants will choose the path. And based on this idea, the adaptation of the sentence layout calculation method is determined, where paths are continuously selected and the pheromone is continuously updated, and the formula is expressed as(5)τil=pil,pil<p0,(6)τil=1−ξτil+Δτil,Δτil=τcbestl−τilτcbestl.If the updated data range is more than 0 to 1, it is assigned a random value, or if it is 0, it takes the value 0.001. The smaller the critical value of the transfer probability, the closer it is considered to be to the optimal solution. When the transfer probability is less than the critical value, the pheromone close to the optimal solution is retained; otherwise, the data is updated. The smaller the pheromone volatility coefficient, the more data is retained. To ensure that the updated information has a stronger randomness characteristic, the variable coefficient needs to be changed, and the formula is expressed as(7)c=0.2,1≤k≤K/4,0.5,K/4<k<K/2,0.8,K/2≤k<3K/4,1,else,where c is the variable coefficient and k is the number of iterations. In the calculation of the core function, the heuristic information function will directly influence the next path and is also the core function of this algorithm. In the single objective problem processing, the function formula is expressed as
(8)yil=1dil,where i denotes the community sports facility where it is currently located, l denotes the community sports facility that it wants to visit next, d denotes the distance between these two community sports facilities, and y denotes the heuristic function. This information function transforms the problem into an objective-maximizing solution, finding the next community sports facility to be visited in a global context through greedy thinking. However, in the configuration of community sports facilities, which is multiobjective optimization, even for small spatial configurations, several factors need to be considered, so this heuristic information function is essential and will directly affect the calculation of the optimal solution.In the community sports facility mix setting, the corresponding type of configuration for each sports facility requires consideration of objectives of different levels of importance. After the scalable system, all objectives can be transformed into maximization solution problems, so the use of optimized multiobjectives in heuristic function selection can satisfy all objective requirements. Assuming that there areN objective functions, the heuristic information function can be expressed as the following equation:
(9)ykpil=∏n=1Nykpnil.In the positive feedback mechanism of the ant colony algorithm, the pheromone update function is the central problem. In foraging, the pheromone left behind by ants is not fixed and evaporates as time changes, and the ants preferentially choose the high concentration to achieve communication. The ant colony algorithm simulates this process by constructing a function after each iteration, which is then updated at the next iteration, with the basic function expressed as(10)τilt+1=1−ξτilt+Δτilt,where ρ denotes the pheromone volatility factor, ranging from 0 to 1, i and j both denote community sports facilities, and t denotes the number of iterations. If the ant has not walked the path, the pheromone takes the value of 0. If it has walked the path, the pheromone is expressed as
(11)Δτilt=Qdil.The need to satisfy multiobjective characteristics in sports facility collocation, allocating each community sports facility to the corresponding land, does not strictly guarantee that the optimal solution is obtained, so it also needs to be updated using a greedy algorithm, with the formula expressed as(12)Δτkpilt=Qtykpil,where Q denotes the pheromone intensity factor. At this point, the pheromone update function is changed and the equation is as follows.
(13)τijt+1=1−ξτilt+∑m=1MΔτkpilt,whereM denotes the colony size. In the basic ant colony algorithm, the next community sports facility reached is selected based on a probability transfer function which can be expressed as the following equation.
(14)pilkt=τilatyilβt∑τirβtyilβt,l∉tabuk,0,else,wherep represents the probability of an ant moving from a community sports facility to a community sports facility. For the optimal pairing of community space sports facilities, which occurs only in the current space and does not affect other areas, the probability function can be adjusted slightly and the equation is
(15)pkpmilt=τkpiltctτkpailt1−a∑τksiltaτksmilt1−a,i,l∈tabua,0,else,wheretabu denotes the space of sports facilities already visited by ants. The process of sports facility collocation based on the improved ant algorithm is shown in Figure 2, which only requires the continuous generation of optimization solutions to achieve collocation optimization.Figure 2
Sports setting matching process based on improved ant algorithm.This improved algorithm has numerous parameters that affect performance in its application, such as ant colony size, pheromone volatility factor, and strength, all of which affect the sports facility collocation situation, none of which are currently clearly defined in this paper combined with simulation experiments to determine the important parameters. In the termination condition of the ant colony algorithm, there is currently no clear standard, and it is generally considered that the algorithm ends after a limited number of iterations have been exceeded or has converged. Considering the multiobjective optimization characteristics of sports facility collocation, the Pareto optimal solution is used as the iteration termination condition.


## 3.1. Community Sports Facility Collocation Model

Community sports facilities are closely related to the living standard of residents. There are many problems in many communities, such as less sports facilities, aging facilities, low utilization rate, and remote location, especially the problems of old communities are more prominent. To solve these problems, we need to strengthen the construction of community sports facilities according to the actual situation and constantly improve the utilization efficiency to meet the sports and fitness needs of residents. A popular community sports ground is often an important place for residents to communicate. Community sports facilities are close to residents. In the long run, building and using community sports facilities can not only improve residents’ physique but also help to build a harmonious community relationship. In the current construction of facilities, they are mostly in line with the construction of sports facilities within the community, covering indoor fitness places (gymnasiums), outdoor fitness places (badminton places, basketball courts, football fields, walking places, children’s play facilities, etc.), emergency shelter places, etc. Common community sports facilities cover space walkers, spinning machines, Tai Chi frames, upper limb tractors, etc. In the early stages of construction, most of the facilities were built to meet national construction requirements, and the actual needs of the residents were not taken into consideration, either in terms of the matching and purchase of sports facilities or in terms of maintenance at a later stage. In setting up the collocation construction, the use of ant colony algorithm is considered to achieve the specific process shown in Figure1. The community’s sports facility site construction is collated, multiple functional units are divided, reasonable evaluation indicators are selected, weights are determined, the level of each facility is determined, and then a reasonable mix is made.Figure 1
General process of sports facility matching.To facilitate the analysis, the community sports area as a whole was divided into regular grids, on top of which the corresponding sports sites needed to be allocated [14]. Specifically, they are divided into five categories, namely, ball, indoor land, general land for residents’ exercise, children’s land, and others. It is assumed that the grid land type is denoted by G and the number of iterations is denoted by t. As the land resources for community sports facilities are very limited and the allocation of resources is not uniform, so the degree of adaptation is different. In the design of the sports facility’s collocation is to allocate the land area to different community sports facilities under the guidance of the optimization objective. The scientific allocation based on land resources is reasonable and can meet the needs of community sports facility collocation to the greatest extent. The community area adaptability function can be expressed as
(1)FS=∑i=1I∑l=1LSkil,where S denotes the value of community vacant land adaptation. The degree of community sports land aggregation is not only related to the type of land itself but also needs to be combined with the needs of community sports facilities themselves [15]. The current degree of distance aggregation of community sports facility utilization is expressed using the homogeneity index, assuming the current grid is a central grid and all sports land within a certain unit with the same window is the domain homogeneity index. Using the eight-neighborhood approach, the spatial aggregation of community sports facility sites can be expressed as
(2)FJ=∑i=1I∑l=1LUkil8.Using a normalization process, this index is all less than 1. The closer to 1, the higher the degree of aggregation of land for community sports facilities. When allocating land for sports facilities, multiple objectives need to be achieved, and in application, heuristic information functions need to be created [16]. In this paper, a method of transforming it into a single objective is used to evaluate the dominant ant in the analysis. Combined with community building requirements, sports facility collocation needs to meet area requirements as well as terrain requirements. In the area constraint, it is required to be able to meet the actual available area situation, and the constraint is expressed as
(3)Areamaxk>∑i=1I∑l=1LXilk>Areamink,wheremax denotes the maximum area available for community sports facilities and min denotes the minimum area available for community sports facilities. The conversion of land for community sports facilities needs to comply with the relevant regulatory requirements and also needs to meet the needs of the community sports facilities themselves [17]. The constraint is expressed as
(4)Tkqil=1,k⟶Pallowed,0,else.


## 3.2. Improvement of the Ant Colony Algorithm

The ant colony algorithm used in the community sports facility configuration optimization has a memory function that enables it to find the next path based on the path taken, without choosing it again; it has a global communication capability that allows it to leave pheromones behind when constructing paths, giving priority to paths with high concentration and thus achieving optimal path design [18]. Ant colony algorithms show greater advantages in terms of communication as well as computation. However, there are certain problems with the ACO in community sports facility configuration optimization. The algorithm requires a long running time, each step needs to be calculated as a probability before the next path can be selected, the algorithm is too complex, and the large scale of community sports facility configuration further increases the computational difficulty [19]. Ant colony algorithm has the characteristics of positive feedback. The pheromones in the initial environment are exactly the same. Ants almost complete the construction of solutions in a random way. These solutions will inevitably have advantages and disadvantages. During pheromone updating, ant colony algorithm leaves more pheromones on the path of the optimal solution, and more pheromones attract more ants. This positive feedback process rapidly expands the initial difference and guides the whole system to evolve towards the optimal solution. Although positive feedback makes the algorithm have a better convergence speed, if the better solution obtained by the algorithm at the beginning is a suboptimal solution, then positive feedback will make the suboptimal solution quickly take advantage, making the algorithm fall into local optimization and difficult to jump out of local optimization [20]. This paper therefore makes improvements when utilizing the ant algorithm, with pheromones being used in both random and assigned ways. Specifically, the ant-specific values are limited to 0 to 1, and the other pheromones are assigned.In the update of the pheromone, the ant transfer probability is introduced. Because the pheromone and heuristic information of different paths are different, the probability of transferring to each path is also different. Specific implementation can use roulette selection. The greater the transfer probability, the more ants will choose the path. And based on this idea, the adaptation of the sentence layout calculation method is determined, where paths are continuously selected and the pheromone is continuously updated, and the formula is expressed as(5)τil=pil,pil<p0,(6)τil=1−ξτil+Δτil,Δτil=τcbestl−τilτcbestl.If the updated data range is more than 0 to 1, it is assigned a random value, or if it is 0, it takes the value 0.001. The smaller the critical value of the transfer probability, the closer it is considered to be to the optimal solution. When the transfer probability is less than the critical value, the pheromone close to the optimal solution is retained; otherwise, the data is updated. The smaller the pheromone volatility coefficient, the more data is retained. To ensure that the updated information has a stronger randomness characteristic, the variable coefficient needs to be changed, and the formula is expressed as(7)c=0.2,1≤k≤K/4,0.5,K/4<k<K/2,0.8,K/2≤k<3K/4,1,else,where c is the variable coefficient and k is the number of iterations. In the calculation of the core function, the heuristic information function will directly influence the next path and is also the core function of this algorithm. In the single objective problem processing, the function formula is expressed as
(8)yil=1dil,where i denotes the community sports facility where it is currently located, l denotes the community sports facility that it wants to visit next, d denotes the distance between these two community sports facilities, and y denotes the heuristic function. This information function transforms the problem into an objective-maximizing solution, finding the next community sports facility to be visited in a global context through greedy thinking. However, in the configuration of community sports facilities, which is multiobjective optimization, even for small spatial configurations, several factors need to be considered, so this heuristic information function is essential and will directly affect the calculation of the optimal solution.In the community sports facility mix setting, the corresponding type of configuration for each sports facility requires consideration of objectives of different levels of importance. After the scalable system, all objectives can be transformed into maximization solution problems, so the use of optimized multiobjectives in heuristic function selection can satisfy all objective requirements. Assuming that there areN objective functions, the heuristic information function can be expressed as the following equation:
(9)ykpil=∏n=1Nykpnil.In the positive feedback mechanism of the ant colony algorithm, the pheromone update function is the central problem. In foraging, the pheromone left behind by ants is not fixed and evaporates as time changes, and the ants preferentially choose the high concentration to achieve communication. The ant colony algorithm simulates this process by constructing a function after each iteration, which is then updated at the next iteration, with the basic function expressed as(10)τilt+1=1−ξτilt+Δτilt,where ρ denotes the pheromone volatility factor, ranging from 0 to 1, i and j both denote community sports facilities, and t denotes the number of iterations. If the ant has not walked the path, the pheromone takes the value of 0. If it has walked the path, the pheromone is expressed as
(11)Δτilt=Qdil.The need to satisfy multiobjective characteristics in sports facility collocation, allocating each community sports facility to the corresponding land, does not strictly guarantee that the optimal solution is obtained, so it also needs to be updated using a greedy algorithm, with the formula expressed as(12)Δτkpilt=Qtykpil,where Q denotes the pheromone intensity factor. At this point, the pheromone update function is changed and the equation is as follows.
(13)τijt+1=1−ξτilt+∑m=1MΔτkpilt,whereM denotes the colony size. In the basic ant colony algorithm, the next community sports facility reached is selected based on a probability transfer function which can be expressed as the following equation.
(14)pilkt=τilatyilβt∑τirβtyilβt,l∉tabuk,0,else,wherep represents the probability of an ant moving from a community sports facility to a community sports facility. For the optimal pairing of community space sports facilities, which occurs only in the current space and does not affect other areas, the probability function can be adjusted slightly and the equation is
(15)pkpmilt=τkpiltctτkpailt1−a∑τksiltaτksmilt1−a,i,l∈tabua,0,else,wheretabu denotes the space of sports facilities already visited by ants. The process of sports facility collocation based on the improved ant algorithm is shown in Figure 2, which only requires the continuous generation of optimization solutions to achieve collocation optimization.Figure 2
Sports setting matching process based on improved ant algorithm.This improved algorithm has numerous parameters that affect performance in its application, such as ant colony size, pheromone volatility factor, and strength, all of which affect the sports facility collocation situation, none of which are currently clearly defined in this paper combined with simulation experiments to determine the important parameters. In the termination condition of the ant colony algorithm, there is currently no clear standard, and it is generally considered that the algorithm ends after a limited number of iterations have been exceeded or has converged. Considering the multiobjective optimization characteristics of sports facility collocation, the Pareto optimal solution is used as the iteration termination condition.


## 4. Result Analysis and Discussion

### 4.1. Simulation Analysis of Ant Colony Algorithm

Simulation experiments are used to optimize the design of the parameters of the ant colony algorithm, using arithmetic examples to carry out the calculations, containing 15 sets of arithmetic examples of 100 each. The strong heterogeneous problem was selected and the initialization parameters were set to 1, 20, and 40, and each calculation was performed 10 times and the average value was taken. Using the segmentation method to select the volatile coefficient, the algorithm proposed in this paper is compared with genetic algorithm, forbidden search algorithm, and heuristic algorithm to calculate the space utilization, and the comparison results are shown in Figure3. As the number of rectangular blocks continues to increase, the heterogeneity increases and the utilization rate decreases, indicating that the improved algorithm has a greater advantage in the heterogeneous arithmetic case.Figure 3
Layout results under different functions.The size of the colony affects the utilization rate, as does the number of iterations. Simulations were carried out using some of the arithmetic examples and the results of the measurements are shown in Figure4. After 40 iterations, the curve gradually stabilized, indicating that convergence had been reached. The relationship between utilization and colony size was then analyzed, and it was found that utilization did not show an increase as the size increased, with the highest utilization occurring at an even number of iterations.Figure 4
Impact of utilization and number of ants on iteration.In the optimal solution search process, the ant size affects the path collocation, so the ant size will affect the effect of community sports facility collocation. The performance of the algorithm is measured by changing the size and keeping other parameters constant, and the results are shown in Figure5. It can be seen that when the number of ants is 200, the optimal solution no longer changes and the algorithm time is short, and as the size increases, the consumption time starts to extend.Figure 5
Effect of different scales on performance.


### 4.2. Simulation Analysis of Community Sports Facility Collocation

In the simulation analysis of community sports facility collocation, some community sports facilities are fixed equipment and some are dynamic equipment. In the static community sports facility collocation, the arithmetic cases of SFLP are selected for simulation analysis, the number of these community sports facilities is large, the size is not easy, and the land space occupied by each is different. The corresponding parameters are adjusted for different scales of the arithmetic cases. When the number of facilities in the space does not exceed 14, the initial scale is set to 200, and the number of iterations is 100, divided into 4 quality levels. When the number of community sports facilities in the space exceeds 14, the initial scale is set to 1000, with 900 iterations. The unit distance is set to 1. The algorithm proposed in this paper is compared with other algorithms, and the results are shown in Figure6. This algorithm shows great advantages in terms of optimal solution and measurement error.Figure 6
Comparison of optimal solutions under different algorithms under static facility allocation.Community sports facilities are of different sizes and have different space requirements. Many community sports facilities can be dynamically moved in a way that the initial size is set to 200 in the performance measurement, and the community sports facilities are put into different combinations of spaces according to the space requirements. The area occupied by the community sports facilities and the aspect ratio are fixed. The change of optimal solution and running time of different algorithms is analyzed, and the measurement results are shown in Figure7. When the scale of community sports facility collocation is relatively small, the solution (diversity) that can collocate is relatively small, and the performance of the algorithm in this paper is basically the same as other algorithms at this time, and the running time is shortened.Figure 7
Comparison of optimal solution and running time under different algorithms.Considering that the optimization of community sports facility collocation is a multiobjective optimization solution problem, the algorithm performance needs to be measured. The convergence performance, the uniformity of the solution, and the range of the objective space were measured, and each group of experiments was measured five times and the average value was taken, and the results are shown in Figure8. The data show that the algorithm proposed in this paper has higher stability and can also provide more solutions for community sports facility collocation.Figure 8
Algorithm performance analysis under different examples.


## 4.1. Simulation Analysis of Ant Colony Algorithm

Simulation experiments are used to optimize the design of the parameters of the ant colony algorithm, using arithmetic examples to carry out the calculations, containing 15 sets of arithmetic examples of 100 each. The strong heterogeneous problem was selected and the initialization parameters were set to 1, 20, and 40, and each calculation was performed 10 times and the average value was taken. Using the segmentation method to select the volatile coefficient, the algorithm proposed in this paper is compared with genetic algorithm, forbidden search algorithm, and heuristic algorithm to calculate the space utilization, and the comparison results are shown in Figure3. As the number of rectangular blocks continues to increase, the heterogeneity increases and the utilization rate decreases, indicating that the improved algorithm has a greater advantage in the heterogeneous arithmetic case.Figure 3
Layout results under different functions.The size of the colony affects the utilization rate, as does the number of iterations. Simulations were carried out using some of the arithmetic examples and the results of the measurements are shown in Figure4. After 40 iterations, the curve gradually stabilized, indicating that convergence had been reached. The relationship between utilization and colony size was then analyzed, and it was found that utilization did not show an increase as the size increased, with the highest utilization occurring at an even number of iterations.Figure 4
Impact of utilization and number of ants on iteration.In the optimal solution search process, the ant size affects the path collocation, so the ant size will affect the effect of community sports facility collocation. The performance of the algorithm is measured by changing the size and keeping other parameters constant, and the results are shown in Figure5. It can be seen that when the number of ants is 200, the optimal solution no longer changes and the algorithm time is short, and as the size increases, the consumption time starts to extend.Figure 5
Effect of different scales on performance.


## 4.2. Simulation Analysis of Community Sports Facility Collocation

In the simulation analysis of community sports facility collocation, some community sports facilities are fixed equipment and some are dynamic equipment. In the static community sports facility collocation, the arithmetic cases of SFLP are selected for simulation analysis, the number of these community sports facilities is large, the size is not easy, and the land space occupied by each is different. The corresponding parameters are adjusted for different scales of the arithmetic cases. When the number of facilities in the space does not exceed 14, the initial scale is set to 200, and the number of iterations is 100, divided into 4 quality levels. When the number of community sports facilities in the space exceeds 14, the initial scale is set to 1000, with 900 iterations. The unit distance is set to 1. The algorithm proposed in this paper is compared with other algorithms, and the results are shown in Figure6. This algorithm shows great advantages in terms of optimal solution and measurement error.Figure 6
Comparison of optimal solutions under different algorithms under static facility allocation.Community sports facilities are of different sizes and have different space requirements. Many community sports facilities can be dynamically moved in a way that the initial size is set to 200 in the performance measurement, and the community sports facilities are put into different combinations of spaces according to the space requirements. The area occupied by the community sports facilities and the aspect ratio are fixed. The change of optimal solution and running time of different algorithms is analyzed, and the measurement results are shown in Figure7. When the scale of community sports facility collocation is relatively small, the solution (diversity) that can collocate is relatively small, and the performance of the algorithm in this paper is basically the same as other algorithms at this time, and the running time is shortened.Figure 7
Comparison of optimal solution and running time under different algorithms.Considering that the optimization of community sports facility collocation is a multiobjective optimization solution problem, the algorithm performance needs to be measured. The convergence performance, the uniformity of the solution, and the range of the objective space were measured, and each group of experiments was measured five times and the average value was taken, and the results are shown in Figure8. The data show that the algorithm proposed in this paper has higher stability and can also provide more solutions for community sports facility collocation.Figure 8
Algorithm performance analysis under different examples.


## 5. Conclusion

Community sports facility collocation problem can be categorized as a layout problem, which belongs to multiobjective combination optimization design, not only related to sports itself but also influenced by computer graphics and logical reasoning, which is difficult to be accurately described by a single adoption of mathematical model, and the advantages of ant colony algorithm as a combination optimization search algorithm are very obvious. Based on this, this paper researches the ant colony algorithm collocation problem of community sports settings under the environment of national fitness and uses the ant colony algorithm to establish a collocation model and reasonably allocate land space for the construction demand of community sports facilities. In the optimal design of sports facility collocation, a multiobjective function model is constructed, and the ant colony algorithm is used to analyze the problem of sports facility collocation in detail, improve the calculation and analysis of important parameters, and process the core function to transform it into the solution of a single-objective problem. The optimal number of iterations and ant population size are determined by the simulation analysis results. Simulations were conducted for both dynamic and static matching of community sports facilities, and the results show that the algorithm in this paper can ensure diversity and greater stability in matching sports facilities and at the same time can improve efficiency. It should be noted that the algorithm is improved, and this paper only optimizes the key parameters; the pheromone update method also has a great impact on the performance, and this aspect is not studied in depth, and in the spatial classification utilization, it is only classified into 5 categories, and there are many factors that actually affect the community sports facility collocation, and more data need to be further obtained for in-depth study.



---

*Source: 9789933-2022-08-03.xml*