Cost optimization of sodium hypochlorite bleaching washing for denim by combining ensemble of surrogates with particle swarm optimization

Sodium hypochlorite bleaching washing process has been broadly carried out in denim garment industrial production. However, the quantitative relationships between process variables and bleaching performances have not been illustrated explicitly. Hence, it is impractical to determine values of the variables that can achieve the optimal production cost while satisfying the requirements of customers. This paper proposes an optimization methodology by combining ensemble of surrogates (ESs) with particle swarm optimization (PSO) to optimize production cost of chlorine bleaching for denim. The methodology starts from the data collections by conducting a Taguchi L25 (56) orthogonal experiment with the process variables and metrics for evaluating bleaching performances. Based on the data, the quantitative relationships are separately constructed by using RBFNN, SVR, RF and ensemble of them. Then, accuracies of the surrogates are evaluated and it proves that the ESs outperforms the others. Later, the production cost optimization model is proposed and PSO is utilized to solve it, while a case study is given to depict the optimization process and verify the effectiveness of the proposed hybrid ESs-PSO approach. Overall, the ESs-PSO approach shows great capability of optimizing production cost of sodium hypochlorite bleaching washing for denim.


Introduction
Denim garment has gained popularity for a long time, its various styles are mainly created by unique washing techniques in the manufacturing process. The so-called washing techniques can realize "worn" or "vintage" looks on denims by destructing dyes or removing surface fibres. [1][2][3] Over the past few decades, different washing techniques have been developed to create varied designs of denim garments, some normally used applications were summarized Cost optimization of sodium hypochlorite bleaching washing for denim by combining ensemble of surrogates with particle swarm optimization by Kan. 4 Among various washing techniques, the sodium hypochlorite bleaching washing, also named as chlorine bleaching, has been applied for a long time, and it still plays a dominant part in industrial production because of fine performances. Some related researches 4-6 had indicated the chlorine bleaching effect mainly depends on sodium hypochlorite quantity, temperature and treatment time. However, few previous works constructed a quantitative mapping model between input variables and washing effects, which results in that the trial-and-error method is still extensively conducted in the chlorine bleaching process for denim garment production, and may bring about a great waste of resources in some extent. Besides, production cost reduction is always one of the most interesting topics in industry, lacking quantitative mapping model makes it impossible to determine the optimal process parameters achieving the least cost.
In order to figure out the quantitative relationships between the inputs of process variables and outputs of performances, adopting surrogate models, also named as approximation models, is a promising strategy. Surrogate models, which are constructed by some techniques in the field of machine learning, are utilized to replace analytical models basing on physical or chemical laws that are difficult to gained. In the previous studies, Xu et al. 1 adopted Kriging model to illustrate the effect of enzyme washing parameters on denim fabrics. He et al. 7 separately utilized extreme learning machine, support vector regression and random forest to model the ozonation process of treated dyed textiles, and given the conclusion that SVR would be more recommended. Artificial neural networks (ANN) approach is one of the most commonly used machine learning methods. Hung et al. 8,9 adopted ANN to predict colour properties of laser-treated fabrics. Tadesse et al. 10 and Yu et al. 11 applied ANN for comfort of fabrics. ANN were also extensively conducted to evaluate fabric properties [12][13][14][15] and other aspects in yarn and fabric processes. 16,17 The above researches do help to unveil quantitative relationships between process variables and performances in varied textile problems, but how to choose the most appropriate surrogate model for an unexplored engineering problem based on incomplete information is a thorny question. In addition, all of the above-mentioned researches adopted a stand-alone surrogate which can perform well based on the specific problem property and existing training samples, but it cannot guarantee the selected surrogate is still available for other data or problems. In order to overcome the existing shortcomings, this paper integrates three commonly used surrogate models, including random forest (RF), radial basis function neural network (RBFNN) and support vector regression (SVR), to construct an ensemble of surrogates (ESs) to fit the relationship between inputs of chlorine bleaching process variables and outputs of performances, which synthetically integrates advantages of the independent surrogates and balances the prediction abilities under different conditions. In addition, based on the proposed ESs, an optimization model for achieving the least cost in the chlorine bleaching production is developed, and the particle swarm optimization (PSO) algorithm is applied to solve the optimization model so as to obtain the optimal parameter combination. The above two novelties are merged to form a hybrid framework, namely ESs-PSO, that can be applied to reduce production cost in denim garment production. Moreover, in order to prove effectiveness of the proposed hybrid framework of ESs-PSO, verification experiments are conducted and demonstrate it do help to cut costs of chlorine bleaching in actual work.
The rest parts of this paper are organized as follows: In section 2, details of the experimental works for collecting data are presented. In section 3, the proposed hybrid framework of ESs-PSO is introduced. In section 4, the prediction ability of the constructed ESs is discussed, and the parameters optimization for production cost are subsequently demonstrated. Lastly, a conclusion is given in section 5.

