Introduction

Advances in supply chain management software and data warehousing practices, which enable data sharing through Electronic Data Interchanges (EDI), have helped in the development of coordinated supply chains (Tan 2001). Supply chain optimization involves both strategic decisions of facility location, and tactical decisions of inventory. Traditional supply chain optimization models in the literature treat location and inventory decisions separately (Wang and Yin 2013). An integrated supply chain management (SCM) strategy allows companies to increase efficiency and decrease waste. More specifically, successful implementation of an integrated SCM model results in savings in energy and fuel, in addition to the elimination of redundant activities; all of these benefits translate into money savings within the companies (Mentzer et al. 2001; Spekman et al. 1998). However, ignoring interaction between long-term decisions of location and short term decisions of inventory can lead to sub-optimality. Furthermore, companies are under intense pressure to cut product and material costs while maintaining a high level of quality and after-sale services. Achieving this starts with supplier selection. Therefore, an efficient supplier selection process needs to be in place and of paramount importance for successful supply chain management (Chan et al. 2008). Inventory management is one of the important scopes in SCM and many academic communities presented various strategies. In this work, the design of a two-echelon vendor–buyer supply chain network for a seasonal multi-product inventory problem is investigated. In recent years, numerous studies have being carried out on supply chain and inventory problems considering the two-echelon design. In Sadeghi et al. (2013), a constrained the two-echelon multi-vendor multi-retailer single-warehouse supply chain was developed, in which both the space and the annual number of orders of the central warehouse were limited. A two-echelon integrated procurement production model for the manufacturer and the buyer integrated inventory system was considered by Kumar et al. (2014) at which in which a centralized decision maker was used to optimize the joint total relevant cost. A coordination model of the joint determination of order quantity and reorder point variables was proposed in Chaharsooghi and Heydari (2010). The research decentralized supply chain consisting of one buyer and one supplier in a multi-period setting. In Cardona-Valdés et al. (2014) the design of a two-echelon production distribution network with multiple manufacturing plants, distribution centers and a set of candidate warehouses was considered. The study took into account a multi-objective version of supply chain in stochastic environment and a Tabu search algorithm was used to solve the problem. In Bandyopadhyay and Bhattacharya (2013) a NSGA II was proposed to solve a tri-objective problem for a two echelon serial supply chain. The objectives were: (1) minimization of the total cost of a two-echelon serial supply chain and (2) minimization of the variance of order quantity and (3) minimization of the total inventory. In Ghiami et al. (2013) a two-echelon supply chain model for deteriorating inventory was investigated, in which the retailer’s warehouse had a limited capacity. The proposed system included one wholesaler and one retailer which aimed to minimize the total cost. Sadeghi et al. (2014) developed a bi-objective vendor managed inventory model in a supply chain with one vendor and several retailers, in which the determination of the optimal numbers of different machines, working in series to produce a single item, was considered. The location allocation model was proposed by Cooper (1963) and extended by numerous researchers such as (Arnaout 2013; Harris et al. 2014; Hosseininezhad et al. 2013; Liu and Xu 2011; Mousavi and Niaki 2012; Mousavi et al. 2013c; Willoughby and Uyeno 2001).

This paper considers a supply chain network in which several vendors (manufacturers) are considered to be located in a certain area between numerous buyers who own the warehouses and have limited capacity. Furthermore, the objective is to find the optimal quantity (allocation) that each buyer orders from the vendors. In a location allocation problem, several new facilities are located in between a number of pre-specific customers in a determined area such that the total transportation cost from facilities to customers is minimized. In supply chain management, a number of studies have being probing the location allocation problem. Abolhasani et al. (2013) optimized a class of supply chain problems, known as multi-commodities consumer supply chain problem, where the problem considered to be a production–distribution planning category. It aimed to determine the facilities location, consumers’ allocation and facilities configuration to minimize the total cost of the entire network. Shahabi et al. (2013) developed mathematical models to coordinate facility location and inventory control for a four-echelon supply chain network consisting of multiple suppliers, warehouses, hubs and retailers. Wang and Yin (2013) investigated an integrated supply chain optimization problem in which the optimized facility locations, customer allocations, and inventory management decisions were considered when the facilities were subject to disruption risks. Diabat et al. (2013) considered a closed-loop location-inventory problem with Forward supply chain consisting of a single echelon where the distribution centers had to distribute a single product to different retailers with random demands. Furthermore, Ahmadi-Javid and Seddighi (2013) developed a location-routing problem in a supply-chain network considering a producer–distributors set which produced a single commodity and distributed it to a set of customers.

