Algorithms for Location Problems Based on Angular Distances

This paper describes four mathematical models for the single-facility location problems based on four special distance metrics and algorithms for solving such problems. In this study, algorithms of solvingWeber problems using four distance predicting functions (DPFs) are proposed in accordance with four strategies for manipulator control. A numerical example is presented in this proposal as an analytical proof of the optimality of their results.


Introduction
Generally, the purpose of a location problem is to determine locations of one or several new facilities on a plane or in a space where some objects (facilities) have been already placed [1].Usually, the number of possible arrangements for new facilities is infinite [2].
Location problems occur frequently in real life.Some of them include the distribution systems such as locating warehouses within supply chain to minimize average transportation time to market, locating hazardous material so as to minimize its exposure to the public, determining bank account and lockboxes location to maximize clearing time or float, and problems of locating a computer, telecommunication equipment, and wireless base stations [3].Many of such practical problems of this kind involve emergency facilities such as hospitals, fire stations, accident rescue, or civil defense.The usual objective here is to minimize the maximum among weighted distances between facilities to be located and all demand points.Details of other useful applications can be found in [4,5].Similar problems are formulated in approximation theory, problems of estimation in statistics [6], signal and image processing, and so forth [7][8][9].
Distance is the length of the shortest path between two points.However, the path depends on properties of space and a way of movement in it.In continuous spaces, the most commonly used metrics are rectangular or Manhattan ( 1 ), Euclidean ( 2 ), and Tchebychev ( ∞ ).Indeed, many results have been generalized for -dimensional space; however, practical applications usually occur within the context of twodimensional and three-dimensional spaces.Therefore, in the subsequent sections, DPF is used for modeling distances in 2-dimensional space (unless it is otherwise stated).
The Euclidean distance between two points does not reflect the cost of moving between them in the systems which use rotating mechanisms (telescopic boom, etc.) as transportation means.These systems include automated lifting cranes and manipulators.
This kind of problems lies behind many important applications.Unfortunately, there exist only a few algorithms which can guarantee optimality.
This paper therefore intends to describe challenging DPFs that are less exploited in the location problem, in addition to describing their similarities for new developments in location research.
The paper is organized as follows.An overview of various distance metrics and location optimization algorithms is

Preliminaries
Models involving various DPFs may occur in emergency situations.For instance, the model proposed in [10] calculates the response time between the fire calls and arrival of fire engines.In [11], DPF was presented to be of value in farming activities.Some of the circumstances discussed include planning an irrigation channel between a pond and a field as well as calculating distances among different geographic regions.With the increasing importance of geographic information systems (GIS), a DPF may be incorporated into a GIS to calculate distance measurements in geographic regions.
Westwood [12] has considered optimal mix of trucking and tramping of a truck transportation network for the movement of goods and raw materials among distributing centers, depots, and producers, utilizing a DPF.In some distribution problems, only the general locations and demands of customers are known.A DPF may be employed to estimate the expected travel distance.
DPF is necessary for the estimation of actual distances between the new and existing facilities [13][14][15].The most widely used measure of distance between a facility and a customer is the   metric which defines the distance between two points  = ( 1 , . . .,   ) and  = ( 1 , . . .,   ) in an dimensional space by In the case  = 1, the   distance is the rectilinear (rectangular) distance, while in the case  = 2 it reduces to the usual Euclidean distance.The two cases above and the Tchebychev norm ( = +∞) [16] are the most widely used within the   metrics so far [17].The straight-line Euclidean distance model ( = 2) is not applicable in cases such as street travel in a city where each travel follows a grid pattern.The appropriate distance function which calculates the distance in this situation is the rectangular distance function ( = 1).
There exist several well-documented location problems based upon the assumption of a planar model.For instance, the most famous is the classical Weber problem where a single facility  ∈ R 2 is to be located such that the weighted sum of distances between new and existing facilities is minimized as follows: (2) Here,   ,  = 1,  are a nonnegative weighting coefficients for  facilities and   = (  1 ,   2 ),  = 1,  are coordinates of the existing facilities.Also, ‖ ⋅ ‖ 2 is the Euclidean distance which corresponds to a classical Weber problem.
The choice of distance functions is an important factor in location model representation.The   metrics have received the most attention from location analysts.However, many other types of distances have been exploited in the facility location problems.A review of metrics exploited in many variations of location problems includes central metrics [18], weighted one-infinity norm [19], mixed distances [20,21], continuous and network distances [22][23][24], various round and block norms [11,25], and location problems on a sphere and arbitrary surface [9,26].
Very little has been done to include special cases of the class of metrics in location models.Späth [27] introduced Jaccard metric in minisum problem while in the research of [28], using Jaccard metric and Jaccard median was reported to be of value for classification and other problems in scientific fields such as biology, botany, psychology, paleontology, cognitive sciences, and computer science.A finite descent algorithm for the solution of minisum problem with Jaccard metric was developed in [29].
Some of recent efforts in this direction are those presented in [16] for facility location models where the cities have road networks with streets that are either straight line emanating from a fixed center or straight lines through the central point.Also road networks with only one main street and the other crossing it at right angles were suggested in [30].
Moscow metric or Moscow-Karlsruhe metric, considered in this paper, was used in [31] based on its applicability in the construction of Voronoi diagram on R 2 for cities similar to Karlsruhe.
Many authors proposed approximate approaches to the location problems with various or arbitrary distance functions [8,26].Such approaches transform the problem into a discrete location problem [32].However, methods for discrete location problems take many computational resources [32,33] with no guarantee of the appropriate precision of the result.
In [30], investigation was carried out on the Weber problem in the plane, under the assumption that the distance function is measured with the lift metric.The proposed algorithm for finding the optimal solution is based on known algorithm with underlying rectilinear distances.Authors [34] further considered French metro metric as the underlying in the minisum problem.The transformation of the considered Weber problem is reduced to the analogous optimization problem based on rectangular distances using polar coordinates.The algorithm stated in [34] is applied on the optimal location of the office of the delivery service in the subway of the city Novosibirsk, Russia.In this paper, the British Rail metric [35] which assumes that any path between two points includes the central point (origin) was considered.

