{'fraction_non_alphanumeric': 0.022659675589488854, 'fraction_numerical': 0.009321436237083371, 'mean_word_length': 4.824968744418646, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Closed-Loop Supply Chain Design and Pricing in Competitive Conditions by Considering the Variable Value of Return Products Using the Whale Optimization Algorithm

: In today’s competitive environment, organizations, in addition to trying to improve their production conditions, have a special focus on their supply chain components. Cooperation between supply chain members always reduces unforeseen costs and speeds up the response to customer demand. In the new situation, according to the category of return products and their reprocessing, supply chains have found a closed-loop structure. In this research, the aim was to design a closed-loop supply chain in competitive conditions. For this purpose, the key decisions of this chain included locating retail centers, adjusting the inventory of chain members, and selling prices of ﬁnal products, optimally determined. For this purpose, a nonlinear integer mathematical model is presented. One of the most important innovations of this research was considering the variable value for return products. Then, in order to solve the proposed model, a whale optimization algorithm was developed. Numerical results from the sample examples showed that the whale algorithm had a very good performance in terms of response quality and speed-of-action in ﬁnding the optimal solution to this problem.


Introduction
A supply chain can be viewed as a network in which raw materials, semi-finished products, and finished products flow toward consumers, cash flows backward toward suppliers and manufacturers, and information flows in both directions [1,2]. There are different definitions of supply chain management in the literature. The reason for these differences is the difference in the views and perspectives of people who define this concept [3].
In the literature, the act of coordinating the entities involved in the chain is cited as one of the most important goals of supply chain management. A supply chain tries to maximize the overall profit of the chain. In the absence of this coordination, chain components would only try to maximize their own profit independently of each other, which would hinder the profitability of the chain.
Reverse logistics, product pricing, and the impact of pollutants are among the most recent issues in the supply chain.
The growing attention to environmental considerations in the area of supply chain management in the 1990s led to the emergence of concepts known as closed-loop supply chain and reverse logistics [4]. Reverse logistics is another issue in designing a supply chain which refers to the act of managing and directing activities related to equipment, products, components, materials, or systems that can be reused or recycled. Recovering materials and products or using some of the equipment left in a used product is an old practice. In addition, today, the fierce competition and the need to gain and maintain market share and make strategic interactions with customers encourage companies to implement multiple return policies, and some of the returned products, like newly produced products, need to be redistributed in similar markets through commercial networks [5][6][7].
With the rise of e-commerce and environmental laws in recent decades, the subject of reverse logistics has attracted even more attention. In the past, reverse logistics was used as an after-sales mechanism to allow customers to return defective products under warranty arrangements. However, today, reverse logistics itself is an area of competition and is receiving increasing attention not only because of environmental issues but also for economic reasons.
The third important topic in designing a supply chain is product pricing in competitive conditions. In today's competitive markets, businesses can gain more market share by choosing the right locations for their service facilities. In competitive location optimization, there is always more than one competitor in the competition area. The location decisions of a business have a direct impact not only on its own market share but also on the market share and activity of other businesses [8,9]. In addition to location, product pricing is another issue that has a huge impact on competition. Supply chains are always looking to offer the lowest price and highest quality to customers. Therefore, each supply chain must have an appropriate policy in the field of product pricing in a competitive environment.
According to the mentioned important topics in the supply chain, the present study concerned the design of closed-loop supply chains that operates under competitive conditions by considering the environmental effect in reverse logistics. Accordingly, the main contribution of this research was to design a supply chain in a competitive condition by using a novel meta-heuristic algorithm. One of the key issues in such chains is how to price the products considering the presence of competition. On the one hand, lowering the prices would reduce the relative profitability of the chain, and on the other hand, raising the prices could lead to losing market share. Therefore, product-pricing decisions can be a critical part of the design of these chains. This study tried to explore and analyze this subject.
The framework of this study can be summarized as follows: in the next section, the literature is reviewed. In the third section, the base mathematical model and the model that has been developed based on that foundation are presented. The fourth section introduces a hybrid algorithm made by combining a whale optimization algorithm (WOA) and genetic algorithm (GA) for solving the problem. The fifth section presents and analyzes the numerical results obtained by solving the model with the algorithm.

Literature Review
Due to the wide range of supply chains, this section examines the literature in three areas. These areas include supply chain network design focusing on closed-loop chains, pricing especially in competitive conditions, and finally, solution methods focusing on meta-heuristic algorithms.

Supply Chain Network Design
Gen et al.
[1] proposed a mixed-linear linear programming model for designing a forward logistics network in a two-stage chain with the cost minimization objective. In this paper, the priority-based encoding method was used to solve the problem.
Ko and Evans [10] introduced a nonlinear integer programming model for designing integrated forward and reverse logistics networks for third-party logistics service providers. To deal with the uncertainties involved in the conditions, they proposed determining the problem characteristics for the current period, and in the next period, solving the model again for the new conditions. They developed a genetic algorithm for solving the model.
Govindan et al. [11] proposed an integrated approach for a closed-loop supply chain network design under uncertainty. They applied the circular economy in the suppler selection phase. A fuzzy solution approach was proposed in this research to simultaneously incorporate uncertainty and to change the multi-objective model into a single-objective model.
Goli et al. [12] presented a mathematical model for a closed-loop supply chain considering the financial aspects. The objectives of the presented mathematical model were to maximize the increase in cash flow, maximize the total created jobs in the supply chain, and maximize the reliability of consumed raw materials. To encounter the fuzzy uncertainty in this model, a possibilistic programming approach was used. Liao et al. [13] designed a closed-loop supply chain for citrus fruit crates. For this purpose, a mixed-integer mathematical model was developed and implemented. Genetic algorithm and simulated annealing were employed, and a third recently successful method, the Keshtel Algorithm, was utilized. Further, two hybridization algorithms stemming from the mentioned ones were applied.
In the most recent studies, in 2021, Pahleval et al. [14] studded the sustainable closedloop supply chain network design in the aluminum industry. In this regard, the economic, environmental, and social aspects were optimized simultaneously. In this regard, the multi-objective gray wolf optimizer (MOGWO), the multi-objective red deer algorithm (MORDA), and augmented epsilon constraint (AEC) were used to achieve Pareto optimal solutions.

Pricing
Dullaert et al. [9] provided an overview of supply chain design models in order to pave the way for the development of more complete models that can take into account all logistical expenses.
Pishvaee et al. [15] used a mixed-integer linear programming model to design an integrated forward and reverse logistics network. To minimize costs and maximize responsiveness, they solved the model with a genetic algorithm equipped with a neighbor search. Kanan et al. [16] developed a closed-loop green supply chain model with a pricing strategy that was focused on battery recycling. The main goal of this study was to design a multilevel chain model, in which the decisions on how to produce and distribute the product were made with environmental conditions taken into consideration. In this study, this problem was solved by a metaheuristic genetic algorithm, and the results were analyzed.
Hassanzadeh and Zhang [17] proposed a multi-objective mathematical model for designing a closed-loop green supply chain consisting of manufacturing plants, assembly centers, collection centers, and recycling centers in competitive conditions. In this study, the model objectives were to minimize costs and minimize the environmental damage caused by the supply chain. These researchers solved several numerical examples of the presented problem and analyzed the results.
Govindan et al. [18] reviewed the articles published from 2007 to 2013 in the field of closed-loop supply chain with a focus on their perspective and methodology. These researchers stated that combining green supply chain decisions with closed-loop supply chain decisions and using quantitative methods in the design of these chains are among the most attractive avenues for research in this field.
Talaei et al. [19] developed a multi-level green closed-loop supply chain model for the electronics industry. In this study, the objective was to optimize the decision on the location of production centers, storage centers, and recycling centers in such a way as to minimize the chain's carbon production and total cost. The problem was implemented under fuzzy uncertainty conditions. Wei et al. [20] examined a pricing policy in the closed-loop supply chain with and without information symmetry. In this study, the game theory was used to determine the selling price of products. The study also discussed the changes in wholesale and retail prices and the inventory decisions of warehouses in the presence and absence of information symmetry.

Application of Meta-Heuristic Algorithms
Aras [21] proposed a nonlinear model of a reverse logistics network and solved it with the help of the tabu search algorithm. In this study, the goal was to optimize the location of collection centers and the product purchase prices such that the profit of the reverse logistics network was maximized. Du and Evans [22] considered a closed-loop logistics network operated by third-party logistics providers. Here, the objective was to minimize the tardiness costs and the total cost of facility location and capacity decisions. These researchers used a hybrid method consisting of scatter search, the dual simplex method, and the constraint method to solve their model. Kaya and Urek [23] introduced a mixed-integer nonlinear programming model for location, inventory, and pricing decisions in a closed-loop chain. In this study, demand was assumed to have an exponential relationship with price. To solve this model, they developed a heuristic method operating based on the inventory ordering system and ordering period.
Zohal and Soleimani [24] designed a closed-loop supply chain model with combined forward/reverse logistics. In addition to minimizing the total cost of the entire chain, this model aimed to reduce the CO 2 emission of the chain as a green objective. These researchers developed an ant colony optimization algorithm for solving this model. Saghaeeian and Ramezanian [25], on the optimization of competitive supply chains with multiple products and price-dependent demand, introduced a nonlinear mixedinteger programming model for this purpose. They also presented a hybrid algorithm based on a genetic algorithm and firefly algorithm for solving this mathematical model. In a study by Nobari et al. [26] on the chain-to-chain competitions that involve environmental and social factors, they used game theory to develop a model for these situations. In the end, they also presented a set of Pareto solutions for this problem.
In 2020, Wang et al. [27] presented a mathematical model for designing a multiproduct, multi-period supply chain network in a competitive environment. In this model, not only location and distribution but also the pricing was done in a competitive environment. These researchers used a combination of simulated annealing and particle swarm optimization algorithms to solve this model and then conducted a sensitivity analysis to determine how much the results were affected by different parameters. In addition, Goli et al. [28] optimized the sustainable supply chain of perishable products. They used a whale optimization algorithm and compared it with a genetic algorithm. The results indicated that the proposed algorithm provided Pareto solutions with acceptable quality and diversity.
In a 2021 field study, Chhetri et al. [29] examined 273 supply chains in Australia and analyzed the factors of success in competitive environments. The most important factors examined in this study included product life cycle, demand fluctuations, and creativity in product design. Ultimately, they used the taxonomic analysis method to interpret the findings.
A summary of previous studies in relation to the subject of this paper is presented in Table 1 below. A review and comparison of the literature showed that there are various shortcomings and drawbacks in past research. The most important shortcoming observed in the subject literature is that the combination of topics such as supply chain network design, competitive conditions, and product pricing has not been examined simultaneously. However, in real conditions, in most supply chains, competitive conditions prevail, and one of the most important concerns of supply chain managers is correct and principled pricing for their products.
Accordingly, almost no study in this field has considered the potentially variable value of returned products in the closed-loop supply chain design, i.e., the fact that a product could be more valuable to the chain if it has been returned after a short time and less valuable if it has been returned after a longer period of time.
Therefore, the main contribution and novelty of this research can be summarized in optimizing the closed-loop supply chain under competition. Accordingly, this paper presents a mathematical model and a solution method for closed-loop supply chain design with variable values for returned products. This model is solved with a hybrid algorithm developed by combining the whale optimization algorithm (WOA) and genetic algorithm (GA), which can be considered another innovation of this research.

Materials and Methods
In this study, it is assumed that a manufacturer located at a specific point has N customers at different locations. The manufacturer aims to determine the best locations for establishing retail facilities so that they can sell as many products as possible. These retail facilities can also accept the products that customers return within a certain period of time because of defects or any other reason. These products are returned to the manufacturer, where they are modified and reproduced and shipped back to retailers for resale. Here, it is assumed that there is no difference between the original manufacturing operations and the remanufacturing operations (those involving the returned products).
In the presented formulations, M denotes the number of potential points for establishing retail facilities, V1 is the set of potential points for retailers, V2 is the set of customer points, C denotes the cost of manufacturing the product, p is the selling price of the product, and s is the value of the returned product for the manufacturer. Figure 1 shows the structure of the considered closed-loop supply chain network. The size of demand is determined by an exponential function, which intends to make sure that customer points with higher population density have higher demand. According to Kara and Urek [23], suppose K j is the size of the population in area j. Customers located in this region can purchase the product from different retail centers. The greater the distance between customers and retailers, the lower the demand will be. In general, the demand in area j for retailer i is determined by Equation (1).
In the above equation, k is the price sensitivity coefficient, x ij is a binary variable that shows whether or not a retail center is established at point i to serve area j, and α ij is a coefficient between 0 and 1, which depends on the distance between retailer i and area j (the closer the distance, the smaller the α ij value) and is equal to the percentage of people who go to the retailer i to buy the product.
It is assumed that a fraction of purchased products would be returned to retail centers. The number of products that would be returned from customers of area j to retailer i is calculated as Equation (2).
In this equation, b is the product return motivation coefficient, and β ij is a coefficient between 0 and 1, which depends on the distance between i and j and represents the percentage of people in area j who go to retailer i to return their products.
The objective is to optimize the selling price, the location of retailers, the retailers' ordering period, and the allocation of customers to established retailers with the ultimate goal of maximizing the profitability of the chain. The base mathematical model has been adapted from Kara and Urek [23]. The parameters and formulations of this model are described below.
Indices i: Index of potential retail centers j: Index of customer areas Parameters K j : Number of customers in area j D ij : Demand of customers in area j ∈ V 2 who buy from a retailer I ∈ V 1 B ij : Quantity of products returned from customers in area j to retailer i s: Value of returned products c: Manufacturing cost per unit of product subject to: Equation (3) computes the objective function value. This objective function first sums up the revenues from the sale of original products and from the sale of remanufactured products and then subtracts the costs of establishing retail centers and their ordering and inventory costs. Equation (4) makes sure that each customer is allocated to exactly one retailer. Equation (5) ensures that customers are only assigned to established centers.
After a careful examination of the base model, it is used as a foundation for developing a new mathematical model. The modifications made in the base model are described below.
One of the things that make the base model unrealistic is the assumption that all returned products have the same value for the manufacturer. In reality, however, the value of a product depends on how long it was used and how much it was degraded during this period. In other words, a product that is returned after only a few days tends to be more valuable for the manufacturer than the one returned after a few months. Therefore, one of the innovations of the modified model is that the value of the returned product is assumed to be variable and depends on the usage duration and thus the condition of the returned product.
Another limitation of the base model is that the capacity of retailers to meet demand, which needs to be addressed during modification. The new parameters and the formulations of the modified mathematical model are presented below.
New parameters y j : Duration of product use by the customer in area j∈V 2 Cap i : Capacity of retailer i∈V 1 New variable u ij : Value of the product returned from area j to retailer I The above decision variable depends on the value of the returned product and the planning period. It is assumed that a returned product will be much more valuable if it is returned before the end of the planning period T and less valuable if it is returned later. With this assumption, the product purchase price from customers and from retailers is calculated as follows: Su ij : Purchase price from retailers ru ij : Purchase price from customers The new objective function attempts to maximize the chain's profit for different purchase prices from retailers and customers. Equation (8) guarantees that each customer is allocated to only one retailer. Equation (9) quantifies the usefulness of the returned product for when the usage duration (y ) differs from the planning period (T). Equation (10) states that customers should only be allocated to established centers. Equation (11) limits the capacity of each retail center.

Proposed Solution Method
Whales are aquatic mammals of the cetacean order with an elongated tail. An interesting point in the life of humpback whales, which has been the source of inspiration for the whale optimization algorithm (WOA), is the way they hunt for food, which is known as bubble-net feeding. In this method, whales exhale out of their blowhole beneath a group of fish to create a circular wall of rising bubbles in the water. This wall traps krill and other fish inside it, forcing them to go to the center of the circle. Whales then swim upward with an open mouth, swallowing a large number of fish at once. WOA has been developed by Mirjalili and Lewis [30][31][32][33][34]. This algorithm is inspired by how whales detect and surround their prey. Since the optimal position in the search space is unknown, WOA assumes that the best current solution is the target or a point close to it. Once this point is determined, the search for other optimal points continues, and positions are updated. This process is formulated as follows.
In the above equations, t is the algorithm iteration, c and A are the coefficient vectors, and X* is the best position achieved, and X is the current position of the whale.
The WOA algorithm may find the solutions in the local optimal trap [28,31] because it uses only one operator to improve the solutions. Therefore, according to different research items like [28], it is necessary to combine this algorithm with another meta-heuristic algorithm so that it can have complete coverage of the solution space. Accordingly, in this research, a genetic algorithm (GA) has been used for this purpose. This algorithm, due to having crossover and jump operators, can make appropriate changes in solutions for the state that is located in the local optimal trap. GA can be described as a global search method that mimics the laws of natural biological evolution. This algorithm applies the evolutionary rule of "the survival of the fittest" to a set of solutions in the hope of obtaining even better solutions. In each generation, GA tries to gain a better approximation of the optimal solution by performing a process of selection based on the fitness of solutions and running two natural genetics-inspired operators to produce even better solutions while maintaining diversity. This process makes the new generations more adapted to the problem conditions [28].
Before implementing a GA, it is first necessary to define a suitable code (representation) for the problem variables and the solution. The method most commonly used for this purpose is to consider solutions as chromosomes with binary strings in which each cell or section represents a decision variable. Although this is the most common method of coding, other methods, such as the use of real numbers, are also increasingly used in this area. It is also necessary to define a fitness function in order to attribute a value to each produced solution. In the course of GA, the algorithm selects some of the more fit solutions as parents and subjects them to crossover and mutation operators to produce offspring or new solutions. This process is repeated several times to produce the next generation of solutions. The algorithm then checks these new solutions to determine whether they satisfy the convergence conditions and terminate the above process once these conditions are met.
In the proposed hybrid WOA-GA algorithm, first, the crossover and mutation operators of GA are used to generate a set of new solutions, and then the main operator of WOA (Equations (12) and (13)) is used to improve the generated solutions. This process is repeated multiple times to reach the best possible solution. The process of the designed algorithm is shown in Figure 2. In addition to Figure 2, the pseudocode of WOA-GA algorithm is as follows (Algorithm 1).
To use the hybrid WOA-GA algorithm to solve the problem, it is necessary to determine the optimal parameter settings for the algorithm. This is done by the use of the Taguchi method, as explained in the next section.
Taguchi has introduced a concept known as Taguchi loss function, which has had a great impact on how quality is envisioned and pursued in action. This concept is an alternative to the traditional definition of quality, according to which products are either high quality or poor quality depending on whether they meet certain conditions. This traditional view argues that there is a certain threshold beyond which the product suddenly becomes unacceptable, as it no longer meets the required specifications. Taguchi argues that any deviation from the target quality, even within acceptable margins, causes a "loss" over the life of the product, which grows larger the further away the product is from the target state. Taguchi believes that the loss is proportional to the square of the deviation from the target value [14,27].
Following the procedure of the Taguchi method, we defined three levels for each parameter of the hybrid algorithm. The selected value for each level is based on the trial-and-error method. These levels are shown below in Table 2.

Algorithm 1. Pseudocode of WOA-GA
Step 0. Initialize the problem and algorithm parameters Step 1. Initialize the population (S) Step 2. Evaluate each solution in S as (F(s)) Step 3. For each solution in S Step 3.1 Select two solutions randomly as P1 and P2 Step 3.2 Apply crossover operator and prepare C1 and C2 Step 3.3 Apply Mutation operator and prepare M1 Step 3.4 Evaluate each of C1, C2, and M1 Step 3.5 Select the best solution from C1, C2, and M1 and replace it in S Step 4. Calculate the number of iterations (N_iter) Step 5. If N_iter > Max_iter, then go to Step 6, Else go to Step 2.
Step 6. Report the best solution Using the Taguchi L9 design, the response values for these levels were obtained as shown in the following Table 3. After entering this information into the MINITAB software and running the Taguchi analysis, the following signal-to-noise (S/N) charts were obtained (Figure 3).
In the above charts, the values with the lowest S/N are the best choices for the parameters. Accordingly, the best parameter setting for the proposed hybrid algorithm was determined to be the one shown in the following Table 4. In the rest of the study, all problem instances were solved with the algorithm parameters set to these values.

Results and Discussion
In order to evaluate the hybrid algorithm developed for this problem, the algorithm was coded in MATLAB 2011 and executed on 10 problems of different dimensions.
The dimensional parameters of these problems are given in Table 5. Other problem parameters such as the base demand of each customer, the manufacturing cost, and the inventory costs were produced randomly from a discrete uniform distribution. Other problem information is shown in the table below.  PR1  6  2  10  500  PR2  10  2  10  500  PR3  20  3  20  1500  PR4  30  5  20  2000  PR5  40  10  20  2000  PR6  50  12  30  3500  PR7  70  15  30  5000  PR8  100  20  30  9000  PR9  150  30  50  15,000  PR10  200  40  50  30,000 In the following, the results of the algorithm are compared with the results of the exact solution by GAMS software. Since it takes a very long time for GAMS to solve large-scale problems, the solution time was limited to 3600 s (1 h) per problem. In the cases where GAMS could not reach the optimal solution in 1 h, the best solution it produced within this time (not necessarily the optimal solution) was considered as its final output. Table 6 compares the performance of GAMS and the proposed hybrid algorithm in solving the generated problems. Moreover, in order to evaluate the proposed hybrid algorithm in a better way, the different test problems were applied with GA, and WOA algorithms and the results are presented in Table 7. As the table above shows, GAMS could not find the optimal solution for the last three problems within 1 h, but the proposed algorithm managed to find better solutions for these problems in much shorter times. The solution times of the two methods are plotted in the following Figure 4. It can be seen that as the problems got larger, the time of the exact solution with GAMS increased exponentially, but the solution time of the hybrid algorithm increased at a much lower rate. The following chart compares the objective function values achieved by the exact method and the hybrid algorithm ( Figure 5). As the Figure 5 shows, there is not much difference between the objective function values obtained from the proposed hybrid algorithm and the exact solution. Overall, the outputs of the hybrid algorithm were only 0.05% different from the exact solutions produced by GAMS, which shows the good performance of this algorithm in finding the optimal solutions to the problem.
Examination of the results in Figure 6 shows that in none of the solved problems did the GA and WOA algorithms perform better than the hybrid algorithm. In other words, the combination of WOA and GA algorithms performed far better than either. The results of Figure 7 also show that, due to the increasing complexity of the hybrid algorithm, the CPU time of this algorithm is longer than the solution time of GA and WOA.

Conclusions
This paper presented a new model for three-level closed-loop supply chain networks operating under competitive conditions with the objective of optimizing retailer locations, inventory levels, and selling prices for cost minimization. The main innovation of the study was the use of a new approach to consider the variable value of returned products for the manufacturer. For this purpose, it was assumed that the usability of each returned product is a function of how long it has been used, which determines its final value. This problem was formulated as a mixed-integer nonlinear mathematical model and then solved with a hybrid algorithm made by combining whale optimization algorithm (WOA) and genetic algorithm (GA) as well as GAMS software.
The comparison of the results of the hybrid algorithm with the outputs of GAMS for problems of different dimensions showed the good performance of the developed algorithm in solving the defined problem.
Implementing this research in different supply chains can provide useful results to supply chain managers. Based on this, one of the managerial insights obtained from the implementation of this research can be considered in creating a complete attitude in supply chain management in a competitive environment. Creating effective communication between members of the supply chain and trying to increase market share is always one of the most important challenges in the supply chain. Using a mathematical modeling approach and optimizing it using modern meta-heuristic algorithms is an efficient tool for finding the best possible solutions in competitive conditions. Part of this solution is the price of supply chain products. Pricing always faces many challenges, and this study sought to provide an efficient way to offer the best price in a competitive environment.
In future studies, it may be possible to expand the model by incorporating uncertainty in demand and use other meta-heuristic algorithms such as particle swarm and ant colony optimization to solve the problem.