Introduction

Many factors should be considered when locating new facilities, and one of the most important is the existence of the competitors that offer the same products or services in a market. When there is no competitor for a specified product or service, there is a monopoly market for the new and existing facilities. The vast portion of location theory is location problems in the monopoly condition. In fact, this kind of model rarely seems to be practical in reality, as there are often companies which compete with each other. A review of the relevant researches can be seen in Ashtiani (2016).

“A location model is said to be about competitive facilities when it explicitly incorporates the fact that other facilities are already/will be present in the market and that the new facility/facilities will have to compete with them for its/their market share” (Plastria 2001). The competitive location concept was developed by Hotelling (1929). He considered the location problem for two competitors. The customers are evenly distributed along a line. The Hotelling model shows that all customers meet their demands from the nearest facility and many researches based on this field have been done and continued.

In the competitive location area, there are three types of competition which affect the competitive characteristics of different competitors in a market: (1) static competition, (2) competition with foresight and (3) dynamic competition (Plastria 2001; Ashtiani 2016). In this paper, the first category, i.e., static competition has been considered. Static competition assumes that a new competitor enters a market and supplies the same products and services as existing competitors. The characteristics of the existing competitors are known by the entrant competitor. The basic assumption in such models is that the competitive factors of the existing competitors are not allowed to change following the new competitor’s entrance. Such models involve only strategic decisions (Farahani et al. 2014). These models also form the basis on which more complex models may be built (Plastria 2001). For a review of current literature in this area, we refer the reader to Drezner (1995) and Plastria (2001).

Huff (1964) defined the facility utility function by considering not only the distance, but also the quality (design) of the facility. Huff considered a new customer patronizing behavior, in which the customers probabilistically meet their demands from different facilities. The mentioned probability is proportional to the design of the facility and inversely proportional to a function of distance between them. There are many studies in the competitive location field that uses the Huff’s rule for customer’s patronizing behavior (Drezner and Drezner 2002; Benati 2003; Aboolian et al. 2009; Drezner and Drezner 2004; Ashtiani et al. 2011; Ramezanian and Ashtiani 2011; Ashtiani et al. 2013).

In the majority of models in literature, the design of new facilities has been predetermined and the optimal location of new facilities is considered as the only decision variable of the problem. On the other hand, several researchers are recently interested in the studies and models in which their aim is to find the optimal design and location of new facilities (Plastria and Carrizosa 2004; Aboolian et al. 2007; Fernández et al. 2007; Tóth et al. 2009; Redondo et al. 2009; Redondo et al. 2011; Saiz et al. 2011; Saidani et al. 2012; Wang and Ouyang 2013; Redondo et al. 2013). These problems are called location-design models in competitive location literature and both the optimal location and design of new facilities are considered as the variables of the problem.

Plastria and Carrizosa (2004) determined the optimal location and design of a new facility in a model in which the customers are attracted to the facility that has the most attraction. Aboolian et al. (2007) developed a model in which the optimal location and design of a set of facilities are obtained. They considered that the demand is elastic and increases with the enhancement of customer utility. Fernandez et al. (2007) determined the optimal location and design of a new facility in Huff-like model in a plane space. These authors solved their previous model by considering different spatial pattern and conditions of parameters and offered the necessary insights to the modelers for noticing these factors in the obtained results (Tóth et al. 2009). Redondo et al. (2009) solved the optimal location and design problem for more than one facility and investigated the sensitivity analysis of different parameters. The authors also obtained the optimal location and quality in the leader–follower problem, in which each competitor intends to open a new facility (Redondo et al. 2011). Saiz et al. (2011) obtained a Nash equilibrium in location-design models. Saidani et al. (2012) assumed that when a competitor opens a new facility, other competitors react to this action by changing their design of facilities and consequently the new design of the competitor’s facilities is the variable of the problem. Wang and Ouyang (2013) presented a model for optimizing service facility location design under spatial competition and facility disruption risks. Redondo et al. (2013) developed a two-level evolutionary algorithm for solving the facility location and design of a leader–follower problem on the plane with variable demand.