Location Problems with Metrics Based on Angular Distances
For the sake of motivation, let us consider an example illustrated in Figure 1.A crane or other manipulator on a static platform (denoted by 1) has a rotating boom (2) with a mobile lifting mechanism (3) moving along the boom.The whole structure has three degrees of freedom: the height ℎ of the hook (4), the rotation angle , and the position of the lifting mechanism on the boom  (radius).Polar or cylindrical coordinate system [36] is useful to describe the position and movement of the hook of the crane or manipulator.The origin of the coordinates must coincide with the axis of rotation of the boom.
The following notations are used below.Any point  = (  ,   ,  ℎ ) in our coordinate system is described with 3 coordinates: height  ℎ , radius   , and angle   .Radius   is the Euclidean distance between the point  and the axis of rotation; height  ℎ is the distance between  and a surface perpendicular to the axis.The following equations can be used to convert the Cartesian coordinates of a point Υ = ( 1 ,  2 ) on a plane into polar coordinates: In a 3D space, for Υ = ( 1 ,  2 ,  3 ), an additional coordinate  ℎ =  3 is added.
If the mechanism transfers a load from a point  = (  ,   ,  ℎ ) to a point  = (  ,   ,  ℎ ) then it spends some energy to change the height for the value Δℎ = | ℎ −  ℎ |, to modify the angle for and the position of the lifting mechanism (radius) for Δ = |  −   |.
In some region accessible by the manipulator (ℎ < ,  < , where  is the height of the crane,  is the effective length of the boom), there is a set of  points (customers)   ,  = 1, . . ., .Arbitrary th point   = (   ,    ,   ℎ ) is required to deliver a   cargo pallets with some freight (building materials, e.g.).The location problem searches for a point  = (  ,   ,  ℎ ) such that the cost of placing the whole volume of freight reaches its minimum.In general, the problem is to find appropriate point  from the following minimization problem: Here,   ,  = 1,  are nonnegative weighting coefficients, and (,   ) is the distance function which determines the cost of moving goods from the point  to the point   .
The classical Weber problem with the underlying Euclidean metric assumes the Euclidean distance (,   ) = ‖ −   ‖ 2 .However, expenses (energy, time, etc.) of mechanism are not proportional to Euclidean distance.Four strategies for manipulator control and four corresponding location problems depending on the method of calculating these expenses are formulated.
Strategy 1. Minimize the cost of the mechanism movement.If the cost of moving the hook vertically for 1 is  ℎ , the cost of the boom rotation is   for 1 radian and the cost of the lifting mechanism movement along the boom (radius change) is   for 1.Then the distance between  and   is defined by and the objective function from ( 5) is Then the term lifting crane metric can be used to denote the distance function (6).The Weber problem corresponding to the objective function (7) was described in [37].
Strategy 2. Minimize the length of freight path provided only one type of movement (vertical movement, boom rotation, or radius change) is allowed to be performed in a single unit of time.Under this assumption, we have a mixed norm considered in [21]: The vertical component of the path | ℎ −   ℎ | is independent of other components.The length of the horizontal component is the distance in Karlsruhe (Moscow) metric [35].
Urban planning in cities of Moscow or Karlsruhe includes streets of two types: "rays" from the center and disjoint "road rings" around the center.There exists three ways for transition from point   to point : (1) moving along a "ring" street from   and then moving along a "ray" up to  (Case A in Figure 2).This path is optimal if  =   (   ,   ) ≤ 2 and   ≥    ; (2) moving along a "ray" from   and then moving along a "ring" street up to  (Case B in Figure 2).This path is the shortest if  =   (   ,   ) ≤ 2 and   ≤    ; (3) moving from   along a "ray" up to the origin (center of the city), then along some other "ray" from the center to  if  =   (   ,   ) ≥ 2 (see Case C in Figure 2).This case coincides with the French metro metric [34].
Strategy 3. Minimize the length of the path of the hook under assumption that the rotation is allowed with zero spread of the lifting mechanism only (when the boom is shortened).If the demand point is unreachable from the current point without rotating the boom then the spread of the lifting mechanism must be shortened first (a load moves to the origin), the boom rotates and then the spread of the lifting mechanism increases to reach the demand point.This assumption is actual for some manipulators with a telescopic boom.For such kind of manipulators, the vertical movement is impossible or allowed to be performed by rotating the boom in a vertical plane (changing the azimuth).For the simplicity, a 2D case is here considered: Strategy 4. This strategy is quite similar to the previous one, except for one important condition.The load moves to the zero point in any case, no matter whether the rotation of the boom is required or not, so that the distance between  and   is defined by In case of Strategy 4, the distance function for the working part of the manipulator can be described by British Rail metric (flower shop metric) [35], with considering an axis of rotation as the origin.Distance function in Strategy 3 corresponds to the French metro metric with polar coordinates.Algorithm for this case is considered in [34,38].This method is further developed and described in [39].Algorithms for lifting crane metric (Strategy 1), Moscow-Karlsruhe metric (Strategy 2), and British Rail metric (Strategy 4) are shown in the subsequent sections.