In the inventory control problems, the vendors sell their products under some discount policies in order to attract and encourage the customers to purchase more items. All unit discount (AUD) is one of the most common policies that have been taken into account in the literature, recently. Mousavi et al. (2013a) modeled a seasonal multi-product, multi-period inventory control problem in which the inventory costs were obtained under inflation and all-unit discount policy. A multi-item multiperiod inventory control problem with all-unit and/or incremental quantity discount policies under limited storage capacity was developed by Mousavi et al. (2013b). Recently, a deteriorating multi-item inventory model with price discount and variable demands via fuzzy logic under all unit discount policy has been investigated by Chakraborty et al. (2013). Jain et al. (2013) modeled a mixed-integer nonlinear programming for a system of one buyer–multiple suppliers system where the items were purchased under all unit discount policy. The objective was selecting a supplier from a pool of suppliers and allocating optimal order quantities for the acquisition of a firm’s total requirements for a particular product. Chen and Ho (2013) analyzed the optimal inventory policy for the single-order newsboy problem with fuzzy demand and quantity discounts. Furthermore, an integer linear programming approach was used in Choudhary and Shankar (2011) to solve a multi-period procurement, lot-sizing problem for a single product that was procured from a single supplier, considering rejections and late deliveries under all-unit quantity discount environment.

In the recent decades, meta-heuristics algorithms have attracted the attention of many researchers in order to optimize different and complex problems in various engineering and science domains. The Particle Swarm Optimization (PSO) algorithm is a popular and perhaps the most widely used meta-heuristic algorithms that was first introduced by Eberhart and Kennedy (1995). PSO is a population-based stochastic meta-heuristic algorithm that is inspired by the social behavior of bird flocking or fish schooling. PSO is a meta-heuristic that requires few or no assumptions on the problem being optimized and can search very large and complex spaces of candidate solutions. PSO can therefore be utilized on optimization problems that are partially irregular and noisy over time (Gigras and Gupta 2012). This algorithm has been used for solving the inventory and supply chain problems in recent years. Mousavi et al. (2013a) applied a PSO algorithm to solve a multi-product multi-period inventory control problem where the shortages (Backorder and Lost sale) were allowed. In the multi-objective version, Latha Shankar et al. (2012) modeled a single-product for four-echelon supply chain architecture consisting of suppliers, production plants, distribution centers and customer zones. Shankar used a PSO algorithm to solve the problem. Bachlaus et al. (2008) used PSO algorithm to optimize a multi-objective multi-echelon agile supply chain network in which a Taguchi method was applied to obtain the optimal levels of the PSO’s parameters. Bozorgi-Amiri et al. (2012) investigated a relief chain design problem for which, not only demands but also supplies and the cost of procurement in addition to transportation were considered as the uncertain parameters. Furthermore, the model considered uncertainty for the locations solving using the PSO algorithm. Park and Kyung (2013) proposed a method to optimize both the total cost and order fill rates in a supply chain using the PSO method. They automatically adjusted the initial inventory levels of all tiers involved in a supply chain by considering information quality level, which was determined by the degree of availability of lead time history data.

In order to optimize the proposed multi-product multi-period supply chain problem and determine the location of the vendors in a specific area among the buyers, a modified particle swarm optimization (MPSO) is utilized in this paper.

The rest of the paper is organized as follows. In the second section, a description of the provided problem is explained where the supply chain model is formulated. In the third section contains the solution methodologies of the problem in which MPSO and GA are explained. In the fourth section, some numerical examples are generated to compare the algorithms where Taguchi approach is presented for setting the algorithms’ parameters. Finally, a conclusion of the problem and some recommendations for the future works are represented in last section.

Problem description and formulation

This paper aims to optimize a supply chain network for a seasonal multi-product inventory system with multiple buyers, multiple vendors and warehouses with limited capacity owned by the vendors. The inventory replenishment starts at a certain time-period and finish at another time-period where the buyers purchase the products from the vendors during these interval periods. The vendors provide (produce) the various products to the buyers with variable demand rates under all-unit discount policy since the production capacity of each vendor is restricted. The vendors satisfy the buyers’ demands immediately in all the periods so that no shortages occur during the replenishment. When the demands of the buyers are satisfied in a period, the products remained from the period in addition to the ordering quantities of the next period enter into the warehouses. The novelty of the problem is that the integrated supply chain expressed in this paper simultaneously determines two types of decision variables: (i) the locations of the vendors in a certain area among the buyers with fixed locations and (ii) the allocation: the order quantities of the seasonal/fashion products at each period made by the buyers from the vendors. The total available budget for purchasing the products and also the total vendors’ warehouse space are constrained. Moreover, the distance between the buyers and the vendors is assumed as Euclidean distance. Figure 1 shows a graphical illustration of the proposed model where the vendors store the products into their warehouses and then the products are transported from these warehouses to the buyers.

