Cooperative Multiagent System for Parking Availability Prediction Based on Time Varying Dynamic Markov Chains

Traffic congestion is one of the main issues in the study of transportation planning and management. It creates different problems including environmental pollution and health problem and incurs a cost which is increasing through years. One-third of this congestion is created by cars searching for parking places. Drivers may be aware that parking places are fully occupied but will drive around hoping that a parking placemay become vacant. Opportunistic services, involving learning, predicting, and exploiting Internet of Things scenarios, are able to adapt to dynamic unforeseen situations and have the potential to ease parking search issues. Hence, in this paper, a cooperative dynamic prediction mechanism between multiple agents for parking space availability in the neighborhood, integrating foreseen and unforeseen events and adapting for long-term changes, is proposed. An agent in each parking place will use a dynamic and time varying Markov chain to predict the parking availability and these agents will communicate to produce the parking availability prediction in the whole neighborhood. Furthermore, a learning approach is proposed where the system can adapt to different changes in the parking demand including long-term changes. Simulation results, using synthesized data based on an actual parking lot data from a shopping mall in Geneva, show that the proposed model is promising based on the learning accuracy with service adaptation and performance in different cases.


Introduction
The problem of traffic congestion in urban cities has been one of the very distressing issues.In order to arrive to a destination people need to start their trip well ahead of their scheduled program and will be forced to spend more time on the way.In addition, it has economical impact with incurring significant amount of cost.For example, in USA, studies show that traffic congestion costs about 124 billion US dollar (USD) annually with an expectation of rising to 186 billion USD in 2030 [1], while it was about 48 billion USD in 1990s [2].
It is also one of the major players in air pollution [3].The emission of different air pollutants degrades air quality significantly [4].This pollution in turn results in health problems including worsening asthma symptoms, asthma development in children, lung cancer, and heart disease [4].Health problems, which are not related to the air pollution, are also reported including psychophysiological stress of the drivers [5,6].
Studies suggest that on average one-third of the traffic jam is created by cars searching for a parking place [7,8].Hence, the study of parking problems and their corresponding solution methods have been one of the major issues for researchers in the field.Price based controlling approach for the parking demand by analyzing different pricing strategy where the cost increases when the number of available parking spaces decreases has been one method proposed [8].However, organizations, like universities, develop an optimization model of the problem and try to optimize the parking slot allocation, thus helping with proper planning and design of parking spaces [9].
In busy centers or part of a city, drivers are not well aware of the parking situation and availability.This gap of information can be bridged using a proper statistical prediction approach based on previous experience and a multiagent-based service to communicate among parking places in the neighborhood and with drivers.Prediction approaches have been one of the essential tools used to analyze and forecast different scenarios based on limited information.It has been used in different areas including financial market, agriculture, environmental issues, and engineering [10][11][12][13][14].With the rapidly growing studies on transportation planning and management [15][16][17], prediction is playing a vital role.Markov chain theory can be useful for learning based prediction purposes.The Markov property is when one can make predictions for the future of the process based solely on the knowledge of its present state.It has been used for prediction in different applications.Hence, in this paper, based on previous data transition matrices of the Markov chain will be constructed and used to predict the next state of the available level of parking space.The states will be the level of available parking places.Since the demand for parking place varies and depends on different issues, a time varying Markov chain will be used.In addition, the transition matrix will "learn" through iterations and adapt itself for long-term changes in the demand for parking.An opportunistic spaceand time-related multi-agent-based service then compiles all these predictions, generates a cumulative prediction for a neighborhood of interest, and supports and answers drivers queries for parking space availabilities.This will relax the traffic jam as the drivers will no longer wander around looking for vacant parking slot.To summarize, the main aims and objectives of this paper are (1) to propose an approach of constructing a dynamic time varying Markov chain approach based on previous data for parking availability prediction, (2) to use the Markov chain based approach for the prediction of parking availability in a given parking place, (3) to use multiagent systems in order to construct a cumulative prediction of the neighborhood of multiple parking places, and (4) to introduce a learning approach where the Markov chain or the prediction can adapt for changes in the environment which affects the parking place demand.
The paper is organized as follows.The next section discusses related works.Section 3 presents an opportunistic parking service based on the notion of spatial services we developed in previous works.Section 4 discusses the parking prediction mechanism we propose.This is followed by an evaluation of the approach in Section 5. Section 6 provides a discussion and possible future works.

