  The analysis and characterization of human mobility using population-level
mobility models is important for numerous applications, ranging from the
estimation of commuter flows in cities to modeling trade flows between
countries. However, almost all of these applications have focused on large
spatial scales, which typically range between intra-city scales to
inter-country scales. In this paper, we investigate population-level human
mobility models on a much smaller spatial scale by using them to estimate
customer mobility flow between supermarket zones. We use anonymized, ordered
customer-basket data to infer empirical mobility flow in supermarkets, and we
apply variants of the gravity and intervening-opportunities models to fit this
mobility flow and estimate the flow on unseen data. We find that a
doubly-constrained gravity model and an extended radiation model (which is a
type of intervening-opportunities model) can successfully estimate 65--70\% of
the flow inside supermarkets. Using a gravity model as a case study, we then
investigate how to reduce congestion in supermarkets using mobility models. We
model each supermarket zone as a queue, and we use a gravity model to identify
store layouts with low congestion, which we measure either by the maximum
number of visits to a zone or by the total mean queue size. We then use a
simulated-annealing algorithm to find store layouts with lower congestion than
a supermarket's original layout. In these optimized store layouts, we find that
popular zones are often in the perimeter of a store. Our research gives insight
both into how customers move in supermarkets and into how retailers can arrange
stores to reduce congestion. It also provides a case study of human mobility on
small spatial scales.
