Research on Water Quality Assessment Model Based on Improved Three-Dimensional Nemerow Index Method and Firefly Algorithm

Monitoring water quality is a subject of ongoing concern and study since water quality is closely related to human life. Although Nemerow index method is widely used in water quality assessment, the artificial threshold setting may lead to some errors. In this study, we improved the traditional Nemerow index method and built a three-dimensional water quality assessment model combined with the modified firefly algorithm (FA). Then, we applied the improved three-dimensional Nemerow index method to evaluate 100 random water samples. Compared with the traditional method, the improved one proved to be more objective, scientific and practical.


Introduction
Water quality is closely related to human health and the sustainable development of ecosystems.Water quality assessment can directly reflect the water safety situation, provide a scientific basis on rational use of water resources and prevent water pollution.Water quality assessment, as a basic issue related to human survival, has a strong theoretical and practical significance.
At present, scholars in various countries have put forward a lot of assessment methods for water quality problems, such as fuzzy comprehensive evaluation method (Fu et al., 2011), artificial neural network (Zhang, Xu, Du, & Zhang, 2013), gray clustering method (Zhou, Xu, & Sun, 2007), analytic hierarchy process (Su, Wu, & Shen, 1997), Nemerow index method (Li, Zhang, Fei, & Wang, 2009).Among them, the Nemerow index method is simple and easy to operate, which is not available in other comprehensive assessment methods (Kou et al., 2012).However, the Nemerow index method also has some flaws.For example, it doesn't consider the weights of various pollution factors.In other words, this method does not balance the effects of different pollution factors, which may have a negative impact on the accuracy of the assessment results.
Firefly Algorithm (FA) is a new swarm intelligence optimization algorithm, and it is based on the mutual attraction and movement of firefly individuals in nature (Wang & Wang, 1999).Relevant studies have shown that the firefly algorithm is very effective in searching for the global optimal solution, and the success rate is even higher than the genetic algorithm (Yang, 2010).However, at present, only a handful of scholars apply the firefly algorithm to water quality assessment (Gong et al., 2015).In this study, we will improve the traditional Nemerow index method first and then combine it with the firefly algorithm to establish a three-dimensional water quality assessment model.Through these improvements, the possible errors due to the subjective determination of water quality standards will be overcome.

The Traditional Nemerow Index Method
The Nemerow index method refers to the pollution calculation which developed by Nemerow, N. L. (1971).The traditional Nemerow index method is as follows: (a) Use the single factor index method to calculate the single pollution indexes of different pollution factors (Wang, Xia, Yu, Jia, & Xu, 2013).Obviously, the greater the Nemerow index, the more serious water pollution.Thus, we can classify the water quality according to the scope of the Nemerow index, as shown in Table 1 below.
However, the division of the scope is subjective.That means that the thresholds set by different researchers are also different.For example, the upper limit of the Nemerow index for class I water can also be set to 0.5 or 0.55.To a certain extent, it will also lead to some errors.In addition, the traditional Nemerow index method doesn't consider the weights of various pollution factors, which may have a negative impact on the accuracy of the assessment results.Therefore, we have made some improvements on the defects of the traditional Nemerow index method, and the improvements are as follows.

The Improved Three-Dimensional Nemerow Index Method
The traditional Nemerow index method does not balance the effects of different pollution factors which need to be optimized.To solve this problem, there are two main methods in this study, which are classifying the pollution factors and calculating their weights.

Classification of Pollution Factors
According to the attributes that cause water pollution, the pollution factors can be divided into three categories: metal pollutants, nonmetallic pollutants and bacterial colony.In Environmental Quality Standard for Surface Water (GB3838-2002), we select zinc element, hexavalent chromium, lead element, ammonia nitrogen, total phosphorus, sulfide and fecal coliform group as detected pollution factors.In addition, in order to make water quality assessment more comprehensive, we changed the standard concentration is C from Class III water quality standard to the average standard of the class I to V water.The categories and changed standard concentration of these pollution factors are listed in Table 2.After classification of those pollution factors, the pollution index of each category can correspond to an axis of the three-dimensional assessment space.In other words, this improvement can transform the evaluation value of the traditional Nemerow index into a point in the three-dimensional assessment space.At the same time, each dimension of the three-dimensional assessment space can reflect the pollution situation of a pollution category, which makes the water quality assessment much more scientific and intuitive.

