# A Trip Purpose Inference Method Considering the Origin and Destination of Shared Bicycles
###### Abstract
[PERSON] [21] and colleagues discovered that the bike selection behavior of riders in travel activities exhibits a robust Zipf law. This effect can also better predict bike usage, optimize the rebalancing operations of dockless bike-sharing systems, ensure a more even distribution of bikes, and thereby save resources. Research on inferring bike-sharing travel purposes primarily focuses on modifying existing models: [PERSON] [22] and colleagues analyzed bike-sharing travel purposes using historical data and other data sources, applying appropriate statistical methods and geographic techniques; [PERSON] [23]. and others, inspired by dynamic rebalancing technology in car-sharing systems, established a mathematical planning model with the goal of reducing bike-sharing redistribution costs for operators, considering vehicle distribution, scheduling patterns, and start times in the rebalancing process, and validated the scheme using a simulation system; [PERSON] [24] and colleagues designed a dynamic bike-sharing rebalancing system based on a data-driven approach, generating optimal vehicle scheduling plans through intelligent algorithms; [PERSON] [25] and colleagues proposed a multi-commodity spatio-temporal network model to describe the dynamic rebalancing problem, transforming nonlinear constraints in the model into equivalent mixed-integer constraints to simplify problem-solving; [PERSON] [26] developed a dynamic repositioning strategy based on station characteristics and demand patterns to address service quality decline due to uneven demand between stations; [PERSON] [27] and others adopted the DRM model, considering both the arrival time and the disembarking location of bike-sharing to effectively identify the travel purposes of bike trajectories; and [PERSON] [27; 28] and others used bike-sharing data and POI data, applying the K-means++ clustering method to study bike-sharing travel patterns and purposes, inferring the purposes for five categories: dining, transportation, shopping, work, and residential places, and proposed suggestions for the operation strategy of the bike-sharing system. Despite the progress in using bike-sharing data to infer travel purposes and activity modes, existing models have the following limitations:  
(1) Current models do not sufficiently account for temporal variations, typically adopting a generalized approach to time periods without considering how these variations affect bike-sharing usage patterns. (2) Studies often focus solely on environmental factors at the trip's endpoint, neglecting the journey's start. For instance, if a cyclist starts near a supermarket but ends the ride at another, the travel purpose, if judged only by the endpoint, might be incorrectly categorized as shopping, even if the true intent was different. This approach may overlook essential nuances of the trip. To address these issues, this paper presents a case study in Shanghai, analyzing environmental factors at both the start and end of trips. It utilizes citywide point of interest (POI) data, applies the law of large numbers for frequency stability, and employs empirical distribution fitting methods to refine the classification of time factors and enhance the gravity model parameters. This approach improves the accuracy of inferring travel purposes. The remainder of this paper is organized as follows:  
(1) Theoretical Foundations and Model Basis: This section introduces the gravity model as the core theoretical basis, outlining its interdisciplinary applications and historical significance. The discussion emphasizes modifications tailored to addressing the challenges of travel purpose inference, providing the foundation for the development of the GMOD model. (2) Methodology and Model Framework: The GMOD (gravity model considering origin and destination) framework is detailed in this section, incorporating shared bicycle data and POI data. The integration of temporal and spatial factors is described alongside the novel application of Bayesian probability to refine the accuracy of trip purpose inference.