Sample Geography Paper on P- Median application in solving study area problem

P- Median application in solving study area problem

P median is a model formulated in the mid sixties by Hakimi (Pizzolato, Barcelos, Lorena and Antonio, 2004). It is applied in solving allocation of facilities such that P facilities are allocated to a geographically distributed population in Q demand points in such a way that the average or total distance travelled by the population to its closest study centre is minimized (Han, 2013). The model is applied in location allocation problems in rural areas of developing countries and its aim is to provide the most efficient solution by locating facilities in such a way that maximum demand as much as possible. The objective function of P median model concentrates on improving efficiency (Pizzolato et al, .2004).

P median problem also known as location allocation model is one of the heuristic methods used to exploring space solutions and progressively developing solutions that are good or near optimal (Carling, Han Håkansson and Rebreyend, 2012). The purpose of the P median problem and its application in general planning to solve the study area problem is useful in locating several numbers of facilities and allocating the demand that is served by those particular facilities to determine the system of service efficiency. The model may also be applied in establishing the relationship between the census data of a school and its performance (Carling 2012).

In countries like India that are predicted to experience extraordinary growth rate in population, proactive measures are required to avoid the collapse of pubic systems like education facilities and health facilities (Weaver and Church, 2011). P median model can be applied in this case when establishing new facilities for instance by measuring distances travelled to school and assist in proposing new locations for other educational facilities (Tansel, Francis and Lowe, 2005). Decentralization of planning decisions in a country from central to local governments necessitates the application of the model in finding out solutions for specific regions in a certain locality. The model acts as a decision support system which assist in generating a number of scenarios for locating education facilities in a rural area in a certain duration of time and using a limited budget.

The model is a powerful tool necessary in strategic decision-making process and its application in locating new facilities is supported by Geographic Information Systems (GSI). GIS graphical user interface has an association with databases containing geo references that enables preparation of location planning of facilities within a community by conducting spatial analysis of a particular area (Parvaresh, Golpayegany, Husseini and Karimi, 2013). This provide details such as configuration of the area, geographical as well as topological barriers and the distribution of population by age, income, size, aspects of socioeconomics and ultimate restrictions. P median then proposes the location of required facilities by making considerations of the underlying features such as language spoken in a particular school and travelled distance by students (Parvaresh, 2013). 

Establishment of new study areas is generally costly and time sensitive project, therefore the right locations have to be identified, pre determination of appropriate capacity specifications of the facility and capital allocations that are required (Cai, 2014) and (Parvaresh, 2013). In solving the study area problem, geographical distribution of educational facilities and delineation of their service areas should put in to consideration how the people they serve are geographically located (Korupolu, Plaxton and Rajaraman, 2000). In capacitated P median problem it is considered that each potential facility has a fixed capacity meaning that it has a maximum number it can satisfy of the demand points (Korupolu, 2000). The no capacitated P median problem, each potential facility can satisfy an unlimited demand points in number. Meridians are the p facilities that comprise a solution to the problem (Basu, Sharma and Ghosh, 2014).

The main objective of p median problem is determination of p facilities in a set that is predefined with n ( n > P) potential facilities so as to meet a set of demands and that way minimizing the sum of distances between point of demand and nearest facility (Basu et al., 2014) The model is referred to as P median because the median vertex is the vertex of a network or graph which the total of the length of the shortest paths to all other vertices is the smallest. The edges on a median vertex represent roads on which a school is located while a child is represented by the nodes minimizing the distance that have to be walked by children going to that school. Finding the median vertex on a network provides the solution to a problem since a location that minimizes the sum of distance to be covered to three points is established (Kalcsics, Nickel and Puerto, 2003).

Formerly by making assumptions that all vertices in a graph are potential meridians, the P median problem is stated as: assume G= (V, A) where V are vertexes and A the edges in undirected graph. The aim is finding a set of vertexes Vp =V which is the meridian set with p as the cardinality. Hence, the sum of the distance between vertex sets remaining {V-VP} which is the demand set and minimization of vertex in VP that is the nearest (Fotheringham, Densham and Curtis, 2008). The P median problem is also formulated in terms of Integer programming as follows


i = demand node index

j= potential education facility cite index

hi = demand at node i

dij =distance between potential education facility j and demand node i

p= number of education facilities to be located

The decision variable will be;

   X j

I    if demand at node I are served by a facility at node j 0 if not  

Yij =

Using the above definitions, the P median problem is then written in to an integer linear program as shown below

Minimize                                                                                                                                                                     (1)

Subject to:          = P,                                                                                                     (2)

 = I            Λi,j                                                                                                              (3)

Yij – X j≤  0,       Λi,j                                                                                                               (4)

Xj €{0,1}        Λj,                                                                                                                  (5)

Yij €{0,1)  Λi,j                                                                                                                       (6)

The first (1) objective minimizes the total demand weighted distance between the facility and its users. Constraint in the second objective dictates only p facilities are located .in constraint (3) every demand is assigned to some facility in the area while constraint (4) only allows assignments to areas which facilities have been located. Constraint 5 and 6 relate to the problem decision variables x and y are binary requirements (0 or 1) (Fotheringham et al., 2008). The formulation dictates that facilities are located at finite potential sites, which also represent the nodes in a network. It has been proven that there is an optimal solution for any number of facilities p to the P median that locates only at nodes of the network. The simplified formulation therefore includes only nodes taken as the potential facility sites and the objective function value is not penalized.     

P median problem is difficult to apply in a general network when solving for optimality. The number of possible configuration networks can be reduced by limiting the potential facility locations to network nodes to:


In this case, N represents number of nodes present in the network. Therefore, when P is affixed value, the p- median problem can be solved in polynomial time.

The P median model finds out the number of studying facilities that are found in a particular region and their capacity during that time period (Church, 2009). These findings will be useful in determining the population that can be found within a certain radius of a region and by projecting the population of those attending these facilities is the future, it is possible to know the minimum number of schools that will be required to meet the future demand in a specific region (Kalcsics, 2003). The new facilities should also satisfy the condition of minimizing the distance students have to travel and condition of covering as many students as possible within a given distance. The model assumes that those using the facilities access them by walking meaning that they would prefer those located close to their homes (Marianov and Serra, 2011).

It also helps in finding out those regions that do not require adding new facilities depending on the projected population and capacity. This is so if the current facilities have enough space to accommodate additional projected population (Menezes and Pizzolato, 2014) and (Owen and Daskin, 2008). The p median founds out whether the existing facilities are being utilized to their full capacity by comparing the existing demand and the number of facilities found in a certain region (Wang, Kwan and Ma, 2014). It helps determine the quality of services that are offered in the facilities since if those available are inadequate it translates to low quality services being provided. There also additional resources that are necessary in the management and running of the facilities, the P median model will hence assist in making cost projections for additional facilities as well as assist in tracking those costs that are already spent on existing facilities. In those areas that have an increasing population a study, conducted using P median model shows an immediate need in expansion of existing facilities. Another finding is that periodical evaluations using the p median model are necessary since there is high population mobility that also affects the populations of an area (Kariv and Hakimi, 2001). Studies conducted in India proposed the use of P median model and considered the location of high schools in rural areas to be within a maximum distance of eight kilometers to maximize the population covered within it (Ndiaye, Ndiaye and Ly, 2012). The model assists in finding out the most economical site within which a school should be constructed or expanded.

There are disadvantages that were also found to be associated with this model such as the possibility of occurrence of errors since its solutions are based on aggregate approximations of demand and information from a location can be lost during the aggregation (Hansen and Mladenović, 2008). During its application, the model may also be unable to handle a large problem. The combinational features of the problem also pose a computational challenge; even if the P and Q are small, the task of enumerating all possible locations in search of the optimal one is not easy. Measuring of distance between the existing demand and nearest educational centre is also not easy.


Basu, S., Sharma, M., & Ghosh, P. S. (2014). Metaheuristic applications on discrete facility location problems: a survey. OPSEARCH, 1-32.

Cai, C. (2014). An application of gravity p-median model with different distance decay functions.

Carling, K., Han, M., Håkansson, J., & Rebreyend, P. (2012). An empirical test of the gravity p-median model.

Carling, K., Han, M., Håkansson, J., & Rebreyend, P. (2012). Distance measure and the p-median problem in rural areas. Annals of Operations Research, 1-11.

Church, R. L. (2009). Location modeling and GIS. Geographical information systems1, 293-303.

Fotheringham, A. S., Densham, P. J., & Curtis, A. (2008). The Zone Definition Problem in Location‐Allocation Modeling. Geographical Analysis27(1), 60-77.

Han, M. (2013). Heuristic Optimization of the p-median Problem and Population Re-distribution.

Hansen, P., & Mladenović, N. (2008). Complement to a comparative analysis of heuristics for the p-median problem. Statistics and Computing18(1), 41-46.

Kalcsics, J., Nickel, S., & Puerto, J. (2003). Multifacility ordered median problems on networks: a further analysis. Networks41(1), 1-12.

Kariv, O., & Hakimi, S. L. (2001). An algorithmic approach to network location problems. II: The p-medians. SIAM Journal on Applied Mathematics37(3), 539-560.

Korupolu, M. R., Plaxton, C. G., & Rajaraman, R. (2000). Analysis of a local search heuristic for facility location problems. Journal of algorithms37(1), 146-188.

Marianov, V., & Serra, D. (2011). Median problems in networks. In Foundations of location analysis (pp. 39-59). Springer US.

Menezes, R. C., & Pizzolato, N. D. (2014). Locating Public Schools in Fast Expanding Areas: Application of The Capacitated P-Median and Maximal Covering Location Models. Pesquisa Operacional,34(2), 301-317.

Ndiaye, F., Ndiaye, B. M., & Ly, I. (2012). Application of the P-Median problem in school allocation.

Owen, S. H., & Daskin, M. S. (2008). Strategic facility location: A review. European Journal of Operational Research111(3), 423-447.

Parvaresh, F., Golpayegany, S. H., Husseini, S. M., & Karimi, B. (2013). Solving the p-hub median problem under intentional disruptions using simulated annealing. Networks and Spatial Economics13(4), 445-470.

Pizzolato, N. D., Barcelos, F. B., Lorena, N., & Antonio, L. (2004). School location methodology in urban areas of developing countries. International Transactions in Operational Research11(6), 667-681.

Tansel, B. C., Francis, R. L., & Lowe, T. J. (2005). State of the art—location on networks: a survey. Part I: the p-center and p-median problems. Management Science29(4), 482-497.

Wang, J., Kwan, M. P., & Ma, L. (2014). Delimiting service area using adaptive crystal-growth Voronoi diagrams based on weighted planes: A case study in Haizhu District of Guangzhou in China. Applied Geography50, 108-119.

Weaver, J. R., & Church, R. L. (2011). Computational procedures for location problems on stochastic networks. Transportation Science17(2), 168-180.