The number of new facilities is fixed and predetermined in most location-design models in literature and the chain maximizes the profit obtained by subtracting the costs from the income through opening new facilities. In these models, adding the number of new facilities leads to cost increase, but the obtained income is more than the costs which are afforded. Consequently the more the number of facilities, the higher is the chain’s profit. The assumption may be true, but what should be considered is that whether the chain is able to increase the number of facilities, or in other words, whether the budget that the company considers for its presence in the market is sufficient for increasing new facilities. On the other hand, since the cost of facility opening and designing can belong to those costs which are only afforded once (e.g., land purchasing and premises as a facility opening cost and the purchasing cost of modern looking equipment as a designing cost are only afforded at first), the budget for this kind of costs can be determined and considered as a constraint and the market share function can be used instead of profit function. Considering the budget constraint helps us determine the number of new facilities and their design levels to maximize the market share. For example, it may be more beneficial to open one new facility with maximum design level instead of two new ones with lower design level; this kind of analysis cannot be done in models where the number of new facilities is fixed and predetermined.

To date, few researches have been done on the location-design problem with an unknown number of new facilities (Aboolian et al. 2007; Drezner et al. 2012; Küçükaydin and Aras 2011; Küçükaydin et al. 2012). Aboolian et al. (2007) solved the location-design problem in which the demand was assumed to be elastic. In Drezner et al. (2012), the authors used the cover approach for customer patronizing behavior, and the branch and bound procedure for obtaining the optimal strategy of improving existing and establishing new facilities. In Küçükaydin and Aras (2011) and Küçükaydin et al. (2012), location-design problem has been solved for profit maximization objective in the leader–follower case under the condition that the number of new facilities is not fixed.

The model proposed in this paper presents the location-design problem with the consideration of a budget constraint, in which the demand is inelastic and the customer patronizing behavior is according to the Huff rule. A novel hybrid continuous and discrete firefly algorithm (HCDFA) has been developed for the model proposed in this paper. Firefly algorithm, developed by Yang (2008), is a new population-based technique for solving optimization problem, especially for NP-hard problems, and has been motivated by the simulation of the social behavior of fireflies. Lukasik and Zak (2009) use the firefly algorithm for continuous constrained optimization. Their computational experiments show the efficiency of the firefly algorithm. The original firefly algorithm has been used for solving continuous optimization problems. Sayadi et al. (2010) suggested a discrete firefly algorithm for flow shop scheduling problem. In fact, they modify the original firefly for discrete problems. In this paper, we develop a hybrid continuous and discrete firefly algorithm for the first time in the literature. The proposed algorithm will be an appropriate method for optimization problems in which both types of variables (discrete and continuous) existed in a problem.

A real-world application of locating new chain stores in the city of Tehran, Iran, is used in this paper and the results are analyzed. Moreover, several examples are solved by the proposed firefly algorithm and their results compared with those obtained by an Optimization Solver. The results show the algorithm’s high efficiency, as it can produce good quality solution in an acceptably short time.

The remainder of the paper is organized as follows. In “Proposed model”, the proposed model is presented. “The proposed HCDFA” describes the HCDFA for solving the model. “Case study” presents the real-world case study. Other examples and the respective computational results are analyzed in “Computational experiments”, and, finally, “Conclusion” provides the conclusions and suggestions for further research.

Proposed model

It is assumed that there are some competitors who compete with each other by offering similar products or services. They have established some facilities in advance. There are m facilities, of which t facilities belong to the chain and the remaining mt facilities belong to the chain’s competitors.

The customers are considered as demand points and each of them has a buying power. The buying power can be interpreted either as the existing customer population in a demand point or their ability to buy the products from the new or existing facilities. There are n demand points in the market and the jth demand point has the buying power b j . It is assumed that the products/services supplied by the facilities are essential (e.g., bread) and the customer meets all their demand from the existing facilities in the market. Therefore, when a competitor opens a new facility in the market, it cannibalizes some demands of the existing ones. Huff rule is considered for customer patronizing behavior. According to this rule, the customers share their demand to all facilities probabilistically. The probability of a given facility to attract a customer increases by enhancement of the facility’s utility. The facility’s utility can include distance to the customer, product/service price, facility size, the number of personnel in the respective facility, parking availability, personnel treatment with customers and the accessibility to the facilities. In fact, all characteristics except the distance between the facility and the customer can be called “quality” or “design”. The amount of a given facility’s utility has a direct relationship with the level of design of the facility and a reverse one with a function of distance between the facilities and the demand points.

