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
 Fall '12
 jeffnewman
 ObjectOriented Programming, Method, Control flow, Furness, final calculated trip

Click to edit the document details