Bus Stops Location and Bus Route Planning Using Mean Shift Clustering and Ant Colony in West Jakarta

Traffic Jam has been a daily problem for people in Jakarta which is one of the busiest city in Indonesia up until now. Even though the official government has tried to reduce the impact of traffic issues by developing a new public transportation which takes up a lot of resources and time, it failed to diminish the problem. The actual concern to this problem actually lies in how people move between places in Jakarta where they always using their own vehicle like cars, and motorcycles that fill most of the street in Jakarta. Among much other public transportations that roams the street of Jakarta, Buses is believed to be an efficient transportation that can move many people at once. However, the location of the bus stop is now have moved to the middle of the main road, and it is too far for the nearby residence to access to it. This paper proposes an optimal location of optimal bus stops in West Jakarta that is experimentally proven to have a maximal distance of 350 m. The optimal location is estimated by means of mean shift clustering method while the optimal routes are calculated using Ant Colony algorithm. The bus stops locations rate of error is 0.07% with overall route area of 32 km. Based on our experiments, we believe our proposed bus stop plan can be an interesting alternative to reduce traffic congestion in West Jakarta.


Introduction
According to the new start-stop index created by Castrol motor oil company [1], Jakarta has become number one city with the worst traffic in the world. The fact that Jakarta already has quite a variety of transportation like trains, angkot (public car established by private company), public bus (runs by a private company), ojek (a motorcycle runs by an individual person with low rate of fare), and the newest addition to it is the Busway (BRT-Bus Rapid Transit established by the Official Government of Jakarta) are still not proven to be an optimal solution for solving the traffic problem. Moreover, the actual issue that shows a huge contribution to the traffic problems was the increasing number of a private vehicle in Jakarta streets [2].The survey presented by the Statistic Department of Central Jakarta illustrate the number of a private two-wheel motorcycle is filling most of the roads with roughly 13.084.372 units or 74.67% on the road. In contrast, other vehicles especially buses only take 2.07% part of the population, while the other like private cars, trucks, buses, and governments vehicles are each takes the percentage of 18.64%, 3.84%, and 0.79% respectively [2].
The private vehicle owners mostly absorb the total usage of public transportation, especially the private car and motorcycle owner. The bus is one of a few public transportation that get the least attention from people due to some reason presented in the early survey. The survey asked 46 respondents (24 male and 22 female) about the transportation they usually use with their own reason. The survey shows that 63% (29 people) of the respondents don't mainly use bus because the bus is too far away from my home, the other reasons are there are no bus stop nearby my residence with 27%, and just 10% of the respondent felt awfully uncomfortable with the bus condition.
According to the data found during the survey, this research will be focusing on finding the optimal location for bus stops that will be located relatively near to the residential area, and the shortest route for the newly discovered bus stops location in this research.

Data Acquisition
The residential area located in West Jakarta holds the largest number of houses in Jakarta region [3]. Moreover, the region includes several well-known residential districts in the center of West Jakarta area (i.g. Green Garden, Kembangan, Kedoya district, and more), along with more than five thousand houses outside these districts. A large portion of West Jakarta have been chosen as the designated area for this experiment, one of the areas is shown in Figure 1 where the houses serve as the main data is marked as red pins in the figure.
The file containing the whole data will later serve as data input to finding the optimal bus stop locations by using mean shift algorithm implemented in python version 2.7.11.

Bus Stop's Location Estimation
We apply mean shift [4][5][6] [11] (Equation 1) clustering algorithm to estimate the optimal location of the bus stops. The location of the bus stops are represented by the cluster center calculated by the mean shift, and the radius of the bus stop's service areas are the bandwidth of the clusters.
Where the difference of m(x) -x is called as mean shift in [4], x is initial centroid estimates (the longitude and latitude of inputs), S is the longitude and longitude of labeled houses, and K is the kernel used in the method (Gaussian kernel with K(s − x) = e −c||s−x|| 2 ). We also using a bandwidth or radius that represent how far is the service area of the new bus stop will be, in this case, we will set an arbitrary range of bandwidth of 500m as the default bandwidth for the first attempt in this experiment.

