AORAdvances in Operations Research1687-91551687-9147Hindawi Publishing Corporation21204010.1155/2009/212040212040Research ArticleA BSSS Algorithm for the Location Problem with Minimum Square ErrorFathaliJafar1ZaferaniehMehdi2NezakatiAhmad1MoshirvaziriKhosrow1Department of MathematicsShahrood University of TechnologyUniversity Blvd. Shahrood 36199 95161Iranshahroodut.ac.ir2Department of MathematicsTarbiat Moallem University of SabzevarTovhid Town Sabzevar 9617976487Iransttu.ac.ir20090212200920090705200917092009151020092009Copyright © 2009This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Let n weighted points be given in the plane R2. For each point a radius is given which is the expected ideal distance from this point to a new facility. We want to find the location of a new facility such that the sum of the weighted errors between the existing points and this new facility is minimized. This is in fact a nonconvex optimization problem. We show that the optimal solution lies in an extended rectangular hull of the existing points. Based on this finding then an efficient big square small square (BSSS) procedure is proposed.

1. Introduction

In this paper we introduce a new version of single facility location problem. Let n points, called facilities, be given in the plane R2. The classical single facility location problem asks to find the location of a new facility such that the sum of the weighted distances from all facilities to the new one is minimized.

We consider a special single facility location problem such that each point pi has a relevant radius ri which is the ideal distance between the new facility and the point pi. For example, if ri=r for i=1,,n and all points lie on the circumference of a circle with radius r then center of this circle is optimal solution. Unfortunately in countless instances does not exist the location of a new facility such that its distance to each point pi is exactly ri. So we try to minimize the sum of the weighted square errors.

It is necessary to note that this problem differs from the covering problem which asks to find the minimum number of facilities such that the distance from any point pi to the closest facility is less than or equal to ri (see Mirchandani and Francis ). Another problem which may be thought to be near to our consideration is the problem of finding a circle closest to the demand points. This problem is considered by Drezner et al.  and Brimberg et al.  which differs from our considered problem.

In what follows at first the problem formulation is presented in Section 2. Next in Section 3 it is shown that the problem is not convex and optimal solution lies in an extended rectangular hull of the existing facilities. Finally in Section 4 an efficient big square small square method is employed to solve the problem.

2. Problem Formulation

Let n points pi=(ai,bi), i=1,,n be given in the plane R2. The coordinates of point pi are corresponded to the position of a client where its weight and radius are wi0 and ri, respectively. The radius ri is a given ideal distance between pi and the new facility. The distance between any two points x and y is denoted by d(x,y). Let e(x,pi)=(d(x,pi)-ri)2 be the square error between points x and pi. The problem asks to find the location of a point xR2 such that the sum of the weighted square errors over all points is minimized, that is: minF(x)=i=1nwie(x,pi).

As an application of this problem consider finding the location of a company in the vicinities of some cities with respect to the establishing and transportation costs. Suppose that cost of establishing a facility in the regions that are farther than a given distance ri is very low. On the other hand a move away from a city causes that the transportation cost increases. Therefore a tradeoff between establishing and transportation costs seems to be reasonable. This problem has many other applications such as locating of powerhouses, stadiums, warehouses, dump sites, and other facilities that have both desirable and undesirable attributes. For instance, in the problem of locating powerhouses we want to find the location of a facility which is not to be closer than a specified distance to the population centers, because of increasing the risk of miscarriages. On the other hand, if the facility is so far from the population centers, cost of providing security, human forces, transportation installation, and other costs will increase.

3. Model Properties

In this section we pose some properties of the problem. Suppose that the distances in the plane R2 are measured by l2 norm. The following example shows that the problem (P1) is nonconvex.

Example 3.1.

Consider the point p=(0,0) with relevant radius r>0. Then its square error function is e(x,p)=((x1-0)2+(x2-0)2-r)2. The point x¯=(0,0) is a convex combination of two points x=(-r,0) and x′′=(r,0) whereas e(x¯,p)=e(12x+12x′′,p)12e(x,p)+12e(x′′,p); therefore e(x,p) is nonconvex.

