## 2 Materials and Methods
### The Construction Process of ASFC-RA
By splicing the HyperText Transfer Protocol (HTTP), request the Uniform Resource Locator (URL) to receive the data (JavaScript Object Notation(JSON) or Extensible Markup Language(XML) format) returned by the HTTP request, then parse the data, e.g., [[http://restAPI.amap.com/v3/direction/walking?origin=116.45925,39.910031&destination=116.587922,40.081577&output=xml&key=](http://restAPI.amap.com/v3/direction/walking?origin=116.45925,39.910031&destination=116.587922,40.081577&output=xml&key=)]([http://restAPI.amap.com/v3/direction/walking?origin=116.45925,39.910031&destination=116.587922,40.081577&output=xml&key=](http://restAPI.amap.com/v3/direction/walking?origin=116.45925,39.910031&destination=116.587922,40.081577&output=xml&key=))<thekeyofusers>. (4) Dictionary output: Output the number of different types of service facilities in each district. The specific implementation process is the following pseudo-code. ```
Program1:Gaining service facilities of available service facilities capacity of residential areas (ASFC-RA) through Amap route planning API
```
1 Input:the POI service facilities layer of one experimental area is a list of layer_s; the residential areas layer names layer_D Input:the travel time costs threshold identification list is T=[t1,t2,.... tS] Output:a two-dimensional array of different types of service facilities in all the residential areas is named accessArray[D, S] \(D=\) count of residential areas \(S=\) count of service facilities types fors = 0; s < S; s++do
2 Find out the service facilities of corresponding communities in S types of facilities #Get the s service facilities layer deposited in layer_s Forj = 0; j < length(layer_s); j++do
3#Get the long-lat of the service facilities point j and save them into the facility Forl = 0; l < D; i++do
4#Get the longitude and latitude of the community i and store them into the residential area #Request route planning API, return JSON object and store result, the request form is:request.url([[http://restAPI.amap.com/v3/direction/walking?origin=facility.X,#facility.Y&destination=](http://restAPI.amap.com/v3/direction/walking?origin=facility.X,#facility.Y&destination=)]([http://restAPI.amap.com/v3/direction/walking?origin=facility.X,#facility.Y&destination=](http://restAPI.amap.com/v3/direction/walking?origin=facility.X,#facility.Y&destination=)) residentialarea.X,residentialarea.Y&output=json&key=<thekeyofusers>)
5#get the current path planning time in the result and store it into timell iftimel[]<T[s]then## service facilities travel time costs #Update the row i of the accessArray, and the s column object counts, accessArray[i, s]++ return accessArray ```  
Using the program of gaining service facilities of ASFC-RA by Amap route planning API, the number of various service facilities POIs within the travel costs threshold is obtained. The results are listed in Table 11.  
(3) The modified cumulative opportunity measure model  
The accessibility method of various service facilities is mainly measured by the number of service facilities and the variety of service facilities [33]. This paper uses the cumulative opportunity method to estimate the number of different service facilities in different residential areas. The approach to measure the number of various service facilities POIs within the travel costs threshold is intuitive and attractive to reflect the number of service facilities available for a given residential area. \[V_{ASFC-RA}(i,s,t)=\sum_{j}G\big{(}t_{ij}\big{)}\times F_{j} \tag{1}\]  
In Equation (1), \(V_{ASFC-RA}(i,s,d)\) is the accessibility value of a type \(s\) service facility for a residential area \(i\) in a certain travel time costs threshold \(t\). \(G\big{(}t_{ij}\big{)}\) is a binary variable, when \(t_{ij}\) within a certain travel time costs threshold \(t\), it is one; otherwise, it is zero. \(t_{ij}\) is the actual route planning travel time cost between residential area \(i\) and service facility \(j\).