In the current competitive market, the chain intends to increase its presence by opening some new facilities with a constrained budget. There are l potential locations for opening new facilities. One of the major constraints in the proposed model that leads to the chain’s lack of accurate information about the number of new facilities is the budget. Obviously, different potential locations and different design levels have various costs. Therefore, the optimal combination of the number of new facilities, their locations and their design levels is not predetermined. So, the chain aims at determining the optimal location and the design level of its new facilities. In addition, the number of new facilities is also endogenously determined by the model.

The following notations are used for formulating the proposed model:

According to Huff rule, the facility’s utility level for a customer has a direct relationship with design and a reverse one with a function of distance between the customer and the facility. Assuming squared distance as the distance function, the utility level of the existing facility i for customer j equals:

$$A_{ij} = \alpha_{i} /\left( {\varepsilon + d_{ij}^{2} } \right).$$
(1)

The denominator becomes zero if the distance is zero, and consequently makes the fraction undefined. Therefore, ε is added to \(d_{ij}^{2}\) to prevent the denominator from becoming zero.

Similarly, the utility levels of the new facilities (if it is opened at a potential location k) for customer j is as follows:

$$A_{kj}^{n} = q_{k} /\left( {\varepsilon + \mathop {d_{kj}^{n} }\nolimits^{2} } \right).$$
(2)

The chain’s market share is calculated by summation of all customers’ buying power and multiplying the probability of customer patronizing, which is carried out by the respective chain’s facilities:

$${\text{Max}}\mathop \sum \limits_{j = 1}^{n} b_{j} \frac{{\mathop \sum \nolimits_{i = 1}^{t} \frac{{\alpha_{i} }}{{\left( {\varepsilon + d_{ij}^{2} } \right)}} + \mathop \sum \nolimits_{k = 1}^{l} \frac{{q_{k} }}{{\left( {\varepsilon + \mathop {d_{kj}^{n} }\nolimits^{2} } \right)}}}}{{\mathop \sum \nolimits_{i = 1}^{m} \frac{{\alpha_{i} }}{{\left( {\varepsilon + d_{ij}^{2} } \right)}} + \mathop \sum \nolimits_{k = 1}^{l} \frac{{q_{k} }}{{\left( {\varepsilon + \mathop {d_{kj}^{n} }\nolimits^{2} } \right)}}}},$$
(3)

s.t.

$$q_{\hbox{min} } \cdot x_{k} \le q_{k} \le q_{\hbox{max} } \cdot x_{k} \quad k = 1,2, \ldots ,l,$$
(4)
$$x_{k} \in \left\{ {0,1} \right\}\quad k = 1,2, \ldots ,l,$$
(5)
$$q_{k} \ge 0\quad k = 1,2, \ldots ,l,$$
(6)
$$\mathop \sum \limits_{j = 1}^{n} \mathop \sum \limits_{k = 1}^{l} \frac{{b_{j} }}{{\left( {d_{kj}^{n} } \right)^{{\emptyset_{j0} }} + \emptyset_{j1} }}x_{k}^{ } + \sum\limits_{k = 1}^{l} {\left( {e^{{\frac{{q_{k} }}{{q_{0} }} + q_{1} }} - e^{{q_{1} }} } \right)} \le \beta .$$
(7)

