# TRIP DISTRIBUTION: The trip distribution models estimate the number of trips from each traffic analysis zone

to each other. The trip distribution model is the second of the four primary model components identified as part of the four-step modeling process. The trips are estimated as a function of the travel impedance from one zone to another The trip-distribution models strive to predict the number of trips that will be made between a pair of zones for a particular trip-purpose where the total number of trip productions and attractions had been derived earlier. These models try to mathematically describe the destinationchoice phase of the sequential demand analysis procedure.  

Trip distribution is a method to determine where trips are going from and to. “Match up” the productions and attractions

There are several methods of trip distribution1. Uniform factor method 2. Average factor method 3. Fratar method 4. Furness method 5. Gravity method. In this study the widely used gravity model has been selected for trip distribution.

Why Gravity method: 1. Assumption of uniform growth rate is not valid. This is because each zone has its own growth factor. 2. Other models underestimate the movements where present development is very limited or overestimate the movement where present development is extensive. GRAVITY MODEL: The gravity model is much like Newton's theory of gravity. The gravity model assumes that the trips produced at an origin and attracted to a destination are directly proportional to the total trip productions at the origin and the total attractions at the destination. The calibrating term or "friction factor" represents the reluctance or impedance of persons to make trips of various duration or distances. The general friction factor indicates that as travel times increase, travelers are increasingly less likely to make trips of such lengths. Calibration of the gravity model involves adjusting the friction factor.

The following formulation also used:

In order to simplify the computation requirement the following formulation has been frequently used

F(i-j)=Empirically derived travel time factor which expresses the average area-wide effect of spatial separation on trip interchange between zones i and j K(i-j)=A specific zone to zone adjustment factor to allow for the incorporation of the effect on travel patterns of defined social or economic linkage not otherwise accounted for in the gravity model formulation K=total no zones M=Iteration number Here there is an example how the total trips are distributed in between 4 residential and 2 employment zones: Example: A self-contained town consists of 4 residential areas A, B, C, D and 2 industrial estates X and Y. General Equation shows that for the design year, the trips from home to work generated by each residential area per 24 hr day area as follows: A=1000, B=2250, C=1750 and D=3200. There are 3700 jobs in X and 4500 in Y. The attraction between zones is inversely proportional to the square of the journey times between zones. The journey times in minutes from home to work are:

ZONES RESIDENTIAL ZONES

EMPLOYMENT ZONES X A B C D 15 15 10 15 Y 20 10 10 20

Calculate and tabulate the inter zonal trips for journeys from home to work.

RESIDENTIAL ZONES

EMPLOYMENT ZONES

A
1000
440

560

B
2250

540 1710 730 1020

X 3700 Y 4500

C
1750

D
3200

1790 1410

Important Factors: Trip Production: In gravity model trip production is always constant and no need second iteration for its adjustment Trip Attraction: There may be a very between desired and calculated attraction and need several adjustment for calculation Friction value: it may be time, cost and other factor that force to vary in trip making. The relationship between the trip production and it may be proportional or inversely proportional Exponential constant: It is a socio economic factor between zones. It’s value generally lies between 1 to 3 and act as power factor of friction value. Adjustment: The total attraction does not tally with the predicted attraction. And an iteration procedure is necessary to balance out the predicted attractions.

And so, Adjusted attraction=desired attraction*(Attraction used in previous iteration/Calculated attraction) Based on the adjusted value the trip productions calculated again and continue this procedure until its value get closure to the desired value. CONTENTS OF THE PROGRAM: Input : • • • • • Header file: stdio.h, conio.h, math.h, stdlib.h Library Functions: clrscr(), printf(), scanf(), getch(),pow(), fopen(), fclose(), fprintf(). Arrays: • • One-dimensional array. Two-dimensional array. Number of residential zones Number of industrial zones Trip productions Trip attractions Friction values (zone to zone travel time)

Program Control Statement: • • • for Loop Nested for loop Multiple if