Note in the case that ri=0 for i=1,,n the model (P1) becomes minF(x)=i=1nwi((x1-ai)2+(x2-bi)2),which is a convex function. The optimal solution of this problem is given with the following equations: x1=i=1nwiaii=1nwi,x2=i=1nwibii=1nwi, which is called the center of gravity (see, Love et al. ).

Since (P1) is a minisum problem, one may guess that the optimal solution lies in the convex hull of demand points but small example with two points and different radius shows that it is not true. Example 4.2 also satisfies this claim. In the following we would show that the optimal solution of the problem (P1) must lie in an extended rectangular hull of the existing points. The rectangular hull of a set of points is defined as the smallest rectangle (with sides parallel to the x and y axes) containing the set.

Definition 3.2.

Let p1,p2,,pn be n points in the plane. We define the new points RH1=(amin,bmin), RH2=(amin,bmax), RH3=(amax,bmax), and RH4=(amax,bmin) whose coordinates are amin=min{ai-rii=1,,n},amax=max{ai+rii=1,,n},bmin=min{bi-rii=1,,n},bmax=max{bi+rii=1,,n}.

Lemma 3.3.

Let p1,p2,,pn be n given points in the plane. The rectangular hull of the points RH1,RH2,RH3,RH4 which are defined as Definition 3.2, contains the optimal solution of the problem (P1).

Proof.

Let R be the rectangular hull of the points RH1,RH2,RH3, and RH4, and let x=(x1,x2) be a point out of R. We would show that x is not optimal. The proof is provided for the case x1>amax; the other cases can be proved as the same. Let x=(amax,x2); we show F(x)<F(x). For any demand point pi=(ai,bi) the following inequality is held: d(x,pi)=(x1-ai)2+(x2-bi)2>(amax-ai)2+(x2-bi)2=d(x,pi)ri. Therefore since wi0, then F(x)=i=1nwi((amax-ai)2+(x2-bi)2-ri)2<i=1nwi((x1-ai)2+(x2-bi)2-ri)2=F(x). So x cannot be an optimal solution and the proof is completed.

As we showed that the objective function of problem (P1) is nonconvex, therefore using the methods of convex optimization to solve this problem is useless; hence we employ a heuristic method which is appropriate for our problem and give a global optimal solution with arbitrary accuracy. In the next section we introduce this method which is called big square small square (BSSS).

4. Big Square Small Square Algorithm

The big square small square (BSSS) method is a geometrical branch and bound algorithm originally suggested by Hansen et al.  to solve obnoxious facility location problem. The idea is to divide the plane into regions (squares), over each of which a lower (upper) bound for the problem is found. If the objective over a given square is worse than an existing upper (lower) bound, then that square is fathomed. The procedure continues until a prescribed tolerance is achieved. Another version of BSSS is later discussed by Hansen et al. . Plastria  also presents a modified version of this algorithm. This approach has been used by McGarvey and Cavalier  to solve location problems with barrier and forbidden regions. More recently they have applied this method to find the location of competitive facilities . Zaferanieh et al.  used this method to solve a single facility location problem in a special case that the plane R2 has been divided into two regions with different norms by an straight line; here we also apply the BSSS algorithm to solve our problem.

By Lemma 3.3 we know that the optimal solution lies on the rectangular hull of RH1,RH2,RH3, and RH4. Based on this finding we employ the BSSS algorithm to obtain the optimal solution. At first the algorithm divides the rectangular hull, R, into four subrectangles, R1,R2,R3, and R4, by drawing the lines parallel to x and y axes through the middle of its sides. Then the algorithm selects a subrectangle for which its lower bound is the smallest. And a subrectangle for which the lower bound exceeds the value of the best known solution is fathomed. The process continues until the larger side of the subrectangle is less than the given tolerance, ε.

The rectangle R is in fact an indicator of all the points inside it. The error of point pi and rectangle R is considered instead of the errors of pi and the points inside R. The error of a point pi and a rectangle R is taken to be the square of distance between boundary of circle with center pi and radius ri and rectangle R. Note that since R is closed and convex, such point indeed exists.