Fig. 1
figure 1

The illustration of the supply chain model

Notations and assumptions

The indexes, notations and assumptions involved in the supply chain model come as follows:

Indexes

\(i=1,2,\ldots ,I\) :

is the index of the buyers

\(j=1,2,\ldots ,J\) :

is the index of the products

\(k=1,2,\ldots ,K\) :

is the index of the vendors

\(t, t=0,1,\ldots ,T\) :

is the index of the time periods

\(p, p=1,2,\ldots ,P\) :

is the index of the price break points

Notations

\(u_{ijktp}:\) :

A binary variable that is set to 1 if buyer \(i\) purchases product \(j\) from vendor \(k\) at price break point\(j\) in period \(t\), and set to 0 otherwise

\(d_{ijkt}:\) :

Demand of buyer \(i\) for product \(j\) produced by vendor \(k\)in period \(t\)

\(T_{ijkt}:\) :

Total time elapsed up to and including the \(t\)th replenishment cycle of the \(j\)th product ordered by buyer \(i\) from vendor \(k\)

\(f_k:\) :

The production capacity of vendor \(k\)

\(h_{ijkt}:\) :

Inventory holding cost per unit of \(j\)th product in the warehouse owned by vendor \(k\) sold to buyer \(i\) in period \(t\)

\(A_{ijkt}:\) :

Ordering cost (transportation cost) per unit of \(j\)th product from vendor \(k\) to buyer \(i\) in period \(t\)

\(c_{ijktp}:\) :

Purchasing cost per unit of \(j\)th product paid by buyer \(i\)to vendor \(k\) at \(p\)th price break point in period \(t\)

\(e_{ijktp}:\) :

\(p\)th price break-point proposed by vendor \(k\) to buyer \(i\) for purchasing \(j\)th product in period \(t\) \((e_{\hbox {ijkt1}} =0)\)

\(s_{ijkt}:\) :

The required warehouse space for vendor \(k\) to store per unit of \(j\)th product sold to buyer \(i\) in period \(t\)

\(B:\) :

The total available budget

\(C:\) :

An upper bound for the available order quantity

\(w_{ijkt}:\) :

A binary variable that is set to 1 if buyer \(i\) orders product \(j\) from vendor \(k\) in period \(t\), and set to 0 otherwise

\(\hbox {TC}:\) :

The total inventory costs

\(a_i = (a_{i1},a_{i2}):\) :

The coordinates of the location of buyer \(i\)

\(y_k = (y_{1k},y_{2k}):\) :

The coordinates of the location of vendor \(k\) (decision variable)

\(Q_{ijkt}:\) :

Ordering quantity of \(j\)th product purchased by buyer \(i\) from vendor \(k\) in period \(t\) (decision variable)

\(x_{ijkt}:\) :

The initial (remained) positive inventory of \(j\)th product purchased by buyer \(i\) from vendor \(k\)in period \(t\) \((x_{ijk1} =0)\) (decision variable)

\(I(t):\) :

Inventory position in period \(t\)

\(g(y_{1k},y_{2k}):\) :

The region to locate the vendor \(k\) (here is trapezoidal)

Assumptions

  • The shortages are not allowed that is a common assumption in the literature (Mousavi et al. 2013b).

  • The Replenishments are instantaneous. In other words, the orders will be received by the buyers as far as they make an order, without any delay.

  • The buyers’ demand rates of all products are independent from each other and variable in the different periods. It means each buyer has his/her own demand rates.

  • The initial inventory level of all products ordered by the buyers from each vendor is assumed to be zero (i.e.,\(\hbox {x}_{\mathrm{ijk1}} =0\)) (Mousavi et al. 2013b).

  • The order quantity of the products from the vendors made by the buyers in each period is at least equal to the demand rates in during the period (i.e. \(\hbox {Q}_{\mathrm{ijkt}} \ge \hbox {d}_{\mathrm{ijkt}} \hbox {T}_{\mathrm{ijkt}})\). This assumption is to prevent the demands facing with shortages.

  • Planning horizon is finite and known. In the planning horizon, there are T periods of unequal length which is the same for seasonal items in real world.

  • The total available budget to purchase the products, the total warehouse space of each vendor and the total production capacity of the vendors are limited.

  • The distance between the buyers and the vendors is assumed to be Euclidean distance.

  • The paths between the buyers and the vendors are connected and the unit transportation cost is the proportionate of quantity supplied and distance traveled. This causes the buyers and the vendors are accessible to each other.

  • No order is made at the last period (season).