Equation (3) is the objective function that maximizes the chain’s market share. Constraints (4) along with the binary restrictions (5) on the location variables x k and nonnegativity restrictions (6) on design variables q k ensure that if no facility is opened at a potential location l, the corresponding design q k of the facility is zero, and if a facility is opened at a potential location l, then its design q k cannot exceed the maximum level \(q_{\hbox{max} } > 0\) and has a minimum level \(q_{\hbox{min} } > 0\). Constraint (7) is a budget constraint. The cost function (left hand side) should be a differentiable function which gives the locational and design costs. In fact, the cost function should increase as the potential location approaches one of the demand points, since it is rather likely that around those locations the cost of the facility will be higher (due to the value of the land and premises, which will make the cost of buying or renting the location higher). On the other hand, the cost function should be a non-decreasing and convex function in the variable q k , since the more design we require of the facility, the higher the costs will be, at an increasing rate. A possible expression of the locational cost may be \(\sum\nolimits_{j = 1}^{n} {\sum\nolimits_{k = 1}^{l} {\frac{{b_{j} }}{{\left( {d_{kj}^{n} } \right)^{{\emptyset_{j0} }} + \emptyset_{j1} }}x_{k} } }\), \(\emptyset_{j0}\),\(\emptyset_{j1} > 0\) given the parameters. On the other hand, a typical form for design cost might be \(\sum\nolimits_{k = 1}^{l} {e^{{\frac{{q_{k} }}{{q_{0} }} + q_{1} }} - e^{{q_{1} }} } ,\) \(q_{0} > 0\) and q 1, given values (Fernández et al. 2007). We note that the number of facilities to be located is not fixed; its value is to be determined by the solution of the model.

The proposed HCDFA

A very promising recent development in the field of meta-heuristic algorithms is the firefly algorithm (FA) proposed by Yang (2008). The FA algorithm is based on the idealized behavior of the flashing characteristics of fireflies. The firefly algorithm which was developed by Yang (2008) is a meta-heuristic technique for solving continuous optimization problems, especially continuous NP-hard problems. Preliminary studies indicate that FA is superior to GA and PSO (Yang 2009).

In firefly algorithms, the attractiveness of a firefly is proportional to its brightness. For any couple of flashing fireflies, the less bright one will move toward the brighter one. Attractiveness is proportional to the brightness which decreases with increasing distance between fireflies. If there are no brighter fireflies than a particular firefly, this individual will move randomly in space. Attractiveness and brightness both increase as their distance decreases. For a maximization problem, the brightness can simply be proportional to the objective function (Gandomi et al. 2011).

As presented in the proposed model, there are three decision variables (S, x k and q k ; the number of new facilities, location and design of new facility k, respectively) that should be determined. The nature of these variables is different and the way they are treated is not the same in the proposed algorithm. The number of new facilities is obtained by implementing the algorithm in different S, saving the maximum value of objective function in terms of S, comparing the maximum objective function values in terms of different S and finding the best S that maximizes the objective function. x k is a discrete variable, while q k is a continuous variable. Thus, classical elements of firefly are used to determine q k and also discrete firefly is used for obtaining x k in this paper. The developed hybrid firefly is described in the following subsections.

Representation scheme

A two-section encoding scheme has been used to present a solution in this paper. This scheme has been illustrated in Fig. 1. Section I shows the design of new facilities, indicated by a string with size S. For example, q s is a real number which shows the design of the sth opened new facility (\(q_{\hbox{min} } \le q_{s} \le q_{\hbox{max} }\)). Section II denotes the location of new facilities, which is indicated by a \(S \times l\) matrix. The value of 1 shows the location of the new facility. For example, x sk is a binary number and \(x_{sk} = 1\) indicates the new facility s located in a potential location l.

Fig. 1
figure 1

Representation scheme of the solution

Initialization

In this paper, the design of new facilities is determined using the random uniform distribution in the [q min, q max] interval and their location is initialized using a method that determines the positions with the minimum required budget.

The operators in HCDFA

The movement of a firefly i attracted to another more attractive (brighter) firefly j is determined by the following relation (Yang 2008):

$$X_{i}^{t + 1} = X_{i}^{t} + \beta_{0} e^{{ - \gamma r_{ij}^{m} }} \left( {X_{j}^{t} - X_{i}^{t} } \right) + \lambda \left( {{\text{rand}} - \frac{1}{2}} \right); \quad m \ge 1,$$
(8)