VARIABLE DECLARATION: 1) Int emp, Int res: Integer type. Number of employment and residential zones. 2) Int trippro[ ], int tripattr[ ] : Integer type. Numer of trips produced and attracted. 3) Int friction[ ] [ ]: Integer type. Zone to zone friction value (travel time). 4) Int relat: Integer type. Proportional or inverse relationship with trips. 5) Float expocons: Float type. Exponential relationship with the frction. 6) Float convertfrict[ ] [ ]: Float type. Friction factor. 7) Float sum [ ]. 8) Int a, b, m, n: Used to give option to the user to repeat the process. PRODUCTION-ATTRACTION INPUT: • Number of residential and employment zone and corresponding trip attraction and productions have been given as input. • Here for loop is used to repeat the statement as many times as the number of residential or employment zones. • To conveniently handle the groups of related attraction or production data, one dimensional array has been used. void main() { clrscr(); int res, m, trippro[10]={0}, emp, n, tripattr[10]={0}; printf("Enter the no of residential zone:"); scanf("%d", &res); for(m=0; m<res; m++) { printf("Enter the trip production by Zone %d:", m+1); scanf("%d", &trippro[m]); } for(m=0; m<res; m++) { printf(" %d\n", trippro[m]); fp = fopen("file.txt","w"); fprintf(fp,"%d\n",trippro[m]); fclose(fp); } Fig: Input of trip production by residential zones

FRICTION VALUE INPUT: • • To enter the friction value of the matrix format, two dimensional array has been used. Here Nested for loop is used. While the outer loop (residential zone) starts its functioning, the inner loop (employment zone) works until its condition becomes false. The process repeats until the condition of outer loop becomes false. int friction[10][10]={0,0}, a, b; for (a=0; a<res; a++) { for (b=0; b<emp; b++) { printf("Residential %d, Employment %d", a+1, b+1); printf("\nEnter friction value:"); scanf("%d", &friction[a][b]); } } for (a=0; a<res; a++) { for (b=0; b<emp; b++) { printf("Residential %d, Employment %d", a+1, b+1); printf(" %d\n", friction[a][b]); fp = fopen("file.txt","a"); fprintf(fp,"Residential %d, Employment %d", a+1, b+1); fprintf(fp," %d\n", friction[a][b]); fclose(fp); } } Fig: Friction Value input

FRICTION FACTOR • First of all, it has to be determined that whether the friction has proportional or inverse relationship with the number of trips.

• •

Then the exponential constant is to be determined. It is the value which presents the degree to which the number of trips is related to the friction. For example- when there is inverse relation and the exponential constant is 2 then ,

friction factor= 1/(di-j)² • • • • If has been used here as program control statement for the relation condition; whether proportional or inverse. Two dimensional array has been used. Nested for loop as before. Power function has been used for the exponential.

convertfrict[a][b]=pow(friction[a][b],expocons) NUMBER OF TRIP CALCULATION: Denominator

Trip production is to be multiplied with the corresponding friction factor . Then, the current result of multiplication is to be added with the previous one.

sum[a]=sum[a]+(tripattr[b]*convertfrict[a][b]);   Nested for loop has been used. Employment zone is used here as inner loop and the residential zone as outer loop. The loop is to be repeated according to the number of employment zones to get the summation. Sum[a] represents the result for individual residential zones. If for example, if there are 4 residential and 2 employment zones, then the inner loop has be executed 2 times for each residential zones. for (a=0; a<res; a++) { for (b=0; b<emp; b++) { sum[a]=sum[a]+(tripattr[b]*co nvertfrict[a][b]); } printf(" %f", sum[a]); fp = fopen("file.txt","a"); fprintf(fp," %f", sum[a]); fclose(fp); }

For the numerator,   The trip production, trip attraction and the corresponding friction factor is to be multiplied. For a given residential zone, the loop is repeated for different employment zones. That is why nested for loop is used where inner loop is employment zone and outer loop is residential zone. For the inner loop the sum[a] remains unchanged as it represents the individual residential zones, not employment zones.  The inner loop executes 2 times for an individual residential zone and the total nested loop executes 8 times to get the desired result. trip [1] [1] =560 trip [1] [2] =440 trip [2] [1] =540 trip [2] [2] =1710 trip [3] [1] =730 trip [3] [2] =1020 trip [4] [1] =1790 trip [4] [2] =1410

for (a=0; a<res; a++) { for (b=0; b<emp; b++) { trip[a][b]=(trippro[a]*convertfrict[ a][b]*tripattr[b])/sum[a]; printf("\ntrip %d to %d=", a+1, b+1); printf("%f\n", trip[a][b]); fp = fopen("file.txt","a"); fprintf(fp,"\ntrip %d to %d=", a+1, b+1); fprintf(fp,"%f\n", trip[a][b]); fclose(fp); } } ITERATION:   To improve the result it is required to repeat the process by iteration. In practice, one or two times are recommended. For each iterations, new variables are declared.