For a usual implementation process of the BSSS algorithm the distance between points inside a rectangle is taken to be zero (see McGarvey and Cavalier [8, 9] and Zaferanieh et al. ) but in our approach the error value in this case is positive or zero. First let pi=(ai,bi) with relevant radius ri be a point inside a rectangle. Two cases maybe occurred; if the circle with center pi and radius ri envelops the rectangle R, then the error is calculated as e(pi,R)=minj=1,,4(d(pi,RHj)-ri)2, see Figure 1(a), where dash line shows the error. Otherwise, that is, when the circle crosses the circumference or lies inside a rectangle, the error is taken to be zero; see Figure 1(b).

(a) The error is positive. (b) The error is zero.

To provide convincing explanation note that the rectangle which is employed to calculate lower bound originally can be considered as an extensive facility. And locating a facility on the boundary of a circle is ideal because the error does not occur. So in Figure 1(b) if all of a circle lies inside a rectangle or a circle crosses rectangle, then there is a point which lies on the area of rectangle and on the boundary of circle; consequently the error is zero.

Now let pi be a point with radius ri outside the rectangle R. If the circle with center pi and radius ri crosses the rectangle R, then obviously the error is zero. Otherwise the error is calculated according to the following equation: e(pi,R)=minRHbR(d(pi,RHb)-ri)2, where R is the boundary of R. Note that the point that minimizes (4.2) could be either a corner point of R or a projection of pi onto R; see Figure 2.

(a) The rectangle R is inside the circle. (b) The rectangle R is outside the circles.

The outline of the BSSS algorithm is described below. It is in essence similar to the one presented by McGarvey and Cavalier . The output of algorithm is the approximated optimal solution.

Algorithm 4.1.

(1) Find RH1,,RH4 with respect to the Definition 3.2 and set R the rectangular hull of them.

(2) Set L=0, fb= (the best objective value obtained yet), and let d*=max{amax-amin,bmax-bmin}.

(3) Set L=L+1, and divide R into four equal subrectangles RL1,RL2,RL3, and RL4.

(4) Calculate the objective value, fLr, at the midpoint of each subrectangle. If minr=1,,4{fLr}<fb, then update fb with this value.

(5) Calculate the lower bound value for each subrectangle, that is, lbLr=i=1nwie(pi,RLr), r=1,,4. If lbLr>fb, fathom RLr and set lbLr=.

(6) Set lb=minr=1,,4{lbLr} and r=argminr=1,,4{lbLr}. If lb=, go to step (8); else if (0.5)Ld*<ϵ, go to step (7); else set R=RLr; fathom RLr, set lbLr=, and go to step (3).

(7) If lb<fb, set fb=lb, define Xb as the center of subrectangle RLr, and fathom this rectangle.

(8) Set L=L-1; if L=0, go to step (9); else if unfathomed subrectangle at level L are found choose the one with the most favorable lb; denote it as R and return to step (3). Else repeat step (8).

(9)Terminate the algorithm with the new facility location Xb and having the objective function value fb.

4.1. Computational Results

In this section we show the efficiency of BSSS algorithm by giving four examples. The first example is small and contains just four points. We give this example to compare the results of BSSS algorithm with those obtained by LINGO software and show that while the NLP solver software may trapped on a local optimum, the BSSS method could be an appropriate method. The second and third examples are presented with the coordinates, weights, and radius of points to make it possible to compare the obtained results of this method with other methods in the future works. And finally the last one which contains more points is presented to become the CPU time of BSSS method comparable with other methods.

The above algorithm was written in MATLAB and run on a PC with Pentium IV processor and 1 GB of RAM and CPU with 2 GHz. The tolerance for all the problems was taken to be ϵ=0.01 and the results are shown with two decimal points of accuracy.

Example 4.2.

The first example contains four points (0,0),(1,0),(0,1), and (1,1). The relevant weights for all the points are taken to be 1. The results those obtained by BSSS method and LINGO software are given in Table 1. The CPU time of LINGO software for three cases is zero; however in the first and second cases it could not find the global minimum.