Materials and fabric preparation
Indigo dyed denim fabrics consisting of 100% cottons were desized for 15 min in the liquor containing desizing agent (1 g/L) and soda ash (1 g/L) under conditions of material to liquor ratio of 1:30 and temperature 50°C. Specifications of the selected fabric samples are described in Table 1.

Procedure of chlorine bleaching
The chlorine bleaching was carried out in an industrial sample washing machine (GX-50, Jun Sheng, China). In the process, material to liquor ratio was settled as 1:30, concentrations of anti-back staining agent (1.0 g/L) and NaOH (2.0 g/L) were fixed. Three critical variables, including concentration of sodium hypochlorite (abbreviated as CSH, 10-50 g/L), temperature (abbreviated as TEMP, 20°C-60°C) and treatment time (abbreviated as TT, 10-50 min), were conducted in varied levels to build data set. After desired chlorine bleaching, the samples were rinsed two times with clean water. Finally, all of washed samples were dehydrated in a hydroextractor machine at 200 rpm for 4 min and dried up in a steam dryer at 75°C for 20 min.

Measurements of chlorine bleaching performance
Performances of the bleached denim fabrics were measured by colour strength, bending stiffness and tensile strength.
Colour strength, which is usually indicated by K/S value derived from Kubelka-Munk theory, 18 was adopted to evaluate effects of discoloration (realizing 'worn' look) caused by chlorine bleaching, and determined by an X-rite Colour I-7 spectrophotometer (X-Rite, USA) in this study. Bending stiffness is a commonly used indicator of assessing fabric style, and it was obtained by stiffness tester (YG522, China) on the basis of ASTM standard D 1388-2008. Tensile strength is an essential component to evaluate wear-ability, which was acquired by performing the strip method according to ASTM standard D 5035-1995. Warp and weft directions of denim fabrics are different due to their 3/1 twill structure and different yarns, so the test method was conducted to identify tensile strength of each sample in warp and weft directions separately. In addition, according to the requirements of the ASTM standard D 1776-2008, all the samples were conditioned at 20°C ± 2°C and at 65% ± 2% relative humidity for 24 h in the laboratory before conducting above-mentioned tests.

Experiment design
In this work, in order to balance between errors and efficiencies of building surrogates, Taguchi method 19 was utilized for generating limited sample points with uniformly space-filling properties. Three critical factors (including TEMP, CSH, TT) were partitioned into five levels to fill the design space, and the adopted L 25 (5 6 ) with profiles of the performances of 25 chlorine bleaching experiments are listed in Table 2. In addition, two more sample points, which located in the corner of the design space, were gained for further filling to make up for insufficient sampling. Besides, five other points were randomly sampled for verifying the accuracy of the surrogates.

Background of the proposed hybrid framework
The proposed hybrid framework of ESs-PSO is used to purse the optimal cost of chlorine bleaching production. In this section, the details of the framework are explained as follow: Section 3.1 describes the background of the ingredients of the ESs, including RBFNN, SVR and RF; Section 3.2 introduces how to integrate the stand-alone surrogates together; Section 3.3 presents an introduction of PSO; Section 3.4 gives the description of how the proposed ESs-PSO works.