Calculation of the Weights of Pollution Factors
Different pollution factors have different effects on the quality of water, and those pollution factors with large influence can cause great safety hazard.In short, the stricter national standards (the smaller the standard concentration), the greater the impact of the pollutants, so they should be given greater weights.
In this study, the calculation of weights within different pollution factor categories is based on the standard concentration in Table 2.The method of determining the weight is as follows.(Cai, Lin, Li & Lin, 2015) _  represent the single pollution indexes of zinc element, hexavalent chromium, lead element, ammonia nitrogen, total phosphorus, sulfide and fecal coliform group.

Construction of Three-Dimensional Assessment Space
As mentioned above, the pollution index of each category can correspond to an axis of the three-dimensional assessment space.In other words, this improvement can transform the evaluation value into a point in the three-dimensional assessment space.The water quality is more inclined to the concept of "class" and "group".Therefore, we again change the evaluation criteria for each class of water into a standard range, rather than the original single point in the assessment space when assessing the water quality.That is to say, we defined a standard space for each class of water, as shown in Figure 1 below.As shown in Figure 1, we also use the method described above to calculate the weights of three axes of the assessment space.Then, we extend the standard point to an ellipsoid standard space according to the weights by the appropriate proportion and make the original standard point the center of the ellipsoid standard space.
Similarly, after the transformation, standard ranges of class Ⅱ-Ⅴ water are shown in Figure 2.  As shown in Figure 3 the standard ranges of class I water to class Ⅴ water are gradually away from the origin of the coordinates, and the volume of the standard range is gradually increased.After considering the actual, we can see that the standard of class I water is the strictest, so the three categories of pollution including metal pollutants, nonmetallic pollutants and bacterial colony should be extremely slight and its change of range should be small, too.The analysis of class Ⅱ -Ⅴ water is also the same, so the determination of standard ranges in the three-dimensional assessment space is basically in line with the actual situation.

Classification of Water Quality
After determining the criteria for all classes of water quality and the corresponding standard ranges in the three-dimensional assessment space, we can import the water sample into assessment space using the data of pollution factors in water sample.Then, we can further determine which class of water level is most suitable for the water sample based on the membership between the water sample and standard ranges of class Ⅰ-Ⅴ water.
In this paper, we can use the Euclidean distance formula to measure the distance between the water sample and ellipsoid standard ranges.And the distance is correlated negatively with the degree of membership.In other words, the closer the distance, the greater the membership, and it indicates that the water sample is more in line with the class of water quality.
Where metal pollutants P , nonmetallic pollutants P and bacterial colony P represent corresponding pollution indexes.
) is a point within the ellipsoid standard range of class i water.
The classification of water quality is based on the objective attribute -Euclidean distance, rather than the thresholds set by scholars subjectively in the traditional Nemerow index method.Therefore, the improved three-dimensional Nemerow index method can overcome the weakness of the subjective nature and improve its scientific nature.
In addition, since the calculation of the membership degree involves the minimum Euclidean distance, this paper will introduce firefly algorithm (FA), a new and efficient swarm intelligence optimization algorithm, to solve the global optimization problem.First, we will apply the firefly algorithm (FA) to search for the nearest standard points (i.e. the best points) in 5 ellipsoidal evaluation spaces.Then, we can calculate the Euclidean distances between the nearest standard points and the water sample point.Last, the water quality will be classified according to the shortest Euclidean distance.

The Traditional Firefly Algorithm in in Two-Dimensional Space
The firefly algorithm (FA), a meta-heuristic algorithm formulated by Xin-She Yang, is a swarm intelligence algorithm inspired by the flashing behavior of fireflies (Yang, 2010).During the night, each firefly exchanges information with each other through the brightness of fluorescein.Under normal circumstances, the brighter firefly has stronger appeal, and it is more easily to attract other fireflies with low brightness to get close to it.Eventually, a firefly group will be comprised around the firefly with the highest brightness.
The firefly algorithm is based on the above biological behavior, and Yang formulated this firefly algorithm by assuming: all fireflies are unisex, attractiveness is proportional to their brightness and the brightest fireflies will move randomly (Yang, 2009).In the search space, the position of each firefly represents a potential solution to the optimization problem.In the calculation process, FA initially produces a group of fireflies located randomly in the search space and their positions are updated after every iteration.After sufficient iterations, all fireflies will converge to the best possible position in the search space (Gokhale & Kale, 2016).

