1 Introduction

Production distribution and demand fulfillment is increasingly challenging because of shortening product life cycles, rapid technological change, increasing competition, and uncertainty introduced by globalization (Chien et al. 2013). The manufacturing paradigm is shifting, in which the conventional vertically integrated supply chain has been altered by collaborations among many fragmented yet complementary and specialized companies in production distribution for value constellations (Chien et al. 2010). The design of a long-term efficient production distribution network is a crucial strategic decision that affects supply chain performance and the manufacturing network (Xu et al. 2008).

The present production distribution problem with the multistage and multi-time-period (MSMT) supply chain consists of factories, distribution centers, retailers, and various customers. The present problem is crucial in supply chain management, in which an optimal platform is required to solve it systemically for efficient and effective supply chain management (Lin et al. 2009). In a flexible multistage logistics network, products can be delivered to customers from plants or distribution centers instead of retailers, thereby decreasing delivery time and increasing customer demand satisfaction. Customer demands in practice are typically imprecise in each period of multi-time-period production distribution models, thus causing supplier production distribution complexity in meeting fluctuating demands in a multi-time period. The supply chain must be prepared for demand unpredictability, disruption, or customer delivery delay, in which the multi-time period or infinite-horizon production distribution problem is unobtainable over the planning horizon until supply is insufficient to meet demand. Hence, decision makers attempting to manage this problem should consider uncertain situations such as the amount of inventory and production for meeting fluctuating demands in each period and providing flexibility. However, such consideration can be costly and risky (Chien et al. 2012). Indeed, the major goal is to determine the processes to minimize maximum potential regret and risk including the total cost (Chien and Zheng 2012).

In practice, the data in production distribution systems and supply chains are characteristically fuzzy, whereas customer demand is typically uncertainly quantified in supply chain procedures. Thus, conventional models with constant demand may not be appropriate for managing the fuzziness of production distribution systems that are necessary for effectively determining solutions. Thus, we addressed the MSMT problem with uncertain demands.

This study aims to develop a flexible MSMT production distribution under uncertain demands. We propose extended priority-based discrete particle swarm optimization (EP-DPSO) and new extended priority-based hybrid genetic algorithm approach (nEP-HGA) approach for solving uncertain demands in the flexible MSMT supply chain model. For validation, we compared the proposed approach with both the traditional GA approach and LINGO computational software. The approaches were solved under triangular fuzzy demands to satisfy demands with the minimal total cost by considering the transportation costs, inventory costs, shortage costs, and ordering costs of the supply chain network.

The remainder of this paper is organized as follows: Sect. 2 reviews the literature on the production distribution problem. Section 3 introduces the uncertain function of the triangular fuzzy number. Section 4 describes the formulation of the mathematical model for MSMT production distribution. Section 5 describes the proposed solution methodology of the DPSO approach combined with EP-based encoding/decoding and the nEP-HGA. Section 6 describes the proposed adaptive auto tuning that entails using the FLC for enhancing the evolutionary process. Section 7 presents examples of numerical experiments of the model for comparing EP-DPSDO and the nEP-HGA with LINGO and the GA. Section 8 concludes the paper with a discussion on contributions and future research directions.

2 Literature review

Various studies have considered different time-period classifications for each complexity of the problem that can be divided into two parts: a single period and a multi-time period. Several researchers have solved single-time-period production distribution problems. For example, Chan et al. (2005) proposed an HGA in multi-factory supply chain models by using the analytic hierarchy process (AHP) for assigning weightings among costs, day, and use, and combined the GA for allocating jobs into suitable production plants. Xu et al. (2008) discussed the supply-chain network design problem for shipping costs and customer demands by using random fuzzy variables. Using spanning tree-based genetic algorithms (st-GAs) and applying the Prüfer number to solve this problem, they determined multi-objectives for minimizing the total cost and maximizing customer services. Costa et al. (2010) proposed an innovative encoding-decoding procedure with the GA for determining the location and opening of facilities in a single-product three-stage supply chain network. They proposed a new, efficient chromosome representation procedure based on a parsimonious permutation decoding of the network string representation for reducing infeasible transportation trees.