Related Works
Smart commercial solutions for dynamically finding parking places usually involve sensors reporting parking occupancy to a central server gathering all this information.Drivers are then provided with dynamic notifications, active route guidance, or an overview map of available parking spaces (http://www.mobility.siemens.com/mobility/global/en/urbanmobility/road-solutions/integrated-smart-parking-solution/pages/integrated-smart-parking-solution.aspx).These sensors can be either overhead radar sensors, or on the ground sensors located at the different parking places reporting their current occupancy.Such services can be combined with others services to provide multimodal solutions (e.g., mixing public and private transport solutions).Advanced research solutions involve the use of agent-based systems for negotiating parking spaces in advance, or vehicular communication to provide information within a parking lot [18].Solutions can be central solutions, opportunistic, aiming at searching parking spaces, guiding drivers towards such spaces, or providing e-payment solutions [19].
Some studies suggest a mechanism of current parking availability information delivery to the user.Reference [20] discusses information manipulation and delivery, with objectives including walking distance, thus aiming at decreasing the emission of toxic gases.Space availability information delivery mechanism is based on what they call PARC (parking access and revenue control) [21].It is useful, especially when the parking garage is huge, to use information management delivery systems to locate vacant spaces.However, still it tells the current situation and it does not predict the likelihood of the parking situation in the future.Hence, the best way to address this problem is to couple these ideas with appropriate prediction system.
Hence, the development of parking space prediction approaches has also been one of the research focus areas.A number of studies have been reported on parking availability prediction.Based on the turnover rate for each parking lot, a parking demand was generated in [22].The land use per unit area is used to forecast a cumulative demand value which may be useful for road and parking management, but not for guiding drivers according to their parking needs.Calibrated discrete choice model was used for parking space prediction with a parking reservation mechanism, in [23].
Recently, based on queuing theory and Laplace transform a parking prediction approach was proposed [24].They combined real time cloud-based analysis and historical data trends that can be integrated into a smart parking user application.A multivariate autoregressive model for parking prediction is also proposed in [25].They used both temporal and spatial correlations of parking availability.The spacial and temporal aspects of parking prediction were also addressed in [26].Back-end model is used to learn historical models of parking availability which can be stored in the map in the vehicle.
Neural network is another method used in the domain.Prediction of parking occupancy mainly by studying the relationship between aggregating parking lots and predicting parking occupancy, using feedforward neural network, is studied in [27].Similarly, [28,29] use neural network coupled with Internet of Things (IoT) for predicting parking availability with backpropagation.Another research on parking availability prediction using neural network is done in [30].They develop a prediction mechanism for sensor enabled cars using regression tree, neural network, and support vector regression.Their analysis is based on calculating the occupancy rate of a parking, which is the ratio of the number of slots occupied by the number of slots which are operational.
Unlike the success of Markov chain analysis in different prediction applications, a limited number of researches are reported which use Markov chain for parking availability prediction.Queuing theory and continuous Markov chain are used in [31] to predict the parking availability before the arrival of the driver.However, they did not propose a way of applying the method for different situations or times where the demand fluctuates.Reference [32] used a continuous time Markov chain to predict the available parking spaces through communication between the parking garage and the navigation system of the cars.The demand for parking depends on different issues including time of the day and day of the week.Hence, the discussions and models used are not considering these issues.Furthermore, a system which adapts with the change in the environment has not been explored, which is one of the contributions of this paper.

Smart Opportunistic
Parking Service: Overview The opportunistic parking service we propose is based on the notion of spatial services we developed in previous works, as will be discussed below.The systems are composed of several agent-based entities, geographically distributed across the city, each with their local perception and learning and predicting capabilities, exploiting their own locally available data.They work in a decentralised manner and their functionality is the result of the collective interactions among multiple agent-based entities, possibly spatially (geographically) distributed across several stationary or mobile nodes [33].
In our case, each parking lot agent interacts with its neighboring parking lot agents or any other connected agentbased objects, propagating away information about itself (i.e., its predictions) or gathering information about other parking lots (e.g., using spreading or gossip mechanisms) or any traffic or road network disturbance in the traffic or route network.

Smart Parking Service.
To illustrate our discussion, we consider a smart parking service guiding drivers across the city towards a parking lot close to their destination.It takes into account parking spaces availability as well as any unforeseen circumstance (road works, accident) blocking the access and preventing the use of a predetermined route or predetermined parking lot.The place in question will be connected to the system and injects data in the system (e.g., hole in the ground, closed path).The smart parking service aggregates data spatially and delivers the information to the driver.
Figure 1(a) shows the case of a parking service in the area of Balexert (the biggest shopping mall of the French speaking area of Switzerland) in Geneva.The Balexert shopping mall has 3 parking spaces (https://www.balexert.ch/parkings/,https://www.geneve-parking.ch/fr/parkings/pr-balexert):1 occupies the whole first basement of the shopping mall and 2 occupies the same space at the second basement both with two other entrances, and 3 is outside with 4 levels.1, 2, and 3 have capacities of 925, 890, and 348 parking places, respectively.The parking service we envision is composed of different parts.

Parking Lot: Learning and Prediction of Availability.
Each parking lot (e.g., public garages, park and ride, airports or trains stations, and street parking areas) predicts, through a permanent learning activity, its availability patterns for each time-period of the day, for each day of the week.This learning phase brings in and adapts to three aspects: (a) learning of on-going availability based on actual occupancy of parking places; (b) adaptation to seasonal changes (e.g., school holidays period or developments taking place in the area); (c) adaptation to sudden changes in availability due to weather changes (e.g., snow falling, heat wave); (d) foreseen changes (e.g., conference with 5000 participants).

Propagation of Driver Query and Parking Space Prediction.
A driver queries for a suitable parking lot, specifying the likely arrival time in the area (e.g., in 5 mins or 40 mins).Connected urban furniture (e.g., lamp posts, traffic lights) propagates the driver query across the different connected objects in the environment, using a gradient or spreading spatial service.Objects sensitive to the query (i.e., those matching with parking availability requests, in our case devices linked to 1, 2, and 3 entrances) inject in the system their predicted availability corresponding to the time the driver will arrive in the area (e.g., availability in the next 15 mins).Figure 1(b) shows the propagation of a driver query across connected urban furniture.
Figure 1(c) shows how predicted availability of a given parking lot propagates across different connected objects, reaching along the way the other parking lots, as well as the driver itself.At the different parking lots, data aggregates to provide parking space availability over the whole Balexert area.To do so, the different nodes involved send the answer to the driver.This information evaporates and spontaneously disappears from the involved computation nodes after a while depending on user profile and length of route.connected objects, eventually reaching the driver car.The driver's car matches the answer to the query it injected.The corresponding agent then informs the driver and a route is calculated.Figure 1(d) shows the case where 3 provides the closest availability for our driver.It is interesting to note that the system works independently of the actual objects along the route or whether or not they move.

Spatial Service Announcing Unforeseen Events or
Changes in Network. Figure 2(a) shows further interactions involving closed roads or unexpected events.A new connected object (red node) spreads information about road works and informs about a closed path.This information spreads around using the gossip spatial service (interacting nodes share their respective information and update their local information accordingly).If other such objects would convey information about the state of the routes, that information would be aggregated as they reach the different intermediary nodes.Finally, in Figure 2(b), the driver agent eventually receives both parking availability predictions and closed path information and is able to calculate a new route (e.g., to reach 2 from the open road section).

Parking Availability Prediction
A Markov chain or Markov model consists of countable family of random variables,     also called states, that satisfies the Markov property.That is, the probability of the next state depends only on the current state but not on previous states.The collection of these probabilities of transition from one state to another can be represented in a matrix form, called transition matrix, where the rows represent current state and the columns represent the next state.

Properties of Parking
Demand.Since a single transition pattern is not valid all the time and parking demand depends on different conditions, a homogenous Markov chain is not suitable for predicting parking place availability.Parking demand depends on the day of the week and the time of the day.The demand of parking place, and consequently availability of parking place, may vary on week days and weekends.Furthermore, in considering a specific day of the week, the demand varies through time.For instance, according to city of Portsmouth transportation report in 2012 [34], the demand in the city increases around midday (12 pm) and evening (8 pm) on working days and in the evening (6-8 pm) on weekends.This is similar to what we observed with the Balexert shopping mall.Similarly, the demand is seasonal.That is, the parking availability changes based on the season or period of the year.If it is a holiday season the demand near a recreation center increases whereas the demand around work places will more likely decrease [35].Weather can be another factor which the parking demand depends on.Furthermore, the development of the neighborhood (e.g., construction of a new or the closure of an old parking place) and relocation of people in the neighborhood affect the parking demand.
In addition to those mentioned, other short term circumstances can affect the demand.These can be categorized into two categories as foreseen and unforeseen circumstances.Foreseen circumstances include planned events like international or national conferences, meetings, and similar events.The information regarding the number of participants is known or can be estimated, which again gives sufficient information to estimate the additional increase in the parking demand.On the other hand due to different unexpected circumstances, unforeseen circumstances, the parking demand may also be affected and the availability of parking place can change.In this category we can mention events like international events which come rarely without sufficient information about the additional demand for parking and road block due to different reasons including road works, accidents, and the like.
A reliable prediction system needs to incorporate all these concepts and update itself with the dynamic changes of the environment.A driver at a particular time may want to ask three basic questions: (1) is there available parking place in a particular location?(2) Will there be available parking place soon (when I arrive)?(3) What about other parking places near the place of interest?The first question is a direct question and can easily be answered by counting the actual available places.The second question needs a prediction approach based on current state of parking availability for a particular parking garage.The third question can be solved by communicating with other parking garages in the neighborhood and providing the requested information to the user.

Parking Availability Prediction
Setup.The probability of changing states depends on the demand for parking.Hence, the prediction model is a function of the season, the day of the week, the time of the day, and the weather condition.There are as many matrices as different combinations of days, time, season, and weather.
The following three steps are used to develop a Markov chain model.
Discretizing Time.For a given day, the time horizon needs to be discretized to accommodate the change on the demand through different times of the day.Let Δ be the time width used for this purpose.That means a given parking demand situation will be represented by a given transition matrix for Δ duration of time and replaced by another.Some researchers used five minutes of time width [27].The smaller the time window the better the prediction results, however an increase in complexity.
State Characterization.One possible way of state characterization is using the exact number of available parking slots.However, it increases the complexity especially in cases where there are hundreds of parking spaces.Therefore, another possible way to overcome this limitation, is to determine different classes of parking space availability and classify the situation.One possible way is based on percentage of available parking space; for example, more than 40% available parking places result in no traffic congestion, then one class or state can be more than 40% parking places available, and the rest of the states can be 0%, from 0% to 20%, and so on available parking places.Suppose, in general we have  states, say  1 ,  2 , . . .,   .
Transition Matrix Construction.Once the time width and the states are defined, the transition matrix needs to be constructed for each time duration of interest.It is constructed using previous experience (i.e., collected data) and expected knowledge of the situation when data is not sufficient.Consider current time is in the duration [  ,  +1 ).Let us call the state at   an entering state and at  +1 a leaving state.From the previous same time of similar days (i.e., similar refers to the same season, the same day of the week, and the same weather condition) a data will be summarized based on the available parking slots at times   and  +1 .Data is summarized in a matrix form with entries   () , representing the number of times the state changes from  to  in the given interval (i.e., at time  the state is  and at time +1 the state is ).There could be cases in which one of the states never occurs in the data of the initial states.In such cases the initial data can be generated using previous experience and rule of thumb and through nonconventional data collections [36] from users (i.e., drivers who regularly use the parking lots are asked regarding the parking situation for the particular scenario of interest).It will later update itself and evolve based on the initial values and learning from experience.Hence, in the constructed matrix  () , each row and column represent the states where the entries   () represent the number of times the state changes from state  to state  in the given time interval.This matrix will be normalized row-wise (i.e., the summation of entries in each row will be 1 and each entry is nonnegative, to construct the final transition matrix, ).

Learning Mechanism.
Since the model can be affected by gradual and long-term changes like relocation of people, a learning mechanism needs to be used.That is, the system needs to be adaptive by incorporating the newly read data.That can be done by adding additional data to reconstruct or update the transition matrix.One of the possible ways to do that is to record previous data and replace old data by a new one in each iteration.However, saving all previous data used to construct the transition matrix is memory expensive.Hence, based on a parameter called the learning window, the new information can be magnified over the rest.Suppose  is the learning window and the current state is ; then the learning is done by multiplying the th row by , adding 1 to the entry corresponding to the leaving state, and normalizing the row by dividing each entry by  + 1.The resulting matrix will be the new transition matrix.
The degree of learning depends on the parameter .If  is set to be large, it means the updating is highly affected by old and outdated data and the new entry will have a small or negligible effect, producing slow learning.On the other hand if it is set to be very small, it means it will highly be affected by current conditions.However, different changes can happen due to different nonrepeating reasons and the learning to be affected in a higher degree for such changes may produce unreliable results.However, if proper tuning of this learning window is set, the matrix will adapt itself easily to long-term changes.
In the other case, if there is a nonrepeating demand fluctuation which is planned ahead, like organized conferences or meetings, a user modification needs to be involved to update the transition matrix accordingly.This also includes accidents and unplanned big events.In such cases as user feed inputs will be used for the prediction or warning information system needs to be set up.

Parking Availability
Prediction.Suppose at   the state is ; then the probability of the next state at  +Δ to be  is   .For simplicity let us represent Δ by a unit; hence  +Δ =  +1 and  +Δ =  + for any . with the highest probability   shows that state  has the highest probability to be the next state.If we are interested to make a prediction not at  +1 but at  + , then the transition matrices will be multiplied consecutively from   up to  + to produce a single matrix predicting the next state at  + .However, if the current state is known, rather than multiplying the whole matrix it will be easier and more efficient to multiply the corresponding row of the current transition matrix by the next matrix and continue like that.That is, if the current state is known and is, say, , then the probability of the occurrence of the other states after  time duration can be computed simply by multiplying the th row vector of the current transition matrix by the next transition matrix which will produce a row vector and multiply that by the next transition matrix and so on.The resulting vector of probabilities tells us the probability of the state after the  time intervals.

Cooperation of Prediction Agents.
A user requesting the prediction on the availability of parking in a given parking place or garage may be informed that the place is likely to be full in the next couple of time intervals.In this case, a driver may be interested to know the situation in the neighboring parking places.Hence, the parking places communicate with each other to produce the necessary information.
A parking place is powered with an autonomous agent that controls its information, collects new information, updates its matrix, sends predictions, and interacts whenever necessary with other agents in its neighborhood.A neighborhood for a given parking garage is a set of other parking garages where it can send and receive information.Suppose  is the distance a driver can compromise to park away from the place of interest.Hence, the agent communicates with other agents which are at most  distance from itself, provided there are no other constraints that prevent the driver to park there.Agents communicate with other agents and produce a cumulative prediction regarding parking availability situation in its neighborhood.Suppose there are  − 1 agents, say  2 ,  3 , . . .,   , in the neighborhood of agent  1 , and the parking availability in each of these agents is  1 ,  2 , . . .,   at a given time.Suppose  1 is the place of interest of the driver.When a request by agent  1 is sent to collect information to produce a cumulative prediction, each of the other agents will send the row of their transition matrix corresponding to their state prediction in the requested time; that is, an agent   will send   (: This row vector gives the probability of occurrence of each of the states from the current state   .This means the nonoccurrence can be given by   () = 1 −   (:).Hence, there will be  nonoccurrence vectors, say   (1),   (2), . . .,   ().The nonoccurrence cumulative vector can be computed by applying an entry-wise multiplication of these vectors, resulting in a vector, say   .Hence, the cumulative prediction vector will be the normalized vector of  = 1 −   .
It should be noted that, in some cases, the states in one parking garage may not be the same with the other.For example, in one of the parking spaces there could be a total of 100 parking places and 500 in the other.If a percentage representation is used in the state construction stage, state  will have different parking capacity in the two parking garages.This problem can be dealt with in the state construction step by having similar states for all parking places and assigning zero probabilities for nonexisting states in some of the parking places.
Figure 3 shows a communication scenario where a user is situated at the black cross point requesting the status of parking places around the red parking place.The red parking place communicates with the neighboring blue parking places, computes the cumulative prediction, and communicates back with the user.

A Numerical Example.
To demonstrate the approach proposed, consider a scenario with two parking places, namely, parking places  and .Suppose the there are three defined states,  1 ,  2 , and  3 , where   represents a parking situation where the number of available parking spaces is between (( − 1)/3)100% and (/3)100%.At  =  0 when the state is  1 the number of times it changes to  1 ,  2 , and  3 based on the fifty data items collected is 40, 10, and 0 times, respectively.Similarly if the initial state (the state at  0 ) is  2 , it is 10, 25, and 15, respectively, and if it is  3 , 0, 15, and 35, respectively.Hence, the data can be summarized as follows: ) . ( Similarly, suppose the data for the second parking place is given as follows: ) . ( After normalizing, the final transition matrices for the two parking place can be given as follows: ) . ( The prediction at  1 ,  2 .and  3 can be done by using  ( 0 )  ,  ( 0 )   ( 1 )  , and  ( 0 )   ( 1 )   ( 2 )  , using matrix multiplication as given below: ) . ( Based on the initial state a prediction can then be made.For example if the state at  0 in parking  is  3 then there is a high probability that the state at  1 ,  2 , and  3 is  3 ,  2 , and  1 , respectively.As mentioned earlier, it is worth noting that if the initial state is known, rather than multiplying the whole matrix, the corresponding row vector to the current state can be used to multiply the matrices in the next time stamp to do the prediction.
In addition to a prediction by one of the parking places, consider the initial state of the parking place  is  3 and for parking place  is  2 .By the end of the third time interval, that is, at  =  3 , the prediction by parking places  and  is given by   = [0.6 0.36 0.04] and   = [0.9280.072 0], respectively.The nonoccurrence vectors will be

Data Set.
As discussed in Section 3.2, Balexert shopping mall has three parking places labeled as 1, 2, and 3.Data was collected between 19 December 2016 and 9 January 2017 on Monday mornings.However, since the data was not complete a linear interpolation method is used to compute the missing data, as given in Table 1.

Time Discretization and Simulation of Parking Occupancy.
Time is discretized based on a time width of 5 minutes, as done by [27], with  0 = 7h55, a data span for one hour, and a final time at  12 = 8h55.
The states are constructed based on the percentage of available parking.We then have six states as shown in Table 2.
The data only tells that there is a high probability of moving from  6 to itself in the first four time intervals.In the collected data, the initial state is state 6.Hence, to construct the complete transition matrix addition data or information where the starting state is different from 6 is needed.Based on informal data collection gathered from enquiries with some drivers as well as parking management personnel, the pattern of arrival of cars does not depend on the availability of parking or the initial state.Hence, final transition matrices are given below, for the first four time intervals and the fifth time interval in (7) and for the next six intervals and for the last time interval in (8).

Prediction Results of a Single Agent.
To run the simulation, simulation parameters need to be set, including algorithm parameter.Hence, the learning window  is set to be 100.Big number of algorithm runs gives reliable results and hence the algorithm runs for 500 iterations with initial random state.In order to check the performance of the simulation, the arrival of cars or parking demand is also randomly generated based on the transition matrix.It is done by using a normal distribution where the entries of the states with high probability in the transition matrix will have high probability of occurrence.We tested three types of performance: consecutive prediction (the performance on consecutive time), prediction ahead, (the performance in the future predictions, not in consecutive time), and learning property (performance by injecting a demand change and simulating long-term changes).
Consecutive Predictions.Based on the transition matrix of the corresponding states, normal distribution is used to generate the number of cars arriving to the parking place.Based on that the prediction error is computed.Figure 4 shows the percentage of correctness of the prediction.It is computed based on the eleven predictions done in a day for the 500 days.
For each of the runs with different initial state, the prediction becomes stable in final iterations.The error of the simulation results within every 50 iterations is given in Figure 5.As expected, we observe better results when the initial state is in line with data used for building the matrix (i.e., State 6).
Prediction Ahead.Based on each initial state, the prediction is done at the end of all of the time intervals.The accuracy of the prediction is then compared with the actual situation (i.e., based on random car arrivals from a normal distribution as discussed) until the last time interval (as shown in Figure 6).Due to consecutive matrix multiplications, errors accumulate along the computation, and results tend to be less accurate than for the case of consecutive predictions.Again, the case of 6 as initial state provides better predictions.
Adaptation to Long-Term Changes.The learning mechanism plays a role in adapting to long-term changes.We tested a scenario where the demand for parking occupancy increases after 200 iterations (i.e., 200 days) by about 100 more parking demands.We use the same initial transition matrix for prediction.We simulate a parking occupancy similar to the previous case up to 200 iterations and then added an increase of 100 in the parking demand.The approach runs for 1000 iterations and results are provided in Figure 7.
We observe a loss in the accuracy of predictions when a new data is added (iteration 200), followed by an adaptation, and a success rate of the prediction returned to the top around iteration 400.The learning window  is 100, we observe that, after 200 iterations, the system has finished adapting to the new conditions.

Smart Parking Service
5.4.1.Data Set.As presented in Figure 8, there are three parking places in Balexert.Suppose the place of interest for a driver is parking 2.Let the neighborhood radius  be as given in Figure 8.
The agent in parking 2 communicates with the agent in parking 1, which is in its neighborhood (radius area including both 1 and 2).The total number of parking places under consideration in 1 is 925.Table 3 provides the data for parking place 1.

Simulation and Evaluation.
One of the steps after discretizing the time is to define the states.Note that the states in the two parking places need to be the same.Since the number of parking places in 1 and 2 differs only by 35 slots, let 6 be the number of available parking places more than 713.This makes the states used for both parking places be the same.The transition matrix for 1 at time interval ,  () is the same with  (1) (used for 2), for all  except the last matrix  (12) .For  (12) , it is equal to the fifth interval matrix of 2, that is,  (5) of 2.
Based on the collected data at 7h55 of the day, the parking places will be in state 6.When a driver sends a request to 2 where the center of interest is located, agent at 2 will request information on parking places availability prediction to other parking places in its neighborhood with radius  (i.e., to 1).Since the agents are predicting the situation by the end of the first interval or the beginning of the second interval their first matrix will be used.That is, in both cases, row (0, 0, 0, 0.05, 0.15, 0.8) corresponding to state 6 of  (1) will be used.The agent then compute the nonoccurrence of the row given; that is,   (1) =   (2) = 1− = (1, 1, 1, 0.95, 0.85, 0.2).The nonoccurrence cumulative vector is computed applying an entry-wise multiplication, producing   = (1, 1, 1, 0.9025, 0.7225, 0.04).Finally, the normalized cumulative prediction vector  = 1 −   = (0, 0, 0, 0.0730, 0.2079, 0.7191).Therefore, the prediction for     the neighborhood parking availability at 8h00 is 6 with highest probability of 0.7191.Suppose the prediction is needed at 8h05.In that case the agent at 2 will request the agent at 1 its prediction at 8h05.It also computed its own prediction; its prediction will be the row vector of the current matrix,  (1) multiplied by  (2) .The nonoccurrence vector for both agents will then be 1 − (0, 0, 0.0150, 0.0825, 0.1775, 0.7400) = (1, 1, 0.9850, 0.9175, 0.8225, 0.2600).The product of these nonoccurrence vectors will be (1, 1, 0.9702, 0.8418, 0.6765, 0.0676).Hence the cumulative prediction will be (0, 0, 0.0206, 0.1096, 0.2241, 0.6458).Suppose a driver, who is 30 minutes away from the target parking place (2), requests parking availability information at the current time; let it be 7h55.The prediction vector 30 mins ahead, calculated by the agent in 1, will be (0.0009, 0.0082, 0.0478, 0.1293, 0.1996, 0.7029).

Results
. With similar argument, Table 4 presents the prediction for the neighborhood parking availability around 2.The table is computed with the same initial state for both 1 and 2.
Note that even though Table 4 shows both parking places starting with the same states, they can possibly start with different states.For example, parking place 1 starts with 1 and 2 with 2; the resulting prediction for the given time interval from 8h00 to 8h55 will then be 1, 3, 4, 6, 6, 6, 6, 6, 6, 6, 6, and 5.
We performed a simulation generating random initial states for the two agents.Different scenarios can be recorded.For example, the predicted states for the first and the second agent can be  1 and  2 , and the combined prediction can be .To evaluate the simulation result we define the success of a prediction.Since the parking availability increases with the state number, we consider that a cumulative prediction of state  is better than individual predictions by the agents, say  1 and  2 , if either of these predictions is greater than or equal to , that is,  1 ≥  or  2 ≥ .Based on random initial states, a prediction is performed for 500 iterations; in each iteration, the prediction for all the time interval is compared against the demand which is randomly generated based on the transition matrix.Hence, in each iteration there will be 13 predictions and their accuracy is checked if it agrees with random demand.The result as presented in Figure 9 is promising with high success rate.

Discussion and Conclusion
6.1.Summary.An agent-based service combined with a learning and prediction system, as a solution to ease parking place search and thus relieve traffic congestion, is proposed.Agents predict the parking availability in a given parking garage and communicate with other agents to produce a cumulative prediction.Each agent uses a time varying Markov chain to predict parking availability of an individual parking garage based on actual situation using a transition matrix constructed from previous data.Transition matrices are constructed for each time interval, for each weekday, season, and weather condition, based on previous experience and gathered information.Transition matrices vary through time to represent long-term changes in demand and thus adapt with changes in the neighborhood.A multi-agentbased spatial service collects and propagates queries and predictions in the whole neighborhood.We evaluated our approach on the parking garages of the Balexert shopping mall in Geneva, Switzerland.Preliminary data was collected, which we synthesized based on the observed pattern of data.We conducted four types of simulations.The first predicts the consecutive state based on the actual state.With an average initial prediction accuracy of about 83% it gradually increases while learning and adapting the matrix.The second concerns prediction beyond the consecutive time.In this case, predictions starting from about 34% of accuracy on average at the beginning improve gradually.The third case illustrates long-term changes in the demand occurring in the neighborhood.In this case also, the prediction adapts to the change and returns to accurate predictions again.The last simulation considers multiple agents and predicts the parking space availability in the neighborhood (in total).Given the limited set of data at our disposal, which results in a limitedly accurate transition matrix, simulations show that the matrix gradually evolves and gives high quality prediction.Different parking space categorization can also be studied.Parking spaces are designed and reserved for a group of people like disabled, high-level management personnel, or for specific cars (e.g., electric cars).
The time window and the time width are made fixed, in this paper.It is worth exploring the effect of these parameters on the speed of learning and the quality of prediction.
External learning mechanism for short duration nonrepeating changes is not explored.Future issues can consider possible ways of external learning, identifying parameters, their values, and their effect on predictions.
Integrating the proposed model with an online service like smart phone applications can also be another interesting research issue to explore.Possibly a parallel computing approach in computing cumulative predictions where there are a huge number of parking places and demands can be studied to deal with possible increase in computational time.
The work performed in this paper for parking places availability shares many similarities with public transport prediction of occupancy.Indeed, occupancy depends on days, time, season, and weather and is similarly affected on the long-term by new constructions, or new public transport routes.Translating this work on public transport may be worth exploring.
An additional venue for future works involves actual simulations and visualisation of spatial services propagation.A prototyping tool supporting vehicles simulations and actual agents code is already available for such studies [37].

Figure 2 :
Figure2: Overview of the intelligent parking space system.The red dotted arrows are the road closed (gossip) just like the solid red lines (it is broken to show that there could be multiple agents in the process); filled blue circles are parking places; and the grey circles are agents.

Figure 3 :
Figure 3: A communication scenario between three parking places represented by  and a user represented by a star.The red circle is the place of interest for the user whereas the yellow rectangles are the parking in the neighborhood where the user needs to get information from.

Figure 4 :
Figure 4: Simulation results for different initial states.

S 1
as initial state S 2 as initial state S 3 as initial state S 4 as initial state S 5 as initial state S 6 as initial state

Figure 5 :Figure 6 :
Figure 5: Error in iterations bundled in 50 for different runs with different initial states.

Figure 7 :Figure 8 :
Figure 7: Simulation result on the learning of the approach with increased demand.

Figure 9 :
Figure 9: Agent-based prediction performance of the parking places.

Table 1 :
Collected and synthesized data for 2 of Balexert parking with average number of available parking spaces.

Table 2 :
States from the data set.

Table 3 :
Data for 1 of Balexert parking with average number of available parking spaces.

Table 4 :
Neighborhood prediction.The 1st column indicates the initial states for 1 and P2.Future Works.This paper does not consider the cost of parking.One possible research issue for future work involves designing a decision aiding tool for minimizing the cost based on the prediction of parking space availability.