{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW2 - showed above Similarly is the actual attraction and...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1. Calculate the trip distribution trip table. The function of gravity model is: Therefore, From this we can get that: (1.3) depends on which can get the following equation: (1.4) We can see that both and are interdependent. Therefore, there is some iteration procedure similar to that of Furness method which can be showed as follows: (1) Set , find using equation (1.4) (2) Find using equation (1.3) (3) Update in equation (1.4) to get . Repeat this until reaching the convergence. (4) Compute the error: , which corresponds to the actual productions and is the calculated productions from the computation
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: showed above. Similarly is the actual attraction and is the calculated attraction. If both is less than 0.1, stop the iteration. Use Matlab to get the final calculated trip table. TT=xlsread( 'TravelTimes.csv' ); PA=xlsread( 'ProdAttr.csv' ); O=PA(:,1)'; D=PA(:,2)'; C=exp(-0.2*TT); B=ones(1,104); while 1 A=1./(B.*D*C'); B=1./(A.*O*C); Om=A.*O.*(B.*D*C'); Dm=B.*D.*(A.*O*C); Oc=max(abs(Om-O)); Dc=max(abs(Dm-D)); if (Oc<0.1 & Dc<0.1) break ; end end T=(A'.*O')*(B.*D).*C; csvwrite( 'Trips.csv' ,T); The trip distribution table is saved in Trips.csv. 2. Plot the impedance function....
View Full Document

{[ snackBarMessage ]}