where \(\beta_{0} e^{{ - \gamma r_{ij}^{m} }}\) is the attraction function whose value decreases with the increase in the distance between two fireflies (r ij ). β 0 is the attractiveness at r ij  = 0, and γ is the fixed light absorption coefficient in the environment. The third term is for the randomization of movement, in which λ is the randomization parameter and “rand” is a function that generates random numbers with uniform distribution in the [0,1] interval. The distance between any two fireflies i and j at x i and x j can be the Cartesian distance or the l 2-norm (Yang 2009):

$$r_{ij} = \left\| {X_{i} - X_{j} } \right\| = \sqrt {\sum\limits_{k = 1}^{d} {\left( {X_{ik} - X_{jk} } \right)^{2} } } ,$$
(9)

where \(X_{ik}\) is the kth component of the ith firefly.

For design and location of new facilities, the following relations are used to move the firefly i toward the more attractive (brighter) firefly j, respectively:

$$q_{i}^{t + 1} = q_{i}^{t} + \beta_{0} e^{{ - \gamma r^{2} }} \left( {q_{j}^{t} - q_{i}^{t} } \right) + \lambda \left( {{\text{rand}} - 1/2} \right),$$
(10)
$$x_{i}^{t + 1} = x_{i}^{t} + \beta_{0} e^{{ - \gamma r^{2} }} \left( {x_{j}^{t} - x_{i}^{t} } \right) + \lambda \left( {{\text{rand}} - 1/2} \right).$$
(11)

Since x is a discrete variable; the relation (11) is not suitable for firefly movement and a modification is needed for changing its real number to a binary one.

Discretization When firefly i moves toward firefly j, the position of firefly i changes from a binary number to a real number. Therefore, we must replace this real number by a binary number. The following sigmoid function restricts \(\left( {x_{ik} } \right)\) to be in the interval of zero to one (Sayadi et al. 2010):

$$S\left( {X_{ik} } \right) = \frac{1}{{1 + \exp ( - X_{ik} )}},$$
(12)

where \(S\left( {X_{ik} } \right)\) denotes the probability of bit \(X_{ik}\) taking 1.

The discretization method of location variable is as follows:

The location for the firefly i in the generation t can be denoted as \(x_{i}^{t} = \left( {x_{i11}^{t} ,x_{i12}^{t} , \ldots ,x_{isl}^{t} } \right),\) \({\text{XL}}_{isk}^{t} = 1\) if the new facility s of firefly i is placed in the kth potential location at generation t and 0 otherwise. For example, suppose that we have \(x_{i13}^{t} = x_{i31}^{t} = x_{i52}^{t} = 1\) and all other \(x_{isk}^{t} = 0\). This firefly (solution) is represented in Table 1.

Table 1 The representation of firefly i

As stated before, when firefly i moves toward firefly j, the position of firefly i changes from a binary number to a real number. So, when firefly i moves toward firefly j, the position of firefly i needs to be converted from real numbers to the changes of probabilities by the following sigmoid function:

$$S\left( {x_{isk}^{t} } \right) = \frac{1}{{1 + \exp ( - x_{isk}^{t} )}},$$

where \(S\left( {x_{isk}^{t} } \right)\) represents the probability of \(x_{isk}^{t}\) taking the value of zero to one. For example in Table 2, \(S\left( {x_{isk}^{t} } \right)\) indicates that there is 49 % chance that the first facility of firefly i will be placed in the second potential location.

Table 2 The probability of \(x_{isk}^{t}\) taking the value 1

Each firefly locates new facilities to the potential locations based on its changes of probabilities. For new facility s, the potential location k with the highest probability is selected and the new facility s is assigned to this location if there is a vacant position in this location. Otherwise without considering the potential location k, a position with the highest probability is selected and the new facility s is assigned to this position if there is a vacant position in this location. This action is resumed when a new facility s is assigned to a position.

On the other hand, the technique by which the budget constraint is treated in the proposed algorithm is the penalized method, which is the subtraction of the deviation value of the budget constraint with the predetermined coefficient from the objective function.

Pseudo code of HCDFA

The steps of the HCDFA can be summarized as the pseudo code as shown in Fig. 2.

Fig. 2
figure 2

