This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full 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(OmO)); Dc=max(abs(DmD)); 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
This note was uploaded on 04/05/2012 for the course CIVIL 480 taught by Professor Jeffnewman during the Fall '12 term at Northwestern.
 Fall '12
 jeffnewman

Click to edit the document details