The Improved Firefly Algorithm in in Three-Dimensional Space
At present, mostly the traditional firefly algorithm is applied in the two-dimensional space, and it has limitations in solving the problem of multi-objective optimization.Therefore, we improved the traditional firefly algorithm so that the firefly algorithm can be applied in the water three-dimensional assessment space and to search for the extreme points of the multi-objective function.
The principle of the firefly algorithm in the three-dimensional space is similar to the traditional two-dimensional firefly algorithm.We map the active area of those fireflies in the traditional two-dimensional space to the three-dimensional space.Then, those fireflies in the search space can search for the extreme points of the objective function under the constraint of the three-dimensional boundary condition.Similarly, after sufficient iterations, all fireflies will converge to the best possible position in the search space.In short, this improvement from two dimensions to three dimensions can not only make the extreme point found more accurate, but also make the algorithm closer to the biological behavior of fireflies.
In this algorithm, the reason why fireflies attract each other depends on two elements: their own brightness and attractiveness.Among them, the brightness depends on the target value of the position.The higher the brightness, the better the location, that is, the better the target value.Attractiveness is associated with brightness, and brighter fireflies are more attractive.In addition, if the brightness is the same, the fireflies will randomly move.
The distance between the firefly i and j is: The brightness S of each firefly is: The attractiveness β of each firefly is: Where 0 S presents the brightness of the brightest firefly.0 β presents the maximum attractiveness, namely, the attractiveness of the light source.
γ presents the absorption coefficient of light intensity.
After every iteration, the brightness and attractiveness of fireflies in the search space will change, so that fireflies are getting closer to the brightest firefly and locations will be updated.The formula for updating the position is as follows.
, , × is the disturbance term, which can increase the search range of fireflies to avoid falling into a local optimal solution.Among them, α presents shift factor.ε is a stochastic term obeying Gauss distribution.(Cheng, Ni & Zhu, 2015) After updating, the firefly is located at ( , , ) x y z .

Application of Three-Dimensional Firefly Algorithm in Water Quality Assessment
As described above, when judging the water sample belongs to which class of water quality, we will apply the improved firefly algorithm to search for the nearest standard points (i.e. the best points) in 5 ellipsoidal evaluation spaces first.Then, we will calculate and compare the Euclidean distances between the nearest standard points and the water sample point.Last, the water quality will be rated according to the shortest Euclidean distance.
The flow chart for finding the nearest standard point in each ellipsoidal evaluation space is shown in Figure 4 below.x y z should meet the following conditions: Where 1 1 1 ( , , ) x y z is the center of the ellipsoidal standard space.
1 1 1 , , a b c are the three semi-axes of the ellipsoidal standard space.

Determination of the Moving Direction and Distance
In this paper, we define that the fireflies closer to the water sample point are brighter and other fireflies are getting closer to the brightest firefly as the number of iterations increases.In each iteration, the moving distance depends on the attractiveness, the position before moving and the disturbance term.The specific formula is as follows.

Detection of Fireflies' Location
The moving distance d Δ involves a random disturbance term.Therefore, a few fireflies may escape from the ellipsoidal standard range.So, in order to avoid the escape of fireflies, we introduce a feedback correction mechanism.For fireflies beyond the standard range, we change their position to the intersection point between the surface of standard range and straight line passing through the water sample point and the center of the ellipsoidal standard space.
Taking the class Ⅰ water as an example, for fireflies beyond the standard range, their updated position need to meet the following equations.

Classification of Water Quality
After sufficient iterations, all fireflies will converge to the best possible position in the search space.Therefore, points congregating many fireflies in five standard spaces are the desired points (namely, the nearest standard points).Then, we can calculate and compare the Euclidean distances between the water sample point and the nearest standard points in five standard ranges.Last, the water quality will be rated according to the shortest Euclidean distance.The process is expressed in the mathematical formula blow.
Where Class presents the class of water quality and equal to the subscript of the minimum value among presents the Euclidean distance between the water sample point and the nearest standard point in the corresponding standard range.

Random Generation of Water Samples
In order to test whether the improved three-dimensional Nemerow index method based on firefly algorithm is objective, feasible and universal, we need to apply it to evaluate enough water samples from a variety of water quality environment and compare the evaluation result with the result assessed by traditional method.In this paper, we take the method of randomly generating water samples to simulate various kinds of water pollution.As described above, we select zinc element, hexavalent chromium, lead element, ammonia nitrogen, total phosphorus, sulfide and fecal coliform group as detected pollution factors and the concentration range of each factor is from 0 to 1.25 times the concentration standard of class Ⅴ water in Environmental Quality Standard for Surface Water (GB3838-2002).The concentration ranges of pollution factors are as follows: is close to the threshold we set subjectively, so the error in No.2 water sample due to the subjective determination of water quality standards is overcome through our improvements.
The analyses of other water samples are in the same way.And after counting, we found that 70 evaluation results among 100 water samples are the same.That is to say, there are no remarkable differences between these two methods, but our improved three-dimensional assessment model makes some effective improvements on the details.
In short, the traditional Nemerow index method doesn't consider the weights of various pollution factors and it is greatly affected by thresholds set subjectively, so its evaluation results may be not very accurate.However, the improved three-dimensional Nemerow index method overcomes these flaws and has a more objective evaluation for water samples around the critical point between two classes of water.So, its evaluation results are more accurate, objective, reliable and practical.