Procedure of the HCDFA algorithm

Case study

A real-world application of the presented model for locating new chain stores in the city of Tehran, Iran, is described in this section and the results are analyzed. The presented approach was coded in MATLAB and run on a Pentium IV with 2.66 GHz CPU and 4 GB memory.

Case description

There are several chain stores in Tehran, Iran. One of the major one is “Shahrvand”. Its general policy is to offer different products. Shahrvand has several branches in different districts of Tehran. In addition to Shahrvand, there are also many other chain stores “Hyperstar”, “Hyperme”, “Hypersun”, “Ofogh-koorosh”, “Refah” and “Etka”, which are the main competitors of Shahrvand.

Tehran is divided to 22 districts. District 2 has been investigated for locating new chain stores in this case study. There are three Shahrvand and two Ofogh-koorosh stores in this area, while the other mentioned competitors do not have any facilities in district 2.

District 2 has been divided in such a way that there are 16 different demand points in this area. As stated before, there are five existing stores in which three of the existing facilities belong to Shahrvand and two of them to the competitors. Shahrvand aims at opening new stores in district 2. The population of each demand point in this area can be considered as the buying power of a given demand. The population of each demand point has been normalized in a range of 1–10.

The levels of existing store design have been measured by the customers through a questionnaire. The SERVQUAL method has been used for designing the mentioned questionnaire.

The SERVQUAL service quality model was developed by a group of American authors in 1988. It highlights the main components of service quality. The SERVQUAL is categorized into five factors: reliability, assurance, tangibles, empathy and responsiveness.

400 customers were chosen as a sample for evaluating every existing store. The Cronbach’s alpha for the questionnaire was calculated to be 0.83. The final score for the existing store’s design level was normalized in a range of 0.5–5.

ε has been considered 1 in this case study and the budget equals 1300,000,000,000 IRR (shortly 130). On the other hand, \(\emptyset_{j0}\), \(\emptyset_{j1}\), q 0 and q 1 are considered to be 2, 1, 8 and 4, respectively. The locations of demand points and the existing stores are as follows:

$$\begin{aligned} y_{j} &= \left( {0,0} \right), \, \left( {0,1} \right), \, \left( {0,2} \right), \, \left( {0,3} \right), \, \left( {1,0} \right), \, \left( {1,1} \right), \, \left( {1,2} \right), \, \left( {1,3} \right), \\ & \quad \left( {2,0} \right), \, \left( {2,1} \right), \, \left( {2,2} \right), \, \left( {2,3} \right), \, \left( {3,0} \right), \, \left( {3,1} \right), \, \left( {3,2} \right),\left( {3,3} \right). \end{aligned}$$

\(z_{i} = \left( {0,0} \right), \, \left( {1,2} \right), \, \left( {3,0} \right), \, \left( {1,0} \right), \, \left( {2,2} \right);\quad i = 1,2,3\) for Shahrvand and \(i = 4,5\) for the competitors.

The buying power of different demand points, the design level of existing stores and the potential locations are: \(\alpha_{i} = 1,5,2.5,3,4;\) \(i = 1,2,3\) for Shahrvand and \(i = 4,5\) for the competitors

$$\begin{aligned} p_{k} &= \left( {0, 1} \right), \, \left( {0, 2} \right), \, \left( {0, 3} \right), \, \left( { 1, 1} \right), \, \left( { 1, 3} \right), \, \left( { 2,0} \right), \, \left( { 2, 1} \right), \, \left( { 2, 3} \right), \\ & \quad \left( { 3, 1} \right), \, \left( { 3, 2} \right),\left( { 3, 3} \right).\end{aligned}$$
$$b_{j} = 5,3,6,1,4,1,10,2,3,9,4,9,3,3,4,3.$$

Managerial implications