Algorithm for the ''Lifting Crane'' Metric (Strategy 1)
The distance function between points   = (  1 ,   2 ,   3 ) and  = ( 1 ,  2 ,  3 ) in rectangular coordinates is defined by the following expression: The optimization problem (5) based on the goal function (11) splits into three independent problems with objective functions: Both problems can be reduced on the sequential application of a more general function (in ( 12)) on the sequential application of a more general problem with the following objective function: The problem (13) can be solved using known algorithm (see, e.g., [1,40]).
In case of Strategy 1 (see Section 3), the objective function ( 7) is the sum of three independent functions: Solution of the problem ( 7) is a point  * = ( *  ,  *  ,  * ℎ ) whose coordinates  *  ,  *  , and  * ℎ are solutions (minimizers) of functions ( 14), (15), and ( 16), respectively.Furthermore, it can easily be observed that problems ( 14) and ( 16) correspond to the generalized problem (13) and they can be solved by the appropriate algorithm proposed in [1,40].Lemma 5. Let X be a set of all minimizers of the objective function (15) and A  = ( 1  , . . .,    ) be the set of angular coordinates of the existing facilities (demand points).Then there exists    ∈ A  such that    ∈ X or (   + ) ∈ X.
Proof.Let  *  ∈ X be a minimizer of the function (15) and Then we turn to the polar coordinate system such that  *  = 0 (Figure 3) and we assume that values of all angles satisfy − < If Since    < 0 ∀ ∈  − and   (   ,     ) ≤  ∀,   ∈  − , it follows that Since Thus, if  + = 0 then  *  is not a minimizer of the objective function (15) unless all values    are its minimizers.Similarly, it can be proved that if  − = 0 then  *  is not a minimizer of ( 15) unless all values    are its minimizers.Thus, if  *  is a minimizer of the objective (15) and all values    are not its minimizers then both subsets  − and  + are nonempty.
We choose four indices, two for each of the subsets  − and  + (indices can coincide if the subset contains an index of a single point): Then it is possible to choose an arbitrary value    , provided that max In this case, (  ,   ) =    −    ∀ ∈  + and (  ,   ) = −   +    ∀ ∈  − .Thus, for each the value of the objective function in ( 15) is equal to Here, For  *  = 0 it follows that ( *  ) =  0 .If Δ > 0 then for    to satisfy the following holds: This means that  *  is not a minimizer of (15).Similarly, if Δ > 0 then, for    satisfying the following expression below is obtained: If Δ > 0 then for    which satisfies it follows that Thus, in this case  *  is a minimizer, so the same is valid for all points inside the interval including the boundary points max(  Thus, if we are required to find any minimizer of   (  ), two sets have to be sought: {   |  = 1, } and {   +  |  = 1, }.Algorithm 6 is offered for solving this problem.Algorithm 6. Solving the location problem with the "lifting crane" metric.
Step 6. Display the result  * = ( *  ,  *  ,  * ℎ ).STOP.Let us estimate the computational complexity of Algorithm 6.Let  be a number of existing facilities (demand points).The algorithm for the  1 metric ( [1,40]) includes coordinates sorting in ascending order with the asymptotic complexity of ( log ) and summation of coordinate values with linear complexity.Thus, the general computational complexity of steps 1 and 2 is described by the asymptotic formula ( log ).

Algorithm for Moscow-Karlsruhe Metric (Strategy 2)
In the case of Strategy 2, defined in Section 3, the objective function of the Weber problem ( 5) is the sum ( Minimum of the goal function ( 32) is achieved in a point  * = ( *  ,  *  ,  * ℎ ), where  * ℎ is a minimum point of the objective (33), and  *  and  *  are minimizers of (34).So, problem (32) corresponds to the generalized problem (13).It can be solved by the appropriate algorithm from [1,40,41].
Lemma 7 provides a solution of the location problem with the objective function (34).Lemma 7. Let X be a set of minimizers of the objective function (34)   In addition, consider the following three subsets of indices with respect to an arbitrary angle   ∈ (−, ]: Then The value of the objective function (34) at the point  *  = 0 is equal to For an arbitrary angle   the following holds: There exists certain interval (Figure 4) When   ∈ [ min  ,  max  ], some parts of (39) are constant.It can be designated as follows: Objective function is linear for implies Consider the following three cases.
Case ( This can be designated with Then  MK (  ,  *  ) =  1 +   1   + ∑ ∈ <   |  −    |.This function is piecewise linear (a linear spline).The boundaries of each of its intervals (subdomains)    ,  = 1,  are its possible minimizers.If the derivative of this function is equal to 0 for any given interval [   ,     ], then all points of the interval are possible minimizers of the objective (34) including the points    and     .Thus, for finding a minimizer of (34), it is sufficient to determine the value of this function on a set of points Cardinality of this set is || = 3 2 +1.A full search procedure can be used to find the minimizer.Algorithm 8 is proposed for solving the minimization problem with the objective function ( 32)- (34).Algorithm 8. Solve the location problem with Moscow-Karlsruhe metric.
Estimate the computational complexity of Algorithm 8. Let  be a number of existing facilities (demand points).
Step 1 of Algorithm 8 finds the solution of the Weber problem based on  1 metric (see [1,40]).Therefore, it involves coordinates sorting in ascending order with the asymptotic complexity ( log ) as well as summation of coordinate values with linear complexity.Thus, the total computational complexity of Step 1 is described by the asymptotic formula ( log ).Steps 3-3.2 define a nested loop cycle in which the values of the objective function are calculated for each of the  values of coordinates    and    ± 2. Based on Steps 3 and 4, the objective function is evaluated 1 + 3 2 times.The objective function is linear (asymptotic complexity ()), so that the complexity of Steps 3-5.3 and complete Algorithm 8 is of the order ( 3 ).

Algorithm for Location Problem with British Rail Metric
Lemma 9 is intended to shorten the set of possible facility locations (candidate solutions) in case of the Weber problem with underlying British Rail distance metric (which appears in Strategy 4).

Lemma 9.
If Advances in Operations Research then the point  = (0, 0) is a solution of the goal function (5) with distance function (10).
The result of Lemma 9 is perfectly consistent with the main result of the paper [42].In [42], Chen proves that   is the solution of the classical Weber problem with Euclidean metric if ∃  ∈ {1, } :    ≥ ∑  =1   .It has been proved above that if this condition is not true in the case of British Rail metric, then the only possible solution is (0, 0).Algorithm 10 is proposed.
Algorithm 10.Solve the location problem with British Rail metric.

Numerical Example
In this example, attempt is made at solving a location problem based on the "lifting crane" metric.Polar coordinates of the existing facilities (demand points) and the corresponding weighting coefficients are given in Table 1.
Step 5.For each  = 2 to 5 perform cycle.Results of steps 5.1-5.3 are summarized in Table 2.

Conclusion
This paper has presented a number of challenging DPFs in location problems that have been insufficiently attempted so far.The motivation is aimed at enriching the spectrum of problems for researchers to consider and creating new and more realistic decision tools for facilities location.For instance, when a transport mechanism with telescopic boom is used, optimal location problems are formulated as the Weber problem with metrics based on measurement of angular distance.Solution of the Weber problem with each of considered metrics is reduced to solving a problem with the rectangular metric ( 1 ) or searching in a discrete set of possible locations.All algorithms run in a polynomial time.Efficiency of the proposed algorithms has been proved analytically using a numerical example.

Figure 2 :
Figure 2: Various paths in case of control Strategy 2.
Steps 5-5.3 define a cycle in which values of the objective function are calculated for each of  − 1 coordinates    and    + .Based on Steps 3 and 4, the objective function is estimated 2 times.The objective function is linear (asymptotic complexity ()), so the asymptotic complexity of Steps 3-5.3 and complete Algorithm 6 is equal to ( 2 ).