Background of the stand-alone surrogates
Radial basis function neural network (RBFNN). Radial basis function (RBF) surrogate is one kind of feed forward neural network which utilizes radial basis functions as activation functions. Typical RBF network has a three-layers architecture: an input layer, a hidden layer with RBF activation functions and an output layer. Based on the architecture, the output of RBF surrogate is regarded as a linear combination of some RBFs with weight coefficients and depicted by where x is a vector of variables, m is the number of neurons in the hidden layer decided by users, u i is the centre vector for neuron i, and x u i − denotes the Euclidean distance between variables and the centre vector of the i-th neuron defined by • refers to RBF and is taken to be Gaussian in this study, thus (1) is the weight of neuron i for the linear combinations, which are decided by training samples (x, y). If m equals to the number of sample points, the w i can be obtained by where  is a diagonal matrix with regularization parameters along its principal diagonal. δ is a matrix illustrated as follow: Support vector regression (SVR). Support vector regression derives from the principles of support vector machine (SVM) based on statistical learning theory. SVM is commonly used for classifications, it constructs an optimal hyperplane to separate data points into two classes by maximizing the margin between them. SVR also builds a hyperplane, but, in contrast, the constructed optimal hyperplane keeps close to as many data points as possible. A frequently used SVR is ε -insensitive SVR ( ε -SVR) that tries to find a hyperplane having ε deviation in maximum from the actual targets y i for all training data and as flat as possible.
The case of linear regression can be depicted as where w x , is the dot product between weight vector w and input vector x, and b is the bias term. Flatness of the hyperplane means a small w in equation (6), and the route achieving it is to minimize the Euclidean norm, that is, 1 2 2 w , which can be converted to a convex optimization problem and solved by Lagrange multiplier method. The equation (6) finally can be rewritten as equation (7) which is so called support vector expansion For nonlinear regression, SVR utilize kernel function K x x i , ( ) to map x from ℝ n to a higher dimensional feature space to achieve it. Thus, equation (7) can be easily rewritten as below for nonlinear regression.
where the kernel function k x x i , ( ) replaces the linear dot product in equation (8). Some commonly used kernel functions as below: Sigmoid t anh : , Radial basis function RBF Exponential Radial basis function ERBF ( ) In this study, RBF kernel was adopted for nonlinear regression, and parameters were optimized by the approach 20 using leave-one-out method.
Random forest (RF). Random forest is commonly used for regressions, classifications and cluster problems, which is a combination of multiple decision tree predictors depending on values of randomly sampled vectors with the identical distribution. In RF, predictions are conducted by a simple unweighted average over a series of independently grown trees {h(x,Θ k )} as equation (13) shown.
where k = 1, 2, . . ., N is the number of trees, x indicates the input vector, Θ represents the mentioned randomly sampled vector. In the construction of RF, firstly, the algorithm randomly draws ntree bootstrap samples from the data with replacement. Then, the same number of regression trees grow from the root node to the leaf nodes by splitting the data into partitions in the light of the Gini index with the least value: where f t j indicates the proportion of samples that belongs to the leaf j as node t and has the value x i . In this study, Treebagger function in Matlab was employed with two optimized parameters in terms of the number of trees in the forest and the minimum number of samples in the leaf node.

Ensemble of surrogates (ESs)
An ensemble of surrogates synthetically combines the separated stand-alone surrogates in order to balance the prediction abilities under different conditions and improve the generalization ability. For constructing an ESs, the weighted combination is the most frequently adopted method and defined as below: where g x  em ( ) indicates the predicted responses of ESs, are the predicted values of standalone surrogates, in this paper, which refers to RBFNN, SVR and RF, and consequently, n =3 in here that denotes the number of surrogates participating in the weighted average, w i presents the weight factors of each surrogate in the ensemble and must satisfy the constraint as below: The key in constructing the ESs is to determine weight factors, and the basic principle is that the participant with high accuracy has large weight factor and vice versa. Optimal w i can make the ESs own the highest accuracy which is commonly assessed by using generalized mean square leave-one-out errors (GMSE LOO ) defined as follow: The optimal w i can be achieved by solve equation (18), but unlike the optimization problem in SVR, the problem in here is not always a convex optimization, thus Lagrange multiplier method cannot be applied. In this study, particle swarm optimization (PSO), one of evolutionary computing algorithms, was conducted to search the best w i .