The case was solved by HCDFA. If Shahrvand opens a new facility, its optimal location and design will be (2,3) and 5, respectively, and its market share 45.04. If it opens two new facilities, their optimal locations will be (2,1) and (2,3) and their optimal design cannot be maximized due to the budget constraint and equal 4.94 and 3.80, respectively. The market share is 49.85 in this situation, which is higher than the case in which only one new facility is opened. If three new facilities will be opened, their optimal locations and designs equal (0,3), (2,3), (2,1), 0.5, 3.05 and 4.08, respectively, and the chain’s market share is 48.69. It is seen that although the number of stores in the last case was increased, Shahrvand’s market share decreased in comparison with the case in which two new stores will be opened. If the chain opens four or five new stores, its market shares equal 47.07 and 45.01, respectively. For more than five facilities, there is not a feasible solution. Therefore, the optimal number of new stores for Shahrvand equals two and their optimal location and design are (2,1), (2,3), 4.94 and 3.80, respectively.

Budget impact on the market share

We varied the value of budget from 50 to 200 with a step increase of 10 for investigating the budget impact on the chain’s market share. Shahrvand’s market share values and its percentage were calculated and are depicted in Table 3. The graph of optimal market share based on different budgets is illustrated in Fig. 3.

Table 3 The market share values and the percentage of the chain’s market share based on different budget values
Fig. 3
figure 3

Budget impact on the optimal solution

The optimal market share has an approximately linear relationship with the budget. On average, the enhancement of 10 unit budget (100,000,000,000 IRR) increases market share by 1 %. The question raised here is if Shahrvand can increase the budget by more than the original value (the budget of other tasks will be decreased), is there any tendency to increase ten unit budgets in terms of 1 % market share enhancement?

Budget impact on the optimal number of new facilities

The other point is that for a specified budget interval, the optimal number of new facilities is identical and the location and design of the facilities will be improved by budget enhancement, but the location and design combination remains undefined. For example, the number of new stores is two for the interval [82,156], but for a budget lower than 82, the optimal number of new stores equals one and for a budget more than 156 the optimal number of new stores equal three. The optimal location and design behavior in all intervals is undefined. In fact, for different budgets, we have various combinations of location and design and it cannot be predicted in advance.

Computational experiments

The performance of the proposed firefly algorithm is compared with the optimization solver solution through experimentation on a number of different generated problems, varying the number of demand points (n = 10, 25 or 60), the number of existing facilities (m = 2, 5 or 10), the number of those facilities belonging to the chain (t = 0 or 1 for m = 2, t = 0, 1 or 2 for m = 5 and t = 0, 2 or 4 for m = 10) and the budget (β = 150 or 200). Ten instances have been generated for every setting, by randomly choosing the parameters uniformly within the following intervals:b j  ≈ U(1, 10), α i  ≈ U(0.5, 5), \(\varphi_{j0}\) ≈ U(1.9, 2.1), \(\varphi_{j1}\) ≈ U(0.5, 2), q 0 ≈ U(7, 9), q 1 ≈ U(4, 4.5), y j1 ≈ U(1, 10), y j2 ≈ U(1, 10), z i1 ≈ U(1, 10), z i2 ≈ U(1, 10), ε = 0.01.

The searching space for every instance is \(x_{k} \in \left\{ {0,1} \right\}\), \(q_{k} \in [0.5, 5]\), \(s \in [1, n - m]\).

The value of the HCDFA’s parameters

There are five parameters that should be determined in the firefly algorithm: \(\gamma , \beta_{0} , \lambda ,\) the number of generations and the number of fireflies in each generation. γ should be related to the scales of decision variables. In general, we can set \(\gamma = 1/\sqrt L\) where L is the average scale of the problem (Xin-She 2014; Yang and He 2013). According to the scale of our problem variables, we varied γ from 0.1 to 1.0 with a step increase of 0.1. By comparing the optimal solutions for a range of problems, we found that the best value for γ is 0.6. The parameter β 0 controls the attractiveness, and parametric studies suggest that \(\beta_{0} = 1\) can be used for most applications (Xin-She 2014; Yang and He 2013). In fact, since β 0 was found not to significantly affect the optimization results, the fixed value \(\beta_{0} = 1\) was used (Gandomi et al. 2011; Yang et al. 2012 ). For most cases, λ can be taken in the [0,1] interval (Yang 2009). We varied λ from 0.1 to 1.0 with a step increase of 0.1. By comparing the optimal solutions for a range of problems, we found that the best value for λ is 0.2. The best range for the number of fireflies in each generation is [25,40] (Yang 2008, 2009; Yang et al. 2012; Yang and He 2013; Xin-She 2014) and the global maxima can be found using the implemented firefly algorithms after about 500 function evaluations (Yang 2010). Hence, 25 fireflies and 20 generations can be selected in the computational experiment (Yang 2010).