However, actual production distribution problems involve the multi-time-period that demands period fluctuations and customer quantity demands (Chamnanlor et al. 2014). Wang and Hsu (2012) applied the possibilistic mean and mean square imprecision index of the shortage and surplus for uncertain factors in the closed-loop logistics model. Zeballos et al. (2014) proposed mixed-integer linear programming for 10 layers (five stages) of closed-loop supply chains with uncertain supply and demand. Their objective function minimizes the expected costs of facilities, purchasing, storage, transportation, and emissions, minus the expected revenue of returned products. Sethanan et al. (2013) considered production planning, ordering, and inventory in analyzing costs for solving the supply chain problem.

In this study, we propose an approach integrating discrete particle swarm optimization, the extended priority based-encoding/decoding (nEP-HGA), and a fuzzy logic controller (FLC) for solving complex factor-production distribution problems such as uncertain demands in the MSMT supply chain model. For example, Duenas and Petrovic (2008) proposed a multi-objective genetic algorithm for single machine scheduling under fuzziness. We formulated this problem with triangular fuzzy customer demand to determine which customers required delivery in each period, and selected the distribution center or retailers for each customer in the production distribution network for satisfying customer demands, and for comparing the proposed approach with the traditional genetic algorithm (GA) approach. The objective function in this problem is the minimal total cost under triangular fuzzy customer demands that involve considering transportation costs, inventory costs, and ordering costs.

Most existing studies focused on single-time-period production distribution problems that have both unpredictable and certain factors. However, the complexity of production distribution problems includes imprecise periods and uncertain customer demands. Several studies have proposed various approaches for solving this problem. Table 1 lists review of related studies and their classifications. The proposed approach aims to minimize total costs of the multistage and multi-time-period in production distribution problems.

Table 1 Related studies

3 Mathematical model for multistage and multi-time-period supply chain

The indices, parameters, and decision variables are listed as follows:

Indices

\(i\) :

index of plants \((i = 1,2,\ldots ,I)\)

\(j\) :

index of distribution centers \((j = 1,2,\ldots ,J)\)

\(k\) :

index of retailers \((k = 1,2,\ldots ,K)\)

\(l\) :

index of customers \((l = 1,2,\ldots ,L)\)

\(t\) :

index of time period \((t = 1,2,\ldots ,T)\)

Parameters

\(I\) :

number of plants

\(J\) :

number of distribution centers

\(K\) :

number of retailers

\(L\) :

number of customers

\(T\) :

total time period

\(P_{i}\) :

plant \(i\)

\(DC_{j}\) :

distribution center \(j\)

\(R_{k}\) :

retailer \(k\)

\(\tilde{d}_l (t)\) :

customer uncertain demand \(l\) at time \(t\)

\(c_{ij}^{1}\) :

unit shipping cost of product from plant \(i\) to distribution center \(j\)

\(c_{ik}^{2}\) :

unit shipping cost of product from plant \(i\) to retailer \(k\)

\(c_{jk}^{3}\) :

unit shipping cost of product from distribution center \(j\) to retailer \(k\)

\(c_{jl}^{4}\) :

unit shipping cost of product from distribution center \(j\) to customer \(l\)

\(c_{kl}^{5}\) :

unit shipping cost of product from retailer \(k\) to customer \(l\)

\(f_{j}^{1}\) :

fix charge of products transportation in distribution center \(j\)

\(f_{k}^{2}\) :

fix charge of products transportation to retailer \(k\)

\(h_{j}^{1}\) :

unit holding cost of inventory per period at distribution center \(j\)

\(h_{k}^{2}\) :

unit holding cost of inventory per period at retailer \(k\)

\(pr_{i}(t)\) :

amount of products from plant \(i\) at time \(t\)

\(t_{ij}^{L1}\) :

lead time for transporting products from plant \(i\) to distribution center \(j\)

\(t_{ik}^{L2}\) :

lead time for transporting products from plant \(i\) to retailer \(k\)

\(t_{jk}^{L3}\) :

lead time for transporting products from distribution center \(j\) to retailer \(k\)

\(t_{jl}^{L4}\) :

lead time for transporting products from distribution center \(j\) to customer \(l\)

\(t_{kl}^{L5}\) :

lead time for transporting products from retailer k to customer \(l\)

\(u_{j}^{1}\) :

upper bound of capacity of distribution center \(j\)

\(u_{k}^{2}\) :

upper bound of capacity of retailer \(k\)

\(\alpha _x\) :