Particle swarm optimization (PSO)
Particle swarm optimization, which was first introduced by Kennedy and Eberhart, 21 has gained great popularity as one kind of the population-based evolutionary optimization algorithms, and has many variants applied in various areas. 22 PSO is originally based on a simplified social model, as a representation of the searching food behaviour in a flock of bird. In this model, each bird is referred as a particle representing a potential feasible solution, and utilized its own memory and information acquired from the swarm to forage for the location of the food (referred as the global optimal solution here). The process of searching for the optimal solution is stochastic in the beginning, and the current position (referred as the fitness) of each particle has been repeatedly updated by velocity vectors and the regions were previously discovered by the swarm until the optimum is found. The outline of a basic PSO algorithm is illustrated in Figure 1 and described as follow: 1. Initialize a group of particles by randomly distributing the design space.

Calculate velocity vectors of particles in the swarm.
The adopted scheme of calculating velocity vector was introduced by Shi and Eberhart 23 : where v k i +1 is the velocity vector of particle i at iteration k+1, x k i represents the position of particle i at iteration k, p i is the best position discovered by particle i until now, and p k g indicates the global best position found by the swarm, while rand() is a generator that can produce random number between 0 and 1, c 1 and c 2 are two positive constant. w is a inertia weight to balance global search and local search.
3. Update position of each particle by utilizing updated velocity vector and previous found position.
The scheme for updating position is as follow 4. Return to step 2 and repeat until convergence.

The proposed hybrid ESs-PSO method
In this section, a hybrid framework consisting of ensemble of surrogates and PSO algorithm (ESs-PSO) is proposed to find out optimal chlorine bleaching cost. The ensemble of surrogates, that integrates RSM, RBFNN and SVR by minimizing GMSE LOO , is utilized to construct quantitative relationships between the inputs of bleaching parameters and outputs of performances, and the developed relationships are considered as constrains in the chlorine bleaching cost optimization model, while PSO algorithm is applied to facilitate GMSE LOO minimization and optimal cost search. The flowchart of chlorine bleaching optimization procedure is demonstrated in Figure 2 and illustrated as follow: 1. Define the chlorine bleaching optimization problem including objective function, constrains, design variables and corresponding ranges; 2. Conduct experiments at points generated by Taguchi method to acquire corresponding performances; 3. Construct relationships by three stand-alone surrogates, including quadratic polynomials, radial basis function neural network and support vector regression; 4. Create ensembles of the constructed surrogates by using PSO algorithm to minimize generalized mean square leave-one-out errors and obtain the weights of each surrogate; 5. Check whether the accuracy of the constructed ensembles of surrogates is in the range of the errors permitted or not. If yes, the obtained ensembles can be utilized as constrains for the chlorine bleaching cost optimization, otherwise, go back to Step 3 to adjust parameters of stand-alone surrogates; 6. Utilize PSO algorithm to seek the optimal cost under the constrains. During the optimization, the value of constrains are predicted by the constructed ensembles. 7. Output the process parameters under the optimal cost and conduct verifications.

