Maximizing car park usage efficiency

I'm trying to create a predictive model for a closed car park. This model is expected to estimate available parking spaces given date and time.

Brief information:

• the car park has a limited capacity
• a driver has to own a monthly subscription
• we overbook by about 10%
• a vehicle identification system exists, giving us an opportunity to use a real-time model
• we don't know "anything" about subscribers (no age/gender/location information)
• (optional) I only have 3 months of data.

I want to notice that I already know how to build a simple model using e.g. LASSO or SVR, I also have a few ideas to use real-time data.

My biggest problem is: how do I use driver-specific data? For instance: let's say someone arrives always about 7AM +/- 10 minutes and spends about 8 hours on car park. We might say that this person's spot will most likely be available for the next 8 hours IF it's not taken until 7:10, right?

How do I build a model on top of such data?

The title says: 'maximizing parking usage efficiency'. Let me explain: I'd like to sell parking space to non-subscribers when they are absent (e.g. at night).

• How would you deal with a subscriber who arrives to find the carpark already filled? May 22 '17 at 13:38
• As far as I know, we pay for an alternative parking spot in the neighbourhood and give some discounts. May 22 '17 at 14:04

This problem seems ideally suited to Bayesian Decision Theory as it is essentially a gambling problem. It is a case where the differences between Frequentist and Bayesian methods are important. Bayesian methods have the statistical property that they are coherent, whereas Frequentist methods are not coherent. A probability is coherent if a bookie, which is what the carpark management is, can state prices for a gamble in such a way that no actor or combination of actors could game the system and cause a sure loss for the bookie.

Indeed, you have a tremendous advantage in that you have three months of customer specific data and you have plenty of modeling power. Bayesian decision theory, in this case, would not be very far from LASSO. The likelihood function might change and the prior might change. Indeed, if they do not, LASSO and Bayesian posterior analysis will provide the same point estimates. Still, you may not want to use those point estimates.

The critical example in Thomas Bayes' An Essay towards solving a Problem in the Doctrine of Chances has been popular lately and provides a reason to go the extra step outside posterior analysis. While Bayes example is a square table, essentially a square billiards table denoted ABCD, we will go into a simplified equivalent to see the difference. Suppose a random number is generated in the open set (0,1) and the value is kept hidden. The hidden value will be denoted $\theta$. You and I play a game where a random number is generated and if the newly generated number is less than $\theta$ then I get one point, otherwise, you get one point. The newly generated numbers are not observed, merely the outcome. The first person to six points wins the game.

I have five points and you have three points, what is the probability that you will win? This, of course, could be "what is the probability that a particular space is occupied?" The standard frequentist estimator is $5/8$ for me and $3/8$ for you. You have to score three points in a row so your chance is $\frac{3}{8}^3$. You have roughly 5.27% chance of winning under Frequentist calculations. The Bayesian calculation is different. You have to set a prior distribution for possible probabilities for $\theta$. Since all are equally likely, $\Pr(\theta)\propto{1}$. The likelihood function, in this case, is $\theta^5(1-\theta)^3$.

This integrates to $$\Pr(\theta=\Theta)=504(1-\theta)^3\theta^5,\forall\theta\in\Theta$$. Leaving a distribution over $\theta$ which is not at all useful if we need a point measurement to place a gamble with, such as a fixed probability of winning. This is where the Bayesian method and the Frequentist method part calculations. I want to consider all possible parameters that could result in five wins for me and three wins for you, in proportion to their actual probability of a value being the true value. Then I want to make a prediction as to what the chances of you winning are, in order to price the gamble. The Bayesian predictive distribution is: $$\int_{\theta\in\Theta}\mathcal{L}(\text{future wins}|\theta)\pi(\theta|\text{historical wins})\mathrm{d}\theta,$$ where $\mathcal{L}$ is the likelihood function and $\pi$ is the posterior probability. In this example the solution would be $$\Pr(\text{3 future wins for you})=\int_0^1[1-\theta]^3\times{504}(1-\theta)^5\theta^3\mathrm{d}\theta=.0909.$$

Which is correct? The Bayesian one is correct. The difference is that one is $(1-E(p))^3$ and the other is $E[(1-p)^3]$. You can test this by simulating millions of parameters and keeping those whose outcome is 5:3 and then generating outcomes if you want to test this by Monte Carlo.

I would construct a simple microeconomic model with a person-specific unknown parameter of being present at time $t_i$ and the constraint that the number of parking spaces being used at any point in time $i$ must be less than or equal to the total spaces with some very high probability of certainty. I would solve the posterior density for each actor and simplify as much as possible. I would create a weak prior that included outside information such as holiday schedules, guesses as to peak vacation season and so forth since you only have three months of data. I would prefer a robust but weak model to a strong model given the amount of time that has been observed. You do not know about the impact of holidays, weekends, vacations, illnesses and business events on parking cycles.

Then I would impose a predictive distribution with a cost function. It would depend upon the cost of the garage for being wrong and putting someone in another person's spot versus the cost of being wrong and having nobody in a spot.

As to my likelihood, it would probably be some form of logistic type function.

This isn't much of an answer; more of a suggestion.

I think your best opportunity to sell a parking space twice comes from the subscribers who come in, stay a long time, leave, then are unlikely to return.

These contrast with the users who come in, stay a while, leave, return, and might do this two or three times a day.

The former users create an opportunity to sell the space again with a low probability that they will return and want their space back. I suggest you focus initially on identifying them individually using the data you have. Bear in mind that even the most regular user will go away for a day occasionally or even two weeks. Users who did this are still regular users if they come in and depart at regular times each day.

First, identify the group of regular users in the first group.

Next, estimate their aggregate occupancy as a group. There might be a calendar pattern to this with some obvious elements, such as day of the week. (You probably can't identify a seasonal pattern yet.) If they regularly leave a given range of spaces empty, 4 to 10 out of 100 users then you can sell some number of those to another user, say 5 would be fairly safe. If you have 1000 spaces you might safely sell a larger number, such as 55, if they regularly leave 40 to 100 empty.

While some descriptive statistics will be useful in deciding how many places to sell a second time, I think some simulation using the numbers you have might also be useful.

This might be particularly useful in deciding at what time of the day to sell another parking place. It might be risky to sell them at 7:30 but quite safe to sell them at 9:30.

You also have the chance to experiment. You can try selling a given number of places and measure how often you have sold too many or how many empty places you have. You could vary the number sold and the time they are sold.

The second group of users seems too variable to give you much confidence that they have supplied you with an empty parking space. They might, in aggregate, give you some measurable number of spaces at specific times and days. I think it makes some sense to estimate them separately. You might not need accurate estimates of the vacant spaces they give you if you use an experimental approach and vary the number of spaces you sell and the times you sell them for a while. As a group they will supply a (highly variable) number of spaces to sell a second time and this is added to the regular supply you estimate that you get from the first group. This will permit you to sell a very few more spaces, experimentally, but you might not know where they are coming from, only that you can safely sell a few more spaces and perhaps later in the day.

• Seems reasonable. I will experiment with these ideas. Thanks for your advice! May 24 '17 at 14:37