上游充通大 SHANGHAI JIAO TONG UNIVERSITY 卧h IAO TONG Distribution Analysis of Spring Festival Travel Based on Gravity Model and MCMC Methodology Name Peiyu Jing Xiaoxuan Cheng Student ID:5120109100;5120109103 Advisor Liuqing Xiao School Naval Architecture Ocean Engineering
SHANGHAI JIAO TONG UNIVERSITY Distribution Analysis of Spring Festival Travel Based on Gravity Model and MCMC Methodology Name : Peiyu Jing ; Xiaoxuan Cheng Student ID : 5120109100 ; 5120109103 Advisor : Liuqing Xiao School : Naval Architecture & Ocean Engineering
Distribution Analysis of Spring Festival Travel Based on Gravity Model and MCMC Methodology ABSTRACT Spring Festival travel,the largest national transportation activity in China,has reached its summit in the number of man-time transmitted during 2014 Lunar Chinese New Year.With the application of"Baidu Migration",a Location-Based Social Networking backed by Baidu Positioning,we were enabled to analyze certain numerical features of the traffic flows,which were utilized in this paper to establish an origin/destination matrix by unit of city.We selected Beijing,Shanghai,and Guangzhou as cells in the matrix and regarded positioning data collected as traffic volumes between locations.Three forms of gravity model (i.e.,basic gravity model,modified gravity model,and doubly restrained gravity model)were discussed respectively to develop the matrices.To calibrate the coefficients,we used the least square method(LSM)and trial method.We finally generated O/D prediction matrices with three different models but statistical tests invalidated the basic gravity model for this application. Further,with hypothetical data,we proposed possible usage of Markov Chain Monte Carlo (MCMC)methodology for predicting trip attractions to the three cities.These attempts may well provide valuable transportation information for the coming Spring Festival travel. However,the insufficiency of accessible data could have compromised the accuracy of the analysis,which requires further discussion with the collection of a larger number of traffic data as well as an improved methodology. Key Words:Spring Festival travel;Gravity Model;Origin/Destination Matrix;MCMC methodology 1.INTRODUCTION Spring Festival travel,the largest national transportation activity in China,has reached its summit in the number of man-time transmitted during 2014 Lunar Chinese New Year.In February,2014,China's Development and Reform Commission announced that the total traffic volume was approximately 3.62 billion man-time,which was 0.2 billion more than the number last year.The surprising large-scale migration lasted from January 16th to February 24h.During the forty days,it was estimated that national traffic volume of highway transportation,waterborne transportation,railway transportation,and air transportation was 3.2 billion,0.043 billion,0.2578 billion,and 0.042 billion man-time respectively,all presenting increases in number During 2014 Spring Festival,Baidu publicized a commercial application platform named "Baidu Migration".On the basis of"Baidu Map:Spring Festival Population Migration Big
1 Distribution Analysis of Spring Festival Travel Based on Gravity Model and MCMC Methodology ABSTRACT Spring Festival travel, the largest national transportation activity in China, has reached its summit in the number of man-time transmitted during 2014 Lunar Chinese New Year. With the application of “Baidu Migration”, a Location-Based Social Networking backed by Baidu Positioning, we were enabled to analyze certain numerical features of the traffic flows, which were utilized in this paper to establish an origin/destination matrix by unit of city. We selected Beijing, Shanghai, and Guangzhou as cells in the matrix and regarded positioning data collected as traffic volumes between locations. Three forms of gravity model (i.e., basic gravity model, modified gravity model, and doubly restrained gravity model) were discussed respectively to develop the matrices. To calibrate the coefficients, we used the least square method (LSM) and trial method. We finally generated O/D prediction matrices with three different models but statistical tests invalidated the basic gravity model for this application. Further, with hypothetical data, we proposed possible usage of Markov Chain Monte Carlo (MCMC) methodology for predicting trip attractions to the three cities. These attempts may well provide valuable transportation information for the coming Spring Festival travel. However, the insufficiency of accessible data could have compromised the accuracy of the analysis, which requires further discussion with the collection of a larger number of traffic data as well as an improved methodology. Key Words: Spring Festival travel; Gravity Model; Origin/Destination Matrix; MCMC methodology 1. INTRODUCTION Spring Festival travel, the largest national transportation activity in China, has reached its summit in the number of man-time transmitted during 2014 Lunar Chinese New Year. In February, 2014, China’s Development and Reform Commission announced that the total traffic volume was approximately 3.62 billion man-time, which was 0.2 billion more than the number last year. The surprising large-scale migration lasted from January 16th to February 24th. During the forty days, it was estimated that national traffic volume of highway transportation, waterborne transportation, railway transportation, and air transportation was 3.2 billion, 0.043 billion, 0.2578 billion, and 0.042 billion man-time respectively, all presenting increases in number [1] . During 2014 Spring Festival, Baidu publicized a commercial application platform named “Baidu Migration”. On the basis of “Baidu Map: Spring Festival Population Migration Big
Attachment Procedure code 1: import math global t#matrix T global c#matrix C global P#P global A#A global T#matrix T globalr #r global sk t-test of T-T' sk=[] =0 c=0 P=0 A=0 T=[0,0,01,0,0,01,0,0,0] i=3 while i:input matrix T al=float(input()) a2=float(input()) a3=float(input()) t.append[al,a2,a3]) i=1 i=3 while i:input matrix C al=float(input()) a2=float(input()) a3=float(input()) c.append([al,a2,a3]) i=1 0 while i<3:get PA P.append(t[i][0]+ti][1]+t[i][2)) A.append(t[o][i]+t[1][i]+t[2]i]) i=计1 deftjianyan():t-test av=0.0 mean value d=0.0#variance =0 whilei<3: j=0 while j<3:
Attachment Procedure code 1: import math global t # matrix T global c # matrix C global P # P global A # A global T # matrix T' globalr # r global sk # t-test of T-T' sk=[] t=[] c=[] P=[] A=[] T=[[0,0,0],[0,0,0],[0,0,0]] i=3 while i: # input matrix T a1=float(input()) a2=float(input()) a3=float(input()) t.append([a1,a2,a3]) i-=1 i=3 while i: # input matrix C a1=float(input()) a2=float(input()) a3=float(input()) c.append([a1,a2,a3]) i-=1 i=0 while i<3: # get P A P.append(t[i][0]+t[i][1]+t[i][2]) A.append(t[0][i]+t[1][i]+t[2][i]) i=i+1 deftjianyan(): # t-test av=0.0 # mean value d=0.0 # variance i=0 whilei<3: j=0 while j<3:
if i=j:except the leading diagonal j+1 continue sk.append(t[i][j]-T[i]j]) av+=t(i](j]-T[i](j] j+=1 i+=1 i=0 av/=6#mean value whilei0.05 Or abs(k][t]-k][(t+1)%2]/k][tt)>0.05: tt=(tt+1)%2 k[[(tt+1)%2]=t[[]*P*A]/cc/k][t] k][(t+1)%2]=t0]*P*A]/cc/k[[(t+1)%2] T[0]=P[*A]*cc/k[[t/k][t] j+=1 i+=1 iftjianyan()-0: return 0
if i==j: # except the leading diagonal j+=1 continue sk.append(t[i][j]-T[i][j]) av+=t[i][j]-T[i][j] j+=1 i+=1 i=0 av/=6 # mean value whilei0.05 or abs((k[j][tt]-k[j][(tt+1)%2])/k[j][tt])>0.05: tt=(tt+1)%2 k[i][(tt+1)%2]=t[i][j]*P[i]*A[j]/cc/k[j][tt] k[j][(tt+1)%2]=t[i][j]*P[i]*A[j]/cc/k[i][(tt+1)%2] T[i][j]=P[i]*A[j]*cc/k[i][tt]/k[j][tt] j+=1 i+=1 iftjianyan()==0: return 0
S=0 ss=0 cc=0 =0 whilei>n=2500000:t0=2000000: P=0.4,0.2,0.4,0.12,0.46,0.42,0.15,0.30,0.551 C=cumsum(P,2); state=ones(1,n); r=unifrnd(0,1,1,n) i0=input('original state:) original state:I >i=i0: for t=l:n j=state(t): while r(t)>C(i,j) j-j+l; end state(t)=j; i end
s=0 ss=0 cc=0 i=0 whilei> n=2500000;t0=2000000; P=[0.4,0.2,0.4;0.12,0.46,0.42;0.15,0.30,0.55]; C=cumsum(P,2); state=ones(1,n); r=unifrnd(0,1,[1,n]); i0=input('original state:'); original state:1 >>i=i0; for t=1:n j=state(t); while r(t)>C(i,j) j=j+1; end state(t)=j; i=j; end