Conclusion
The traditional Nemerow index method overemphasizes the factor with the most serious pollution and does not balance the effects of different pollution factors which may lead to some evaluation biases.In this paper, we adjusted the weight of each factor according to the standard concentration in Environmental Quality Standard for Surface Water (GB3838-2002) so that our assessment model can better reflect the contribution of each factor to water quality.
In addition, the traditional Nemerow index method only uses the Nemerow index to judge water pollution and the evaluation results are greatly affected by subjective factors when judging some water samples near the critical points.In this paper, we established a three-dimensional Nemerow index model, and changed the evaluation basis from traditional Nemerow index to the shortest distance between the nearest standard point in the corresponding standard range and the water sample point.Then, in order to solve the global optimization problem (namely, to find the shortest distance), we modified firefly algorithm (FA) and applied it to our model.After validation of model, it proves that this new method effectively reduces the ambiguity of water quality evaluation results caused by subjective factors near the critical points and it can classify water quality more accurately and practically.
In our model, we applied and modified firefly algorithm (FA).And it proves that FA can be well used in water quality assessment.In future study, different parameters can be used in firefly algorithm to further improve the speed and accuracy of the calculation.
When using the improved model to evaluate specific water samples, users can select corresponding water quality standards and appropriate pollution factors flexibly according to actual situation.For example, it can also be used to evaluate underground water if we make the concentration standards in Quality Standard for Ground Water (GB/T 14848-1993) the benchmark.In addition, after some appropriate transformations, this method can also be used to evaluate air pollution and so on.So, its further studies and promotion are pretty valuable.
single pollution index of the pollution factor i .i C represents the actual concentration of the pollution factor i .isC represents the standard concentration of the pollution factor i .It is important to note that we chose the concentration standard of class Ⅲ water in Environmental Quality Standard for Surface Water (GB3838-2002) as a benchmark.(b) Calculate the Nemerow Index according to the single pollution index.maximum value of the single pollution indexes., i ave P represents the average value of the single pollution indexes.(c) Classify the water quality according to the Nemerow index of the water.
standard concentration of pollution factors within their category.is C represents the standard concentration of the pollution factor i .i w represents the weight of the pollution factor i .After calculation, weights of those pollution factors in different categories are shown in Table3below.

Figure 1 .
Figure 1.Standard range of class Ⅰ water in three-dimensional assessment space

Figure 2 .
Figure 2. Standard ranges of class Ⅱ-Ⅴ water in three-dimensional assessment space

Figure 3 .
Figure 3. Standard ranges of class Ⅰ-Ⅴ water in three-dimensional assessment space

Figure 4 .
Figure 4.The flow chart for finding the nearest standard point in each ellipsoidal evaluation space

Table 1 .
The traditional Nemerow index corresponding to different water quality

Table 2 .
Categories and standard concentration of pollution factors

Table 3 .
Weights of pollution factors in different categories Pollution indexes of metal pollutants, nonmetallic pollutants and bacterial colony are the following formulas: )

Table 4 .
Concentration ranges of pollution factors in all random water samples Comparative Analyses Between the Improved Three-Dimensional Nemerow Index Method Based on Firefly Algorithm and the Traditional MethodAccording to the concentration ranges in Table4above, we used random number generators to generate 100 water samples to simulate different degrees of pollution.Then, we applied the assessment model established above and the traditional method to analyze those samples.Here, we selected ten water samples among them to show in Table5 and Table 6 below.

Table 6 .
Analysis results of different methodsBased on the data of the Table5 and Table 6, we can see that the results of two methods are different.For example, the evaluation results of No.2 water sample are not the same.According to Environmental Quality Standard for SurfaceWater (GB3838-2002), the concentration of zinc element, hexavalent chromium, lead element, total phosphorus, sulfide and fecal coliform group in No.2 water sample all exceeds the standard concentration of class Ⅰ water.The concentration of lead element, total phosphorus and sulfide even reaches the standard concentration of class Ⅲ water.Obviously, the No.2 water sample shouldn't be rated as class Ⅰ water.Then, we can see that the distance between the nearest standard point in the standard range of class Ⅱ water and the water sample point is the shortest, followed by class Ⅲ water and class Ⅰ water.Therefore, No.2 water sample should be rated as class Ⅱ water.The evaluation result of the improved three-dimensional Nemerow index method is obviously more practical.If we make further analysis, we can find that the traditional Nemerow index Nemerow P