Bus Stops Routes Optimization
Previous studies have shown that ant colony can be used to solve optimal route problem (Bedi, 2007 [13]; Alves, 2010 [14]).The bus stops routes are optimized using ant colony algorithm [7] [8] [12] following: where ,P −ij. is the probability of choosing the state, T −ij. is the intensity of the pheromone trail for each interstate, ,N − ij. is the visibility of a solution that would be selected by the ants. For the pheromone part, α is a parameter controlling the intensity of the pheromone trail where α ≥ 0, and β is a parameter controlling the visibility where β ≥ 0 [10].
The new pheromone trail (T − ij) is recalculated in each state by: where ρ is the constant evaporation of pheromone trail 0 > ρ > 1 [10]. The ant colony algorithm is implemented in 2013 version of Matlab. In our implementation we use α = 4 and β = 1 as the main parameter of both the intensity of the pheromone trail and ants visibility. To calculate the pheromone trail, we set the ρ = 0.15.

Bus Stops Location
We estimate the location of bus stops using an arbitrary 500 meters bandwidth on Equation 1. It produces eight cluster centers that will be used as the new location for the new bus stop location (Figure 2a. Unfortunately, the result is not quite reliable, because in the real situation every road in the street is full of curves and not just a straight road.
To find the amount of error produced by the first result, a customized google maps API code is made to calculate how many houses miss the actual bus stop service radius or we can say further than 500m from house to bus stop. There are 594 houses or 7.72% out of 7962 total houses that miss the bus stop service radius, and also the other error information is the maximum, minimum, and average range of error of each house.
After seeing the error result, we decide to use various numbers of arbitrary bandwidth radius ranging from 450m, 400m, 350m, 300m, and 250m. From each of the result that can be seen in Table 1, and we choose one result that has the least error as the final solution.   From the result illustrated by the Table 1, shows a various result from different bandwidth (radius). We pick the 350 m bandwidth because the result produces least error percentage with 0.07%, i.g. six houses miss the boundary of 350 m.
From the result using 350 m bandwidth in Figure 2b, we can see that there is 19 bus stop generated in the map, compare with Figure 2a that use 500 m bandwidth which only generates eight bus stops with higher bandwidth radius. This means the result of 350 m bandwidth can reach out smaller area than the result from 500 m bandwidth.  The placement of the new bus stop and the existing bus stops can be seen in Figure 3a. The blue box represents the new bus stop, and the red box represents the old bus stop. We can see there are only 4 bus stops marked with a red box that currently operating and located in the middle of the main road far from the residential area . In the other hand, there are 19 new bus stops marked with a blue box scattered around the places so that many people can access the bus stop more easily across the residential area.

Bus Route
From the chosen result before, the geographical location of the new bus stop locations will be inserted into the source code as the input by using Matlab programming tools. There are several main inputs used in the like the number of ants, a number of cities (in here will be served as bus stop geographical location) and a number of iteration or repetition because the ant colony works in random and has many different kinds of possible outputs [9].
As presented in Figure 3b are the final result of ant colony method where the route leads from bus stop from number 1 through 19 and back to bus stop number 1. The visualization of the route is created using Google Maps feature.
The 26.44 km route comes from several run attempts of changing the parameter of ant colony method. From Table 2, 3, 4, and 5 are the attempt to find the shortest by changing some parameter in ant colony method which is number of ants, and number loop or attempt that the ants going to do to find the shortest path in that attempt.

Conclusion
This study has successfully determined the optimum solution for bus stop locations and its sub-optimal route. We prove that mean shift and ant colony algorithms can handle this particular problem, and should the case where the area is expanded further. And based on this experiments, we believe our proposed bus stop plan can be an interesting alternative to reduce traffic congestion in West Jakarta. Next we should expand the area of interest to cover wider Jakarta area and calculate more optimize bandwidth to find best fit radius.