# A Trip Purpose Inference Method Considering the Origin and Destination of Shared Bicycles
## 5 Travel Purpose Inference Model Construction  
### Model Construction Process  
Li [27] developed three enhanced models based on the basic gravity model, integrating POI data, AOI data (describing the scale and spatial distribution of points of interest), and dockless bike-sharing data. These models improve the inference of trip purposes by incorporating factors such as distance, environmental characteristics, activity type proportions, and time. Additionally, AOI data were introduced to account for the service capacity of POIs, further refining the models' accuracy. These iterative improvements demonstrate the adaptability of the basic gravity model when combined with multi-source data, significantly enhancing its effectiveness in inferring travel purposes and offering valuable support for research in this field. (1) An improved model considering distance, time, and environment, as shown in Equation (1), is detailed as follows:  
\[G(D,P,t)=\frac{number(POI.category=P.category)}{d(D,P)^{2}}*W\big{(}t_{P.category} \big{)},P\in D.POIList\text{ and }POI\in D.POIList \tag{1}\]  
(2) An improved model that takes into account the proportions of distance, time, environment, and type of activity is shown in Equation (2). \[G(D,P,t)=\frac{C(activity_{i}=P.activity)}{d(D,P)^{2}}*W\big{(}t_{P.category} \big{)},P\in D.POIList \tag{2}\]  
(3) An improved model considering distance, time, environment, activity type ratio, and POI service ability (AOI) is shown in Equations (3) and (4). \[G(D,P,t)=\frac{SC_{P.type}C(activity_{i}=P.activity)}{d(D,P)^{2}}*W\big{(}T_{P. category}\big{)},P\in D.POIList \tag{3}\]  
\[SC_{P.type}=\frac{SC^{\prime}_{P.type}-Min\Big{(}SC^{\prime}_{P.type}\Big{)}}{ Max\Big{(}SC^{\prime}_{P.type}\Big{)}-Min\Big{(}SC^{\prime}_{P.type}\Big{)}} \tag{4}\]  
The interpretation of parameters in the three aforementioned equations is not the focus of this paper and will not be detailed here; for further information, refer to the literature [27]. As specific Area of Interest (AOI) data for the study area were not available, this research utilized Equations (1) and (2) (hereinafter referred to as basic gravity model 1 and basic gravity model 2), which facilitates better comparison with the GMOD model. (1) Basic gravity model 1 considers distance, environment, and activity type scaling, as shown in Equation (5). \[G(D,P_{D,i})=\frac{C_{D,i}}{d(D,P_{D,i})^{2}}\alpha,P_{D,i}\in poilst_{D},i\in( 1,2,\cdots,9) \tag{5}\]  
where \(\mathrm{G(D,P_{D,i})}\) refers to Table 4, which details the specific gravitational value, denoted as \(\mathrm{P_{D,i}}\), of a certain type of mapping category at the destination. D represents the endpoint of the shared bicycle journey; \(\mathrm{P_{D,i}}\) indicates the POI candidate point for category i in the endpoint destination area; \(\mathrm{C_{D,i}}\) signifies the proportion of the frequency density of category i POIs in the endpoint candidate area relative to the frequency density of all POIs in that area, normalized as specified by Equations (6) and (7); \(\mathrm{d(D,P_{D,i})}\) denotes the trafficimpedance, measured as Euclidean distance; \(\rm{poilist_{D}}\) represents the candidate list of POIs in the endpoint destination region [32,33]. \[C_{D,\,i}=\frac{F_{i}}{\sum^{i=1}F_{i}}\times 100\%,i\in(1,2,\cdots,n),n\in[1,9] \tag{6}\]  
\[F_{i}=\frac{n_{i}}{N_{i}},i\in(1,2,\cdots,9) \tag{7}\]  
\(\rm{F_{i}}\) denotes the frequency density of type i POIs relative to the total number of such POIs; \(\rm{n_{i}}\) signifies the number of POIs of activity type i in the candidate destination area; and \(\rm{N_{i}}\) represents the total number of POIs of activity type i in the study area. (2) Basic gravity model 2, considering distance, environment, proportion of activity type, and time factor, is shown in Equation (8).