As the results show that the solutions in the second and third cases do not lie on the convex hull of existing points, however as we expected, they are inside the extended rectangular hull of these points. Figures 3 and 4 show two perspectives of objective function in the first and third cases, respectively. As figures show objective functions are not convex.

The results of Example 4.2.

 BSSS LINGO case radius Xb lb fb CPU/sec X f 1 (1,1,1,1) (0.49,0.51) 0.33 0.34 0.34 (1.13,1.13) 1.06 2 (1,2,1,2) (-0.90,0.51) 0.00 0.00 0.05 (-0.90,0.50) 0.00 3 (2,2,2,2) (-1.42,0.51) 0.91 0.93 2.53 (1.87,1.87) 1.02

Two different perspectives of objective function for first case of Example 4.2.

Two different perspectives of objective function for third case of Example 4.2.

Example 4.3.

The second example contains 18 points which are randomly generated and are presented in Table 6. The results are given in Table 2. The column under heading radius in this table indicates the relevant radius of points. The case 1, case 2, and case 3 indicate the first, second, and third components of the column under heading radius in Table 6, respectively, that are taken as the radius of points.

The results of Example 4.3.

case 1(5.26,4.62)275.06275.76 3.62
case 2(5.25,4.42)181.40181.94 3.73
case 3(5.18,4.69)63.5563.89 3.68
Example 4.4.

As the third example we consider a problem with 30 points. The relevant data and results are given in Tables 7 and 3, respectively. The column under heading radius in Table 3 indicates the radius as described in Example 4.3.

The results of Example 4.4.

case 1(8.35,7.71)1635.401638.20 5.74
case 2(8.38,7.76)1158.601161.43 4.91
case 3(8.36,7.76)753.11755.39 3.97
Example 4.5.

Finally we consider the problems with 50,100,,500 points. The points and their weights and radius all are integers and randomly generated in the intervals [1,60],[1,3], and [1,10], respectively. The problems with 100–500 points contain the points of smaller problems. Table 4 shows the results.

The results of Example 4.5.

nXblbfbCPU/sec
50(27.57,34.19)33657.91 33674.61 31.54
100(30.70,31.58)73774.9973813.48 62.91
200(31.11,31.10)151267.25151348.92 129.43
300(30.84,31.73) 228371.47 228498.30 184.41
400(31.28,31.04) 300070.07 300238.98 255.33
500(30.70,30.83)381561.67 381777.87 287.45

In order to be able to make a better judgment about the efficiency of the proposed algorithm we have tried to solve the problems in Example 4.5 with radius equal to zero for all the points. As we mentioned before the optimal solution of the problem in this case is the center of gravity that is obtained by (3.4). The results are shown in Table 5.

The results of Example 4.5 with radius equal to zero.

 Objective function n Center of gravity BSSS 50 51202.22 51202.23 100 111032.93 111032.93 200 225490.50 225490.50 300 346396.00 346396.05 400 456804.57 456804.59 500 578703.13 578703.26

Data for 18-point problem.

(1,2,3)(1,2,3)(4,4,1)(1,2,3)(7,1,2)(1,1,3)
(1,3,2)(1,2,3)(4,9,2)(1,1,3)(7,2,3)(1,2,3)
(2,5,1)(1,3,3)(5,3,2)(1,2,3)(8,5,1)(1,2,3)
(3,6,3)(1,2,3)(5,5,1)(1,2,3)(8,8,3)(1,1,3)
(4,8,2)(1,2,3)(6,6,3)(1,3,3)(9,7,3)(1,2,3)
(4,1,3)(1,1,3)(6,3,3)(1,1,3)(9,6,2)(1,3,3)

Data for 30-point problem.