Performance evaluation
In order to evaluate performances of the proposed ESs, mean relative absolute error (MRAE) is adopted for demonstrating the predictive performance of each surrogate.
where N is the number of samples for the verification, y i  and y i represent the predicted response and observed value at the sample point i, respectively. Meanwhile, two  other measures, which are root mean square error (RMSE) and maximum relative absolute error (MaxRAE), are also used for indicating overall and partial accuracies of the surrogates, respectively, the formulations of the two measures are listed as follow MaxRAE y y Five sample points were chosen randomly (as shown in Table 2) and corresponding experiments were conducted for validations.
Comparisons were also conducted for proving effectiveness of the ensemble of surrogates, the components of the ESs, including SVR, RF and RBFNN, that are standalone surrogates and commonly used in other researches, are selected for comparisons. In addition, another frequently used stand-alone surrogate in the textile related research, response surface methodology 24,25 (RSM), specifically quadratic polynomial in here, is also chosen as the contrast. Table 3 presents the performances of the ESs and stand-alone surrogates in terms of the above evaluation measures, while the best performance in each row is shown in bold italic and the second best one is shown in italic. In addition, Figure 3 illustrates the predicted responses of the ESs and its components versus the observed values.
As can be seen in Table 3 and Figure 3, for the contrasts of RBFNN, SVR and RF, which are components of the ESs, the ESs performed best for most profiles of washing effect besides bending stiffness, which indicates that the ESs approach does largely reduce confusions of selecting appropriate surrogate. The main reason why ESs only obtained suboptimal results for bending stiffness was the RF performed much better that other two stand-alone surrogates, which resulted in that the RBFNN and SVR became drags on the ensemble. However, in the rows of bending stiffness in Table 3, we can find the distinction between MRAE of RF and ESs (RF: 0.0199, ESs: 0.0224) are not statistically significant, in other words, although ESs did not achieve the best, it is still a good choice for  Because of the good performances of the ESs, the quantitative relationships between process variables and different profiles of washing effect are respectively illustrated by ESs and plotted in Figure 4. From the Figure 4, we can easily find that the changes of all bleaching performances in accordance with the variations of any input variation in the defined ranges, although seldom dramatic fluctuation is existing. However, the influences of each variable on performances of bleaching are different. Hence, analysis of variance (ANOVA) was conducted to depict the main effects of the process variables and demonstrated in Figure  5. The magnitude of the bars presents its degree of influence to the bleaching performances, and the followed values are p-values calculated by ANOVA which provide references for determining whether variables have meaningful effects on results.
From Figure 5, we can find that the influences derived from TEMP on all profiles are the most obvious, and this phenomenon is in accordance with the results achieved in the work of Simpson and Riggs. 6 The main reason of this phenomenon may be that relatively high temperature will promote the hydrolysis reaction of NaClO and produce more ClO-which has strong ability of oxidizing. On the contrary, the treatment time has the least contributions in most situation, which is owing to that the bleaching effects of sodium hypochlorite can last for a long time (up to 16 h or even more), and the most significant effect usually appears after 1 h or later. 6 However, in actual production, long treatment time is not permitted because of the low efficiency, thus TT has less contributions compared with the other two variables in the selected ranges.
The production cost optimization was completed by PSO, which was coded in MATLAB2019a software. The iteration curve of calculating object function is plotted in Figure 6. The calculated minimum f cost was 0.6320 with corresponding values of x TEMP , x CSH and x TT were 60°C, 38 g/L and 30 min. The calculation time was 6.03 s under computer configurations: CPU: i7-6560U@ 2.2 GHz, RAM:8G.
An experiment was carried out to verify validity of the result generated by the ESs-PSO. An unwashed denim sample was bleached as procedures listed in section 2 with x TEMP , x CSH , x TT adopting 60°C, 38 g/L and 30 min, and the unwashed and bleached samples are shown in Figure 7. After bleaching, colour strength (K/S), bending stiffness, tensile strength in warp and weft directions were test, and results were 9.37, 52 mN cm, 1032.61 N, 318.05 N versus the predicted values by the ESs 10.08, 50.99 mN cm, 994.86 N and 304.74 N, respectively. It is obvious that the bending stiffness, tensile strength in warp and weft directions satisfied technical specifications. The error of the colour strength (K/S) was 6.3%, but it was still in the allowable range. The result of the validation experiment demonstrates that the proposed ESs-PSO approach is effective and can be used to facilitate actual sodium hypochlorite bleaching washing production.

Conclusions
In this paper, a hybrid approach combining ensemble of surrogates and particle swarm optimization is proposed to address production cost optimization of sodium hypochlorite bleaching washing production under conditions of required bleaching performances. The following conclusions can be drawn from the above works: 1. In most situation, the ensemble of surrogates has better performances, in terms of no matter local or overall accuracies, on approximating the quantitative relationships between process variables and bleaching effects. It proves that adopting ESs can not only reduce confusions of selecting appropriate surrogate, but also take advantages of the sandalone surrogates to achieve better results for this kind of problem. 2. It is found that temperature (TEMP) has the most significant contributions to the bleaching performances, in terms of colour strength (K/S), bending stiffness, tensile strength in warp and weft directions, in the defined ranges. By contrast, the treatment time has the least contributions in most situation. 3. A sodium hypochlorite bleaching washing production cost optimization model is constructed and effectively solved by utilizing the proposed hybrid ESs-PSO approach. Meanwhile, a case study was carried out to prove effectiveness of the methodology. In a word, it demonstrates that the production cost optimization of chlorine bleaching by using ESs-PSO is feasible and the method can be can be used to facilitate actual production.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.