\(=\left\{ \begin{array}{l@{\quad }l} 1, &{} x \ne 0 \\ 0, &{} \hbox {otherwise} \\ \end{array} \right. \quad \alpha _x \) is the step function

Decision variables

\(x_{ij}^{1}(t)\) :

amount of transporting product from plant \(i\) to distribution center \(j\) at time \(t\)

\(x_{ik}^{2}(t)\) :

amount of transporting product from plant \(i\) to retailer \(k\) at time \(t\)

\(x_{jk}^{3}(t)\) :

amount of transporting product from distribution center \(j\) to retailer \(k\) at time \(t\)

\(x_{jl}^{4}(t)\) :

amount of transporting product from distribution center \(j\) to customer \(l\) at time \(t\)

\(x_{kl}^{5}(t)\) :

amount of transporting product from retailer \(k\) to customer \(l\) at time \(t\)

\(y_{j}^{1}(t)\) :

amount of inventory in distribution center \(j\) at time \(t\)

\(y_{k}^{2}(t)\) :

amount of inventory in retailer \(k\) at time \(t\)

The proposed model was formulated based on a mixed integer programming model for a multistage supply chain network. This problem involves two deliveries—normal delivery from the first stage to the next closing stage and direct delivery—for transporting the product from distribution centers to customers instead of from retailers (Fig. 1).

Fig. 1
figure 1

Flexible multistage logistics network model

The total cost function of any of the following cost items is calculated as the sum of an item’s costs over the planning horizon \(T\). The objective function is to minimize costs that consist of ordering costs, holding costs, and transportation costs. The detailed cost items and constraints are shown as follows:

$$\begin{aligned} \min z&= \sum _{t=0}^T \left[ \sum _{i=1}^I \sum _{j=1}^J c_{ij}^1 x_{ij}^1 (t)+\sum _{i=1}^I \sum _{k=1}^K c_{ik}^2 x_{ik}^2 (t)+ \sum _{j=1}^J \sum _{k=1}^K c_{jk}^3 x_{jk}^3 (t)\right. \nonumber \\&\qquad \quad \left. + \sum _{j=1}^J \sum _{l=1}^L c_{jl}^4 x_{jl}^4 (t)+\sum _{k=1}^k \sum _{l=1}^L c_{kl}^5 x_{kl}^5 (t)+\sum _{i=1}^I \sum _{j=1}^J f_j^1 \alpha (x_{ij}^1 (t)) \right. \nonumber \\&\qquad \quad \left. + \sum _{i=1}^I \sum _{k=1}^K f_k^2 \alpha (x_{ik}^2 (t))+ \sum _{j=1}^J \sum _{k=1}^K f_k^2 \alpha (x_{jk}^3 (t))\right. \nonumber \\&\qquad \quad \left. + \sum _{j=1}^J h_j^1 y_j^1 (t) +\sum _{k=1}^K h_k^2 y_k^2 (t) \right] \end{aligned}$$
(1)
$$\begin{aligned}&\hbox {s. t.}\nonumber \\&\quad y_j^1(t-1)+\sum _{i=1}^I {x_{ij}^1 (t-t_{ij}^{L3} )-} \sum _{k=1}^K{x_{jk}^3 (t-t_{jk}^{L3} )}= y_j^1 (t),\quad \forall j,t\end{aligned}$$
(2)
$$\begin{aligned}&\quad y_k^2 (t-1)+\sum _{i=1}^I {x_{ik}^2 (t-t_{ik}^{L2} )+} \sum _{j=1}^J x_{jk}^3 (t-t_{jk}^{L3} )\nonumber \\&\quad - \sum _{l=1}^L {x_{kl}^5 (t-t_{kl}^{L5} )=} y_k^2 (t),\quad \forall k,t\end{aligned}$$
(3)
$$\begin{aligned}&\quad \sum _{t=1}^T \left( \sum _{j=1}^J x_{ij}^1 (t)+ \sum _{k=1}^K x_{ik}^2 (t)\right) \le \sum _{t=1}^T pr_i (t),\quad \forall i,t\end{aligned}$$
(4)
$$\begin{aligned}&\quad \sum _{j=1}^J x_{jl}^4 (t-t_{jl}^{L4} )+\sum _{k=1}^K x_{kl}^5 (t-t_{kl}^{L5} )\ge \tilde{d}_l (t),\quad \forall l,t\end{aligned}$$
(5)
$$\begin{aligned}&\quad y_j^1 (t)\le u_j^1 \quad \forall j,t\end{aligned}$$
(6)
$$\begin{aligned}&\quad y_k^2 (t)\le u_k^2 \quad \forall k,t\end{aligned}$$
(7)
$$\begin{aligned}&\quad x_{ij}^1 (t),x_{ik}^2 (t),x_{jk}^3 (t),x_{jl}^4 (t),x_{kl}^5 (t),y_j^1 (t),y_k^2 (t)\ge 0,\quad \forall i,j,k,l,t \end{aligned}$$
(8)

The objective function (1) is to minimize total costs, which are shipping transportation costs (1st through 5th terms), fixed charge of product transportation costs (6th through 8th terms), and holding costs (9th through 10th terms). Constraint (2) specifies the balanced inventory of distribution centers, and Constraint (3) specifies the balanced inventory of retailers. Constraint (4) ensures that the total quantities of transporting products do not exceed the production limit of the plant. Constraint (5) is the demand satisfaction constraint. Constraints (6) and (7) ensure that the distribution centers and retailer do not exceed their capacities. Finally, Constraint (8) is the variable domain constraint.

4 Fuzzy numbers

Fuzzy theory (Zadeh, 1965) proposes mathematical techniques for deriving particular solutions. Chien et al. (2011) developed a comprehensive modular framework to derive various configurations of fuzzy numbers for fuzzy ranking. Kumar (2012) summarized the definitions of the arithmetic operations of fuzzy numbers as follows:

If \(X\) is a collection of objects, then the fuzzy subset \({\tilde{a}}\) of \(X\) is defined as a set of ordered pairs:

$$\begin{aligned} \tilde{a}=\{(x),\mu _{\tilde{a}}(x)|x\in X\} \end{aligned}$$

where \(\mu _{\tilde{a}}(x)\) is the membership function for the fuzzy set \(\tilde{a}\). The membership function maps each element of \(X\) to a membership grade or membership value between 0 and 1.

A real fuzzy number \(\tilde{a}= [a_{L}\,a_{M} \, a_{U}]\), when defined as a triangular fuzzy number when \(a_{L}\le a_{M} \le a_{U}\), is a fuzzy subset of the set of real numbers R, with membership function \(\mu _{\tilde{a}}\) satisfying the following conditions:

  • \(\mu _{\tilde{a}}\) is continuous from R to the closed interval [0,1];

  • \(\mu _{\tilde{a}}\) is strictly increasing and continuous [\(a_{L}\, a_{M}\)].

The membership function \(\mu _{\tilde{a}}\) is strictly decreasing and continuous [\(a_{M}\, a_{U}\)], where \(a_{M}\) and \(a_{U}\) are real numbers.

Let [\(\tilde{a}=a_{L}\, a_{M}\, a_{U}\)] and \(\tilde{b}= [b_{L}\, b_{M}\, b_{U}]\) be two triangular fuzzy numbers; then, define the arithmetic operations of \(\tilde{a}\) and \(\tilde{b}\) as

Addition::

\(\tilde{a} +\tilde{b}=\{[a_{L}+ b_{L}][a_{M}+ b_{M}] [a_{U}+ b_{U}]\}\)

Subtraction::

\(\tilde{a} -\tilde{b}=\{[a_{L}-b_{L}][a_{M}- b_{M}][a_{U}- b_{U}]\}\)

The triangular fuzzy number is frequently used for practical purposes (Li et al. 1996, 2014). Chien et al. (2011) developed a comprehensive modular fuzzy ranking framework that can derive various configurations of fuzzy numbers for fuzzy ranking. In particular, the membership function \(\upmu {\tilde{\hbox {a}}}(\hbox {x})\) of the triangular fuzzy number \({\tilde{\hbox {a}}}\) is expressed as follows:

$$\begin{aligned} \mu _{\tilde{a}}(x)= \left\{ \begin{array}{ll} 0 &{} \quad \hbox {for}\; x\le a_L \\ (x-a_L)/(a_M -a_L )&{}\quad \hbox {for}\; a_L \le x\le a_M \\ 1 &{} \quad \hbox {for}\; x=a_M \\ (a_U -x)/(a_U-a_M) &{}\quad \hbox {for}\; a_M \le x\le a_U \\ 0 &{}\quad \hbox {for}\; x\ge a_U \\ \end{array}\right. \end{aligned}$$

According to t definition of a triangular fuzzy number as show in Fig. 2, let ã \(=\) (aL(r), aU(r)), (\(0 \le r \le 1\)) be a fuzzy number. Then, calculate the average value of the triangular fuzzy number \(\bar{{a}}_0\) as follows:

$$\begin{aligned} \bar{{a}}_0 =\frac{1}{2}\int \limits _0^1 \{ a_L (r)+ a_U (r) \}\hbox {d}r=\frac{1}{4}[2a_M +a_L +a_U] \end{aligned}$$

If \(\bar{\hbox {a}}\upomega = (\hbox {aL(r)}, \hbox {aU(r)}) =\{\hbox {aL} + \hbox {r}(\hbox {aM}-\hbox {aL})/\upomega , \hbox {aU} + \hbox {r}(\hbox {aM}-\hbox {aU})/\upomega \}\) is an arbitrary triangular fuzzy number at a decision level higher than “\(\upalpha \)” for \(\upalpha ,\upomega \in [0,1]\), the value \(\bar{\hbox {a}}\upomega \) can be calculated as follows:

Fig. 2
figure 2

A triangular fuzzy number

If \(\upomega >\upalpha \), then

$$\begin{aligned} \bar{{a}}_\omega =\frac{1}{2} {\int \limits _\alpha ^\omega } \left\{ a_L (r)+ a_U (r)\right\} \hbox {d}r=\frac{1}{4\omega }\left[ 2a_M (\omega ^{2}-\alpha ^{2})+(a_L +a_U )(\omega -\alpha )^{2}\right] \end{aligned}$$

5 Discrete particle swarm optimization and extended priority-based hybrid genetic algorithm

5.1 Extended priority-based hybrid genetic algorithm

The priority-based GA is an indirect approach for solving some network problems (Gen and Cheng 2000; Gen et al. 2008; Chou et al. 2014). This study proposed a chromosome consisting of two types of information: the locus, the position of the gene within the chromosome structure, and the allele, the value the gene takes (Lin et al. 2009). The position of a gene is used to represent the value that is used to represent the priority of the source depot for constructing candidates. The second part of the chromosome consists of two parts: the first part assigns retailers to a plant or distribution center, in which each locus is denoted as an integer ranging from 0 to 1. The second part involves a customer assigning a distribution center or retailer, for which each locus is denoted as an integer ranging from 1 to 2. The encoding and decoding procedures of the chromosome are shown in Figs. 3 and 4, respectively.

Fig. 3
figure 3

Procedure for initialization by using new extended priority-based encoding

Fig. 4
figure 4

Procedure for new extended priority-based decoding

5.2 Proposed chromosome encoding procedure

The encoding representation designed in this paper consists of the number of plants, distribution centers, retailers, and customers. Figure 5 shows an example of encoding new extended priority-based initialization with two plants, three distribution centers, three retailers, and five customers, based on the random permutation, in which the priority of each gene is to allocate each stage so that the total number of genes is 13 in chromosome part 1. Chromosome part 2 is composed of chromosome part 2.1, which assigns retailers to a plant or distribution center that has three genes. The value is 0 in the first gene (k1) in chromosome part 2.1, which means a direct shipment from plant i to the first retailer, and the value of 1 in the second and third gene means a direct delivery from distribution center j to k2 and k3. The final part of this chromosome is part 2.2, which allocates customers from the distribution center or retailer, so that two integer numbers range from 1 to 2.

Fig. 5
figure 5

Example of the new extended priority-based encoding

In this example, the gene value of the first, second, and fifth customers are 1, which means a direct delivery from distribution center j to the first, second, and fifth customers. The third and fourth customers are 2, which means allocating a direct delivery from retailer k to them.

5.3 Proposed chromosome decoding procedure

The proposed three-stage decoding procedure (Fig. 6) is described as follows: The first stage (Step 1–2 in Fig. 4) is the retailer or distribution center that delivers products for customer demand allocation in the period of triangular fuzzy customer demands; the values are obtained according to the proposed Sect. 4 (\(\omega = 1\) and \(\alpha = 0\)). Table 2 presents examples of fuzzy demands. The allocation among retailers, distribution centers, and customers is obtained by decoding chromosome part 1 and part 2.2, which follows a priority-based procedure: Select the customer with the highest priority in chromosome part 1 and determine delivery from retailers or distribution centers according to chromosome part 2.2. A gene number of 1 means a direct delivery from distribution center \(j\) to customer l, whereas a gene number of 2 means a direct delivery from retailer \(k\) to customer l; the highest priority of the customer corresponds to the minimum transportation cost; the customer allocation t continues until the maximum capacity has been reached and all customers are allocated; then, the throughput of each retailer is calculated.

Fig. 6
figure 6

Example of the flexible multistage logistics network chromosome encoding/decoding (\(t=1\))

Table 2 Example triangular fuzzy demands for the test problem

The retailer allocation from the distribution center or plant is presented in Steps 3–4, a stage at which each retailer lost stock from allocating demand; however, this stage is similar to the first stage, except that different retailers are positioned according to the chromosome and gene number. The allocation among plants, distribution centers, and retailers is obtained by decoding chromosome parts 1 and 2.1, in which chromosome part 1 follows a priority-based procedure: Select the retailer with the highest priority in chromosome part 1 and determine delivery from plants or distribution centers according to chromosome part 2.1, in which a gene number equal to 0 means a direct delivery from plant \(i\) to retailer \(k\); then, select a suitable transportation cost to minimize costs; allocation continues until the maximum capacity has been reached and all retailers are allocated; then, calculate the throughput of each distribution center.

At the final stage (Steps 5–6), the plants delivers direct shipment products to each distribution center that causes each distribution center to lose stock from allocating demands and retailers. This step entails selecting the distribution \(j\) with the highest priority in chromosome part 1 and involves determining a direct shipment from plant \(i\) to DC \(j\), in which plant \(i\) has sufficient capacity and the lowest transportation cost until all distribution centers have been assigned to the equal upper bound of distribution center capacity; then, the total cost from the encoding procedure is calculated. Finally, in the first period of this flexible multistage logistics network problem, the number of products of each stage is presented, as shown in Table 3, and the allocation, transportation cost, inventory cost, and total cost of each stage (Table 4) are traced as an example of Periods 1 and 2. Customers in the next period allocate the total number products of each stage from the first period in a continuous decoding procedure.

Table 3 Total number of products at each stage in Steps 1–6 (\(t=1\))
Table 4 Tracing allocation and total cost at each stage in Steps 1–6 for Periods 1 and 2

5.4 Particle swarm optimization

PSO is based on the simulation of social iterations proposed by Kennedy and Eberhart (1995), and is initialized with a population of random candidate solutions as particles. The position of each \(k\)th particle \(x_{k}(t)\) is a potential result (potential solution) of the problem under study. Each particle remembers the best position that it has found thus far during the search process \(h_{\mathrm{best}}(t)\) and knows the global best position of swarm \(g_{\mathrm{best}}(t)\). We can calculate the particle’s fitness by inputting its position into a designated objective function that is expressed according to the following equations:

$$\begin{aligned}&\displaystyle v_k \left( {t+{1}}\right) =v_k \left( t \right) +b_{1} r_{1} \left( {h_{{\mathrm{best}}} \left( t \right) -x_k \left( t \right) }\right) +b_{2} r_{2} \left( {g_{{\mathrm{best}}}\left( t \right) -x_k \left( t \right) } \right) \end{aligned}$$
(9)
$$\begin{aligned}&\displaystyle x_k (t+{1})=x_k \left( t \right) +v_k \left( {t+{1}} \right) \end{aligned}$$
(10)

where \(v_{k}(t)\) is the \(k\)th particle’s flying velocity at the \(t\)th iteration; \(b_{1}\) and \(b_{2}\) are positive constants, called the acceleration constants; and \(r_{1}\), \(r_{2} \in [0,1]\) are uniform random numbers. The PSO procedure is summarized in Fig. 7:

5.5 Genetic algorithm operators

5.5.1 Crossover

The crossover operator is exchanged between two chromosomes from one generation to the next generation. In this research, we used one cut-point crossover that randomly selects a locus and exchanges the subsequences before and after the locus between two parent chromosomes to two new offspring chromosomes that cut one point of each chromosome part, as shown in Fig. 8.

Fig. 7
figure 7

Procedure for particle swarm optimization

Fig. 8
figure 8

Crossover operation

After the crossover operation, improving chromosomes/offspring is necessary by checking and repairing the number of sequence constraints if the genes in chromosome part 1 are the same number. Subsequently, the first number must be selected and the lacking number in chromosome part 1 must be replaced.

5.5.2 Mutation

The mutation operator is applied to each child solution resulting from the crossover operator. In this study, we used two mutation operators, which are swapping and inverse mutations, as shown in Fig. 9. The swapping mutation operates in chromosome part 1 that selects a substring and swap within this chromosome to decrease the checking and repairing process of the offspring chromosome and to modify the gene. We also selected a string in chromosome Parts 2.1 and 2.2 at random for inverse mutation, and inversed them into another number with a randomly selected locus.

Fig. 9
figure 9

Mutation operation

5.6 Discrete particle swarm operator

Most PSO applications involve using continuous function value optimization, but few studies have considered using DPSO. The displacement of each particle depends on its \(h_{\mathrm{best}}\) and \(g_{\mathrm{best}}\), in which the particle velocity represents the probability of a particle to change toward \(h_{\mathrm{best}}\) and \(g_{\mathrm{best}}\). The particle velocity is similarly dependent. In the proposed algorithm, the similarity between two positions is based on the Hamming distance proposed by Shao et al. (2013). The Hamming distance between two particle positions is the number of corresponding components that are different. The displacement operator is summarized as follows (Fig. 10).

Fig. 10
figure 10

Example of discrete particle swarm operator

6 Adaptive auto tuning by using the fuzzy logic controller

The conventional GA approach cannot guarantee an optimal platform in all cases because the GA uses unknown genetic parameters such as the crossover rate and mutation rate. Adaptive autotuning can adaptively regulate genetic parameters during GA search processes. Yun and Gen (2003) proposed a heuristic updating strategy for crossover and mutation rates to consider changes of average fitness in the GA population of two continuous generations. For example, in the minimization problem, we can set the change of the average fitness at generation \(t,\Delta f_{avg}(t)\) as follows:

$$\begin{aligned} \Delta f_{\textit{avg}} ( t)\! =\! \overline{f_{\textit{popSize}} } (t) - \overline{f_{\textit{offSize}} } (t)\!=\! \frac{1}{\textit{popSize}}\sum _{k=1}^{\textit{popSize}} {f{ }_k(t)} - \frac{1}{\textit{offSize}}\sum _{k=1}^{\textit{offSize}} {f_{k}(t)}\nonumber \\ \end{aligned}$$
(11)

where popSize is the population size that satisfies constraints, and offSize is the offspring size that satisfies constraints. The adaptive auto-tuning process using FLCs is shown in Fig. 11.

Thus, we present the nEP-HGA that combines adaptive autotuning with FLCs. We also propose the EP-DPSO for priority-based encoding and decoding with DPSO that involves using the Hamming distance for solving the flexible MSMT supply chain. The overall procedure for the proposed nEP-HGA and EP-DPSO is outlined in Figs. 12 and 13, respectively.

Fig. 11
figure 11

Procedure for adaptive auto tuning by using FLCs

Fig. 12
figure 12

Overall nEP-HGA procedure for the MSMT problem

Fig. 13
figure 13

Overall EP-DPSO procedure for the MSMT problem

7 Numerical experiment and experimental design

To demonstrate the efficiency and effectiveness of the nEP-HGA in the fuzzy demand environment, the GA parameters are designed tuning parameters according to the adaptive autotuning routine for \(p_{C}(t)\), \(p_{M}(t)\). The numerical experiments are 10 times the \(popSize = 50\) and \(maxGen=500\). The DSPO parameters for numerical experiments are the number of particles \(=\) 50 and \(maxIter = 500\). The proposed algorithms were run using MatLab on a 2.10 GHz PC, with 8 G-Byte of RAM, for testing and evaluation. For illustration, we generated three problems (Table 5) involving the various numbers of plants, distribution centers, retailers, customers, and planning times. Uncertain demands generated in the \(a_{L}\) and \(a_{U}\) fuzzy values interval are [10, 20] for each problem. We assumed the fixed charge of product transportation and the unit holding cost of inventory per period at each node to be equal to 1. Table 6 provides information on the unit shipping cost for each node of a small-scaled MSMT problem (Problem 1).

Table 5 Size of tested problems

We formulated the problems as a mixed-integer programming model for a multistage supply chain network, as shown in Table 7. The results of tested problems for deriving an optimal solution were followed, generating three problems presented as the number of constraints, decision variables, and the objective function results of each problem. Problem 3 yielded a high number of variables, in which the location-allocation problem was NP-hard and highly complex. Therefore, we propose that the EP-DPSO and nEP-HGA can determine delivery to customers in each period and select the distribution center or retailers for each customer in the production-distribution network for satisfying customer demands and solving both small and large problems.

Table 6 Unit shipping cost of each node ($/unit)
Table 7 Results of tested problems by applying optimal solution (LINGO)

We tested the EP-DPSO and nEP-HGA performance using three sizes of test problems. The computational test compared the best and average total cost of each solution for solving each problem, and the results of the optimal solution, traditional GA, the nEP-HGA, and EP-DPSO for flexible multiple stages and multi-time periods are shown in Table 8. Thus, the nEP-HGA and EP-DPSO determined that total costs equal the optimal solution and have enhanced results compared with the traditional GA, whereas in the comparison results between the nEP-HGA and EP-DPSO for each problem, the EP-DPSO spends fewer number of iterations than the number of generations in the nEP-HGA for finding the best solution for large problems (Problems 2 and 3; Fig. 14). The proposed EP-DPSO outperforms the traditional GA and nEP-HGA, particularly for large problems. Time is the CPU time in seconds for every run, and the example of the EP-DPSO experiment facilitated determining the best solution at 35.9 s at the 21st iteration in Problem 2. However, the CPU time of EP-DPSO found a solution that is less than the nEP-HGA, in which the best solution is at 54.5 s at the 32nd iteration. The result of EP-DPSO outperformed the nEP-HGA in Problem 3. As shown in Fig. 15, the CPU time and times for EP-DPSO and nEP-HGA runs are 272.4 s (80 iteration) and 619.9 s (179th generation), respectively. However, in small problems such as Problem 1, the results of EP-DPSO and nEP-HGA are similar. However, they can determine which real world demands must be optimized for long-term efficient operation of the entire supply chain.

Table 8 Comparison of the best and average total cost of each solution from solving each problem [K\(\cdot \)$]
Fig. 14
figure 14

Comparison of the results of using the nEP-HGA and EP-DPSO for Problem 2

Fig. 15
figure 15

Comparison of the results of using the nEP-HGA and EP-DPSO for Problem 3

The developed heuristics were compared to the solutions from the traditional procedures, which were based on factorial design according to fuzzy customer demands. The combination experiments were conducted in quintuplicate. The parameters included the number of problems (Table 5) and the fluctuation of fuzzy \(a_{L}\) and \(a_{U}\) customer demands (20, 40, and 60 % of customer demands, which were an average of \(\bar{a}_{\omega }\)). The samples totaled 45 and the results are shown in the percentage of improvement presented in Eq. (12), where R_GA is the result of the traditional MSMT that entails using the GA, and R_DPSO is the result of the flexible MSMT that involves using EP-DPSO.

$$\begin{aligned} \% \hbox {improvement}=\frac{(R\_{\textit{DPSO}}-R\_{\textit{GA}})}{R\_{\textit{GA}}}\times 100 \end{aligned}$$
(12)

Table 9 shows an 8.2 % improvement from the flexible multistage network model when the data were analyzed using ANOVA. The percentage improvement differed significantly from actual situation practices at the 95 % reliability level and \(p < 0.05\). The parameter explaining this difference was the fluctuation of demand at 60 % of an average of \(\bar{a}_{\omega }\), which yielded the highest average improvement.

Table 9 Experimental design and results

8 Conclusion

Because globalization has introduced increased competition and unpredictable factors, customer demands are typically imprecise in each period and customer quantity demands in production-distribution models affect inventory costs and related costs, causing unsatisfactory planning. In this research, we formulated a MSMT supply chain network problem under uncertain demands as a mixed-integer programming model. However, the location-allocation sub-problem in the formulated model is NP-hard and highly complex. The DPSO approach combined with the EP-HGA using a fuzzy number is frequently used for practical purposes and is relatively easy to employ with triangular fuzzy numbers for solving large-scale problems with reasonable computational time, compared with the LINGO computational software.

Using uncertain customer demands in a flexible MSMT supply chain model, we combined the DPSO with the encoding/decoding nEP-HGA to determine delivery to customers in each period by using a triangular fuzzy number of customer demands. We selected the distribution center and retailers for each customer in the production-distribution network for satisfying uncertain customer demands. The experimental results prove that the EP-DPSO and nEP-HGA can be applied for solving all problem types with the best solution under uncertain customer demands. The proposed EP-DPSO outperforms the traditional GA and nEP-HGA in large problems and improves the traditional priority-based MSMT. This research can extend to various supply chain environment problems by providing an enhanced method with large echelons.