A suitable value for the coefficient of deviation value of budget constraint is 10. It should be noted that selecting large values for the respective parameter due to premature convergence and selecting small ones make the solution infeasible.

HCDFA with 100 runs for each problem has been compared with the optimization solver solution.

In Table 4, the results related to the ten generated problems for the case n = 25, m = 5, t = 2, β = 150, and 100 runs of HCDFA are presented. In the last two lines, the average and the standard deviation, respectively, are depicted. The difference between the optimal market share obtained by the optimization solver and the best found solution obtained by the HCDFA in the 100 runs, in percentage, is given. The column “Times found” refers to the number of times that HCDFA found the best solution. The last two columns show the CPU seconds by the optimization solver and HCDFA, respectively.

Table 4 Results for the ten problems with 25 demand points, 5 existing facilities, chain length 2, budget 150, and 100 runs for the HCDFA

Using the average and the standard deviation data in Table 4, the effectiveness of the proposed algorithm (quality of solutions) is tested. The effectiveness is defined as the ability of the algorithm to find the known optimum solution. Here, the quality of a solution (\(Q_{\text{sol}}\)) is measured by how close the solution is to the known global solution as shown in the second column of Table 4. The objective of the effectiveness test is to examine whether

$$\left\{ {\begin{array}{*{20}c} {H_{0} = \mu_{{Q_{\text{sol}} }} \le 0.01} \\ {H_{1} = \mu_{{Q_{\text{sol}} }} > 0.01} \\ \end{array} } \right..$$

This test investigates whether the quality of the solutions obtained is greater than 99 %. The t test (assume that the data has a normal distribution) is used to assess the effectiveness of the proposed algorithm. The formula for calculating the t value is shown in Eq. (13):

$${\text{t}} = \frac{{\overline{{Q_{\text{sol}} }} - 0.01}}{{S\left( {\overline{{Q_{\text{sol}} }} } \right)}}.$$
(13)

The t value equals 2.41 for the data in Table 4. In this regard, the hypothesis is accepted with 0.98 confidence level. Therefore, Table 4 shows that the solution of HCDFA does not differ much from the solution of the optimization solver in terms of the market share value. Moreover, HCDFA is much faster than the optimization solver.

For a general overview of the results, only the average values are shown in the following. A summarizing table (Table 5) is depicted based on different values of the number of existing facilities belonging to the chain (for the case n = 60, m = 10, β = 200). Each line in Table 5 is like the last two lines in Table 4, showing the average values, with the standard deviations in brackets.

Table 5 Results for the problems with 60 demand points, 10 existing facilities, budget 200 and 0, 2 and 4 chain length

Finally in Table 6, the results for all the settings, regardless of the chain length and budget, and running the HCDFA 100 times have been presented.

Table 6 Summarizing table for all the computational results

The solution time which is obtained by the optimization solver is too long in large-scale problems, but too short for the proposed algorithm even in large-scale problems. On the other hand, the optimal solution quality which is obtained by HCDFA is good enough and has little difference with the optimization solver in large-scale problems.

Conclusion

In this paper, a new HCDFA has been presented for a competitive location problem. The problem under study is to identify the location and design of new facilities under the budget constraint. The number of new facilities is also endogenously determined by the model. The proposed model has been used for a real-world application of locating new chain stores in the city of Tehran, Iran. The proposed model can answer three questions in a static competition environment: (1) How many new facilities should be opened? (2) Where should the optimal new facilities be located among the potential ones? (3) What is the optimal design level of the new facilities? The computational experiments depict the high efficiency of the algorithm regarding the time and quality of the solutions.

Studying the relocation and redesigning of the existing facilities besides opening new ones can be considered as future research.