Problem formulation

In order to formulate the supply chain problem in hand, Fig. 2 provides some possible scenarios for the inventory system of the problem. The objective function of the problem is to minimize the total costs comprising Transportation cost \((TrC)\), Holding cost \((HC)\) and Purchasing cost \((PC)\). To formulate the objective function, first the transportation cost is calculated. The transportation cost is obtained by considering the Euclidean distance between the buyers and the vendors using the following equation:

$$\begin{aligned} TrC&= \sum _{i=1}^I \sum _{j=1}^J \sum _{k=1}^K \sum _{t=1}^T Q_{ijkt} w_{ijkt} A_{ijkt}\nonumber \\&\times \sqrt{(y_{k1} -a_{i1})^{2}+(y_{k2} -a_{i2})^{2}} \end{aligned}$$
(1)

where \(\sqrt{(y_{1k} -a_{i1})^{2}+(y_{2k} -a_{i2})^{2}}\) calculates the Euclidean distance between buyer \(i\) with coordinate \(a_i =(a_{i1}, a_{i2})\) and vendor \(k\) with coordinate \(y_k =(y_{1k},y_{2k})\).

Fig. 2
figure 2

Some possible scenarios for the available inventory system

According to Fig. 2, the holding cost in interval \([T,T-1]\) is obtained using the following equation:

$$\begin{aligned} \int _{T-1}^T {I(t)dt} \end{aligned}$$
(2)

and for the whole periods we have:

$$\begin{aligned} \sum _{t=2}^T {\int _{t-1}^t {I(t)dt}} \end{aligned}$$
(3)

Therefore, the total holding cost becomes:

$$\begin{aligned} HC&= \sum _{i=1}^I \sum _{j=1}^J \sum _{k=1}^K \sum _{t=1}^{T-1} (x_{ijkt} +Q_{ijkt} +x_{ijkt+1})\nonumber \\&\times T_{ijkt} h_{ijkt}/2 \end{aligned}$$
(4)

In the proposed supply chain problem, the buyers purchase the products in each period under the discount strategy provided by the vendors. In this work, the products are bought under AUD policy since the price-break point suggested by the vendors is as:

$$\begin{aligned} \left\{ {\begin{array}{cc} c_{ijkt1} &{}\quad e_{ijkt1} \le Q_{ijkt} <e_{ijkt2} \\ c_{ijkt2} &{}\quad e_{ijkt2} \le Q_{ijkt} <e_{ijkt3} \\ &{}\quad \vdots \\ c_{ijktP} &{}\quad e_{ijktP} \le Q_{ijkt} \\ \end{array}}\right. \end{aligned}$$
(5)

Then, the total purchasing cost under AUD policy is obtained as Eq. (6).

$$\begin{aligned} PC=\sum _i^I {\sum _j^J {\sum _k^K {\sum _t^{T-1} {\sum _p^P {Q_{ijkt} c_{ijktp} u_{ijktp}}}}}} \end{aligned}$$
(6)

Therefore, the objective function of the total cost comes as:

$$\begin{aligned} Tc=TrC+HC+PC \end{aligned}$$
(7)

The supply chain model proposed in this paper is formulated as follows:

$$\begin{aligned}&MinTc= \sum _{i=1}^I \sum _{j=1}^J \sum _{k=1}^K \sum _{t=1}^T Q_{ijkt} A_{ijkt} w_{ijkt}\\&\quad \times \sqrt{(y_{1k} -a_{i1})^{2}+(y_{2k} -a_{i2})^{2}}\\&\quad +\sum _{i=1}^I \sum _{j=1}^J \sum _{k=1}^K \sum _{t=1}^{T-1} (x_{ijkt} +Q_{ijkt} +x_{ijkt+1})T_{ijkt} h_{ijkt}/2\\&\quad +\sum _{i=1}^I {\sum _{j=1}^J {\sum _{k=1}^K {\sum _{t=1}^{T-1} {\sum _{p=1}^P {Q_{ijkt} c_{ijktp} u_{ijktp}}}}}} \end{aligned}$$
(8)

S.t.

$$\begin{aligned}&x_{ijkt+1}=x_{ijkt} +Q_{ijkt} -d_{ijkt} T_{ijkt}\end{aligned}$$
(8a)
$$\begin{aligned}&\sum _{j=1}^J \sum _{k=1}^K \sum _{t=1}^T (Q_{ijkt} +x_{ijkt})s_{ijkt} \le S_j\end{aligned}$$
(8b)
$$\begin{aligned}&\sum _{i=1}^I \sum _{j=1}^J \sum _{t=1}^T Q_{ijkt} \le f_k\end{aligned}$$
(8c)
$$\begin{aligned}&\sum _{i=1}^I \sum _{j=1}^J \sum _{k=1}^K \sum _{t=1}^{T-1} \sum _{p=1}^P Q_{ijkt} c_{ijktp} u_{ijktp} \le B\end{aligned}$$
(8d)
$$\begin{aligned}&Q_{ijkt} \le C\end{aligned}$$
(8e)
$$\begin{aligned}&w_{ijkt} = \left\{ {\begin{array}{ll} 1&{}\quad if\;\hbox {Q}_{ijkt} >0 \\ 0&{}\quad otherwise \\ \end{array}}\right. \end{aligned}$$
(8f)
$$\begin{aligned}&\sum _{p=1}^P u_{ijktp} = \left\{ {\begin{array}{ll} 1&{}\quad if\;\hbox {Q}_{ijkt} >0 \\ 0&{}\quad otherwise \\ \end{array}}\right. \\&Q_{ijkt} \in \mathrm{Z},x_{ijkt} \ge 0;w_{ijkt},u_{ijktp}\nonumber \\&\quad \in \quad binary;\;g(y_{1k},y_{2k})\ge 0;\nonumber \\&\quad (for\;i=1,2,\ldots ,I;\;j=1,2,\ldots ,J;\nonumber \\&\quad k=1,2,\ldots ,K;\; t=1,2,\ldots ,T)\nonumber \end{aligned}$$
(8g)

In Eq. (8), there are several constraints that can increase the complexity of the model. The restriction (8a) obtains the initial inventory of each buyer in each period remained from the previous period. Equation (8b) determines that each vendor’s warehouse has a limited capacity. Also, each vendor has a limited production capacity that is shown by Eq. (8c). The total available budget to purchase the products is restricted where the relevant limitation is proposed by Eq. (8d). Furthermore, Eq. (8e) shows an upper bound (due to the production limitations) for the order quantities. Equation (8f) represents a binary variable for making an order and Eq. (8g) says each buyer must purchase each item maximum at a price break point in each time.

Solution methodologies

In the current research, in order to solve the proposed two-echelon supply chain model, a MPSO is applied where a GA algorithm is used to validate the performance of the proposed algorithm. The MPSO is explained as the following stages.

Initializing the parameters

Firstly, the parameters concerned with the MPSO including the number of particles \((NoP)\), the number of generations \((NoG)\) and two parameters \(\lambda _1\) and \(\lambda _2\), are defined. Additionally, the position and velocity, which are two variables in PSO algorithm, are initialized using Eqs. (9) and (10), respectively. In Eq. (9), \(z_0^l\) is the initial position of article \(l(l=1,2,\ldots ,NoP)\), \(z_{\min }\) is the lower and upper bound on the design variables (here, \(z_{\min } =0\) and \(z_{\max } =C\) for \(Q\)) and \(rand\) is a random number in the interval \((0,1)\). Also, in Eq. (10) \(v_0^l\) is the initial velocity of the article \(l(l=1,2,\ldots ,NoP)\) and \(\eta \) is the constant time increment and assumed 1. These parameters are also adjusted using the Taguchi method which is explained in the next section. Figure 3 shows a representation of the particles, where the values of the order quantity are generated randomly in the interval of \(\left[ {0,C}\right] \) and the number of particles in each generation is set to \(NoG\). Moreover, the vendors and customers are assumed to be located into a certain region with coordinates \(y_1 \in [0,100]\) and \(y_2 \in [0,100]\).

$$\begin{aligned} z_0^l&= z_{\min } +rand(z_{\max } -z_{\min })\end{aligned}$$
(9)
$$\begin{aligned} v_0^l&= \frac{z_0^l}{\eta } \end{aligned}$$
(10)
Fig. 3
figure 3

The presentation of a particle

Evaluating the articles

In this stage, we evaluate each of the articles by using Eq. (8). Figure 4 represents a population of the articles since the objective value of the articles is depicted by \(TC\).

Fig. 4
figure 4

The representation of a population of the articles

Updating the velocities and positions

In order to search the solutions in the feasible area of the problem, the velocity and position of the articles in each generation of PSO are updated as the following formulas.

$$\begin{aligned} v_{n+1}^l&= w.v_n^l +\lambda _1 .r_1 .(pBest_n^l -z_n^l)\nonumber \\&+\,\,\lambda _2 .r_2 .(gBest_n -z_n^l)\end{aligned}$$
(11)
$$\begin{aligned} z_{n+1}^l&= z_n^l +\eta .v_{n+1}^l \end{aligned}$$
(12)

In Eq. (11), \(r_1\) and \(r_2\) are two numbers generated randomly in the interval of \((0,1)\), the coefficients \(\lambda _1\) and \(\lambda _2\) are the given acceleration constants towards \(pBest\) and \(gBest\), respectively, and \(w\) is the inertia weight where is expressed as Eq. (13) (Naka et al. 2001). Furthermore, \(pBest_n^l\) and \(gbest_n\) are the best fitness value for particle \(l\) until time \(n\), (\(n=1,2,\ldots ,NoG)\) and the best particle among all until time \(n\), respectively.

$$\begin{aligned} w=w_{\max } -\frac{(w_{\max } -w_{\min })}{NoG}.n \end{aligned}$$
(13)

In Eq. (13), \(NoG\) is the maximum number of iterations and \(n\) is the current number of iteration. Shi and Eberhart (1999) and Naka et al. (2001) have claimed the best result will be obtained since \([w_{\min }, w_{\max }]=[0.4,0.9]\).

An important aspect of generation and initializing the articles is that solutions must be feasible and satisfy the constraints. A penalty function approach is used for those particles that do not satisfy all the constraints given in Eq. (14).

$$\begin{aligned} R(x)\le L \end{aligned}$$
(14)

Therefore, the corresponding penalty function is defined as follows:

$$\begin{aligned} F(x)= \left\{ {\begin{array}{ll} 0&{}\quad if\;\hbox {inequality is satisfied} \\ (R(x)-L)^{\alpha } &{}\quad {otherwise} \\ \end{array}}\right. \end{aligned}$$
(15)

Where \(\alpha \) is the coefficient of the penalty function (here, \(\alpha =10)\).

Stopping criterion

In a meta-heuristic algorithm, the stopping criterion can be reached by specifying CPU time, a specific value of the objective value, or a specified number of generation. In this research, the number of generation \((NoG)\) has been adopted to stop the optimization process.

Furthermore, in order to validate the performance of MPSO, a GA is applied based on the following steps.

  • Initialize the chromosomes, the number of generation \((NoG)\), the number of population \((NoP)\), the probability of crossover \((P_C)\) and the probability of mutation \((P_m)\).

  • Evaluate the chromosomes by using Eq. (8).

  • Select the chromosomes based on the tournament method to enter the production pool (each time select two chromosomes and one with the best objective value is selected).

  • Perform crossover operator on the chromosomes. First, for each chromosome, generate a random number between 0 and 1. Those are selected for the crossover operator that their related random numbers are set to less or equal to \(P_C\). Next, two chromosomes out of the selected chromosomes are chosen for the crossover operator randomly. If \(chro_1\) and \(chro_2\) are the two chosen chromosomes (parents), the offsprings are generated as:

    $$\begin{aligned} off_1&= rand.chro_1 +(1-rand).chro_2\nonumber \\ off_2&= (1-rand).chro_1 +rand.chro_2 \end{aligned}$$
    (16)

    where \(rand\) is a random number between 0 and 1 and \(off_1\) and \(off_2\) are the offspring.

  • Perform mutation operator. In this operator, a random number is also generated between 0 and 1 for each chromosome for which the 1s are selected for mutation operator that have values less or equal to \(P_m\). Hence, the mutation operator generates the new chromosomes from the selected chromosomes as follows: in each chromosome a variable is selected randomly and is changed in the range randomly.

  • Perform elitism operator. Those chromosomes that are not selected for both crossover and mutation operators enter directly to next generation in the order of their objective values while the number of population reaches \(NoP\).

  • Stop the algorithm based on is reaching a specific number of generation.

Data generating, Parameter setting and computational results

In this section, first a range of random numerical examples are generated to evaluate the algorithms on the supply chain model. Secondly, we design a Taguchi method to tune the parameters of the algorithms where MINITAB software version 15 is used to analyze the data. In order to solve the model proposed by Eq. (8), MATLAB (R2013a) software is used to code the algorithms on a PC with RAM 4GH and CPU 2.5 dual cores.

Generating random data

The random examples are constructed by generating uniformly distributed random points for the parameters provided in this study. Parameter generation is summarized in the list shown in Table 1 where \(U[\ldots ]\) shows an uniform distribution.

Table 1 The input data of the test problems
Table 2 Sizes of the proposed instances

In this study, three categories based on size each one with 10 instances were generated randomly. The Small-scale instances are generated with 5–10 buyers, 1–5 products and vendors and 1 to 3 periods. The Medium-scale instances are generated with 11–20 buyers, 6–10 products, 1–10 vendors, and 1–5 periods since in Large-scale instances these values are 20–30 for buyers, 11–15 for products and vendors and 6–10 for periods. Additionally, the number of price-break point for all the three categories is considered to be 4.

Parameter setting

One of the major problems in using meta-heuristic algorithms is that the algorithm parameters can take different values for different problems. A searchable space refers to the possibility of measuring the distance (similarity) between any two candidates so that a sensible search space (landscape) could be defined. In other words, for any candidate, it should be possible to find out which candidates are close to it and which candidates are far from it (Yuan and Gallagher 2005). In this work, in order reduce the computational time to obtain the best solution, the proposed MPSO and GA algorithms are tuned using the Taguchi method. The Taguchi method is a fractional factorial experiment introduced by Taguchi applied as an efficient alternative for full factorial experiments (Shavandi et al. 2012). The Taguchi method is also one of the most well-known approaches that is utilized for tuning the meta-heuristic parameters used in the literature recently (Mousavi et al. 2013a, b; Mousavi and Niaki 2012; Mousavi et al. 2013c; Peace 1993; Sadeghi et al. 2013). As aforementioned, MPSO and GA are applied to find the optimal solutions of the two-echelon supply chain network in Eq. (8) at which \(\lambda _1, \lambda _2, NoP\) and \(NoG\) are the input parameters of MPSO and \(P_C, P_m, NoP\) and \(NoG\) are the input parameters of GA. In this research, the “Smaller is Better” type of response has been employed (since the goal is to minimize S/N), where S/N is given as.

$$\begin{aligned} S/N_{ratio} =-10\times \log \left( \frac{\sum _{l=1}^\beta {Y_l}}{\beta }\right) \end{aligned}$$
(17)

In Eq. (17), \(Y\) and \(\beta \) (here, \(\beta =1\)) are the response and the number of orthogonal arrays, respectively. To design the Taguchi for both meta-heuristic algorithm parameters, we used \(L_9\) design where the values and levels of the parameters are given in Table 3. The values in Table 3 are obtained after numerous tests and analyses on the current instances of the categories using the frequent runs of the algorithms. We represent the experimental design for Problem No. 1 of Small-scale category in details in order to show how the parameters are tuned in each of instances. Table 4 represents the orthogonal arrays along with their responses for both MPSO and GA for Problem No. 1 of Small-scale. In Table 4, A and B show the factors of \(\lambda _1\) and \(\lambda _2\) in MPSO and \(P_C\) and \(P_m\) in GA respectively since \(C\) and \(D\) are equivalent to \(NoP\) and \(NoG\) in both MPSO and GA. Moreover, the sixth and seventh columns of Table 4 represent the responses of MPSO and GA approaches for Problem No. 1 of Small-scale category respectively. Figures 5 and 6 display the mean S/N ratio plot of the MPSO and GA for Problem No. 1 of Small-scale respectively. According to Figs. 5 and 6, the optimal levels of the MPSO’s factors are \(\lambda _1 =2.5, \lambda _2 =2, NoP=20\) and \(NoG=100\) where these levels for GA’s factors are \(P_C =0.6, P_m =0.2, NoP=40\) and \(NoG=500\) for GA.

Table 3 The MPSO and GA parameters’ levels
Table 4 The experimental results on the MPSO and GA parameters for Problem No. 1 of Small-scale
Fig. 5
figure 5

The mean S/N ratio plot of the MPSO on Problem No. 1 of Small-scale

Fig. 6
figure 6

The mean S/N ratio plot of the GA on Problem No. 1 of Small-scale

The results and comparisons

In this section, we compare the results obtained from both MPSO and GA with each other on the 10 instances generated of the three abovementioned categories to find the best methodology for solving the proposed two-echelon supply chain model. Tables 5, 6 and 7 demonstrate the input parameter and the objective values of both MPSO and GA for each one of the instances of the three categories generated in the range given in Table 2. In these tables, the optimal values of the algorithm parameters are obtained using the Taguchi method with \(L_9\) design. Furtheremore, the optimal values of the objective function for MPSO and GA (i.e. \(TC\)) resulted from each instance of the three categories are also shown in the columns 14 and 19 of Tables 5, 6 and 7, respectively.

Table 5 The input parameters and the objective function of MPSO and GA for Small-scale problems
Table 6 The input parameters and the objective function of MPSO and GA for Medium-scale problems
Table 7 The input parameters and the objective function of MPSO and GA for Large-scale problems

In order to compare the performance of MPSO and GA in term of the objective function, several approaches are employed in this research. First, we have taken the average and standard deviation (SD) of each 10 instances for all the category problems showing in the last two rows of Tables 5, 6 and 7. The results of average and SD of the instances in the three categories demonstrates that MPSO has outperformed GA.

A graphical approach shown by Fig. 7 is also secondly applied to compare the performance of the algorithms on the 10 generated instances of Small-scale, Medium-scale and Large-scale categories. According to Fig. 7, in each three (a) Small-scale, (b) Medium-scale and (c) Large-scale, the proposed MPSO seems to have a better efficiency than GA.

Fig. 7
figure 7

The graphical representation of the objective function resulted from MPSO and GA on the generated instances of a Small-scale, b Medium-scale and c Large-scale

Finally, to compare the performance of the algorithms, we have performed an independent two-sample t-test with a 95 % confidence for the instances of the categories where a hypothesis test for means of MPSO and GA when their standard deviations are unknown is as:

$$\begin{aligned} \hbox {H}_0 :\mu _{MPSO} - \mu _{GA} = \delta _0\;\hbox {versus}\; \hbox {H}_1 : \mu _{MPSO} - \mu _{GA} \ne \delta _0 \end{aligned}$$

at which \(\mu _{MPSO}\) and \(\mu _{GA}\) are the means of the objective values of the two algorithms and \(\delta _0\) is the hypothesized difference between the means of the algorithms. Tables 8, 9 and 10 depict the results of t test for the instances of Small-scale, Medium-scale and Large-scale categories respectively. From Tables 8 and 9, it is clear that P values are greater than commonly chosen 0.05-levels. Hence, there is no evidence for a difference in the performance of the algorithms on the instances of Small-scale and Medium-scale categories. However, the P value in Table 10 shows that there is a significant difference between the two algorithms for the instances of Large-scale category. Therefore, MPSO has performed efficiently for solving the integrated location allocation two-echelon supply chain problem (Fig. 8).

Fig. 8
figure 8

A representation of the optimal solution obtained by MPSO for Problem No. 1 of Small-scale category

Table 8 The ANOVA for the instances of Small-scale category
Table 9 The ANOVA for the instances of Medium-scale category
Table 10 The ANOVA for the instances of Large-scale category

For more understanding of the solutions, the optimal order quantity and location of the vendors obtained by MPSO for Problem No. 1 of Small-scale category is shown in Fig. 9. Furtheremore, in order to clarify the trend of the solutions obtained from first generation to the last, Figs. 9 and 10 demonstrate the convergency path of the objective values for the MPSO and GA for Problem No. 10 of Medium-scale category respectively. Figure 11 also shows a representation of the optimal locations of the vendors among the buyers obtained by MPSO for Problem No. 7 of Medium-scale category.

Fig. 9
figure 9

The convergency path of MPSO for Problem No. 10 of Medium-scale category

Fig. 10
figure 10

The convergency path of GA for Problem No. 10 of Medium-scale category

Fig. 11
figure 11

The optimal location of the vendors among the buyers obtained by MPSO for problem No. 7 of Medium-scale category

Conclusion and future works

In this work, a two-echelon supply chain network for a seasonal inventory control problem was investigated where the vendors stored the produced products into their warehouses. The retailers made the orders for these products under all unit discount policy. The main goal of the problem was to find the order quantity of the products purchased by the buyers in addition to determining the optimal location of the vendors among the known location of buyers so that the total supply chain cost comprising transportation, holding and purchasing costs is minimized. The distances between the buyers and the vendors were supposed as the Euclidean distance. To solve the proposed supply chain model, a MPSO algorithm was employed where a GA was utilized to validate the results of the proposed algorithm. Taguchi method was also applied to set the parameters of the two algorithms. The contribution of the study was to determine the locations of the vendors between the customers in a certain area, the order quantities purchased by the buyers from the vendors and the optimal levels of the algorithms’ parameters by Taguchi. The results of the algorithms showed the MPSO has a better performance than the GA in term of the objective function on the generated instances of the three categories.

Some recommendations for future works consist of extending the model in a stochastic or fuzzy environments. In addition, shortages in combination of backorder and lost sale can be considered. Furthermore, the problem can be investigated in the context of inflation and the time value of money.