(1,3,3)(1,2,3)(6,11,1)(1,2,3)(11,4,2)(1,1,3)
(1,4,2)(1,2,3)(7,14,2)(1,1,3)(11,13,3)(1,2,3)
(2,15,1)(1,3,3)(7,15,2)(1,2,3)(13,3,1)(1,2,3)
(2,4,3)(1,2,3)(8,3,1)(1,2,3)(13,7,3)(1,1,3)
(3,6,2)(1,2,3)(8,6,3)(1,3,3)(14,15,1)(1,2,3)
(3,10,2)(1,2,3)(8,5,1)(1,3,3)(14,3,1)(1,2,3)
(3,2,1)(1,2,3)(8,2,1)(1,2,3)(14,1,2)(1,2,3)
(4,6,1)(1,2,3)(9,11,2)(1,3,3)(15,8,3)(1,2,3)
(4,3,2)(1,2,3)(10,8,1)(1,3,3)(15,10,3)(1,2,3)
(6,8,3)(1,1,3)(10,10,3)(1,1,3)(15,15,2)(1,3,3)
5. Summary and Conclusion

We considered the problem of finding the location of a single facility such that the sum of the weighted square errors over all points is minimized. We showed that the problem in general is nonconvex and then proved that the optimal solution lies in an extended rectangular hull of the existing points. Based on this finding then a big square small square (BSSS) was applied to solve the problem.

Other nonconvex solver methods such as big triangle Small triangle (BTST) method of Drezner and Suzuki  can be used to solve this problem which may results in better solutions.

Appendix

See Tables 6 and 7.

Acknowledgment

The authors would like to express their sincere gratitude to the anonymous referees for their careful reading of the manuscript and their constructive comments which resulted in the improvement of the paper.

MirchandaniP. B.FrancisR.Discrete Location Theory1990New York, NY, USAJohn Wiley & SonsMR1066256DreznerZ.zdrezner@fullerton.eduSteinerS.WesolowskyG. O.On the circle closest to a set of pointsComputers and Operations Research20022966376502-s2.0-000113632010.1016/S0305-0548(99)00105-7ZBL0994.90088MR1884271BrimbergJ.JuelH.SchöbelA.Locating a minisum circle in the planeDiscrete Applied Mathematics2009157590191210.1016/j.dam.2008.03.0172-s2.0-60649104617ZBL1163.90010MR2500708LoveR. F.MorrisJ. G.WesolowskyG. O.Facilities Location: Models and Methods1988Amsterdam, The NetherlandsNorth-HollandMR1016608HansenP.PeetersD.ThisseJ. F.On the location of an obnoxious facilitySistemi Urbani19813299317HansenP.PeetersD.RichardD.ThisseJ.-F.The minisum and minimax location problems revisitedOperations Research1985336125112652-s2.0-0022149016ZBL0582.90027MR819181PlastriaF.GBSSS: the generalized big square small square method for planar single-facility locationEuropean Journal of Operational Research19926221631742-s2.0-0026941045ZBL0760.90067McGarveyR. G.CavalierT. M.tmc7@psu.eduA global optimal approach to facility location in the presence of forbidden regionsComputers and Industrial Engineering20034511152-s2.0-003050417910.1016/S0360-8352(03)00028-7McGarveyR. G.ronm@rand.orgCavalierT. M.tmc7@psu.eduConstrained location of competitive facilities in the planeComputers and Operations Research20053223593782-s2.0-002214901610.1016/S0305-0548(03)00241-7ZBL1061.90074MR2092664ZaferaniehM.Zaferanieh@wali.um.ac.irTaghizadeh KakhkiH.taghizad@math.um.ac.irBrimbergJ.Jack.Brimberg@rmc.caWesolowskyG. O.wesolows@mcmaster.caA BSSS algorithm for the single facility location problem in two regions with different normsEuropean Journal of Operational Research2008190179892-s2.0-002694104510.1016/j.ejor.2007.06.004ZBL1146.90465MR2409400DreznerZ.zdrezner@fullerton.eduSuzukiA.atsuo@ms.nanzan-u.ac.jpThe big triangle small triangle method for the solution of nonconvex facility location problemsOperations Research20045211281352-s2.0-001070749210.1287/opre.1030.0077ZBL1165.90552