Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this presentation? Why not share!

- Sigma Knowledge Engineering Environ... by Kingsley Uyi Idehen 1219 views
- Image of Chawk Bazar an Analysis fr... by Shahadat Hossain ... 1514 views
- Significance of Local Knowledge in ... by Shahadat Hossain ... 703 views
- Early sprouts slide share test by raganmd 549 views
- Corporate Social Responsibility (CS... by Shahadat Hossain ... 1429 views
- Smart Grid Optimization Solutions M... by Technavio 235 views

924 views

Published on

Presented by

Yousuf Mahid (0615012)

Shahadat Hossain Shakil (0615020)

Khadija Akhter (0615027)

No Downloads

Total views

924

On SlideShare

0

From Embeds

0

Number of Embeds

2

Shares

0

Downloads

101

Comments

0

Likes

2

No embeds

No notes for slide

- 1. Solving a Transportation Planning Problem Through the Programming Language “C” Presented by Yousuf Mahid(0615012) Shahadat Hossain Shakil(0615020) Khadija Akhter(0615027)
- 2. Calculation of Inter-Zonal Trips (Gravity Model) Problem:Calculation of inter-zonal trips in a town.(Gravity Model) Example: A self-contained town consists of four residential areas A, B, C and D and two industrial areas X and Y. Generation equations show that for the design year the trips from home to work generated by each residential area per day are A=1000, B=2250, C=1750 and D=3200. There are 3700 jobs in X and 4500 jobs in Y. The frictional factor is inversely proportional to the travel time between zones as tabulated below and the value of exponent is 2. Travel time between the zones in minutes Zones Y A 15 20 B 15 10 C 10 10 D Page 2 X 15 20
- 3. Calculation of Inter-Zonal Trips (Gravity Model) Destination Y A TAX TAY B Origin X TBX TBY TCX TCY TDX TDY 3700 4500 C D Total Total 1000 2250 1750 3200 8200 We have to determine the correct value of the T AX, TAY, TBX, …………. TDY, until justifying both the column and the row total by continuous calculation through iteration. Page 3
- 4. Calculation of Inter-Zonal Trips (Gravity Model) Solution:The most typical version of gravity model used in the transportation planning application is Tij= (Oi × Djfij) ∕ ( ∑ Djfij) Where Tij = no. of trips from zone i to zone j. Oi = total no. of trips produced in zone i. Dj = total no. of trips attracted to zone j. b = an exponential constant whose value is usually found between 1 and 2. The frictional factor is an inverse function of the travel cost (time, distance, monetary cost). fij = 1 / Cijb Page 4
- 5. Calculation of Inter-Zonal Trips (Gravity Model) TAX = 1000 × (3700/152) / (3700/152 + 4500/202) = 592 TAY = 1000 × (4500/202) / (3700/152 + 4500/202) = 407 ……………………………………………………………… TDX = 3200 × (3700/152) / (3700/152 + 4500/202) = 1896 TDY = 3200 × (4500/152) / (3700/152 + 4500/202) = 1303 X Y Total Destination Origin A 592 407 1000 B 590 1659 2250 C 789 960 1750 D 1896 1303 3200 Calculated Attraction 3867 4329 8196 Projected Attraction 3700 4500 8200 Page 5
- 6. Calculation of Inter-Zonal Trips (Gravity Model) The adjusted attraction = Projected attraction × (The attraction used in the previous iteration ∕ Calculated attraction in the previous iteration) D1X = 3700 × (3700 ∕ 3867) = 3540 D1Y = 4500 × (4500 ∕ 4329) = 4677 TAX = 1000 × (3540/152) / (3540/152 + 4677/202) = 576 …………………………………………………………. TDY = 3200 × (4677/152) / (3540/152 + 4677/202) = 1353 Destination X Y Total Origin A 423 1000 B 553 1696 2250 C 756 993 1750 D 1846 1353 3200 Calculated Attraction 3731 4465 8196 Projected Attraction Page 6 576 3700 4500 8200
- 7. Calculation of Inter-Zonal Trips (Gravity Model) Again the adjusted attractions after second iteration is D2X = 3700 × (3540 ∕ 3731) = 3510 D2Y = 4500 × (4677 ∕ 4465) = 4713 Using this adjusted attraction value, 3rd iteration will be operated. This process continues until the calculated attraction value and the projected attraction value is being equalized or nearest most. Using the “C” programming language we have to develop a program to do this cumbersome mathematical calculation mechanically to save time and energy and to get the accurate result in the shortest possible time. Page 7
- 8. Making Procedure of the Program in “C” Divide the whole task among different functions. Function declaration. Declaring functions prototype before main function. Then subdivide the claculation of a specific function into more smaller p Variable Declaration-(Local and Global). Global Array Declaration- (1D and 2D)-to store and manipulate same kind of data. Function calling - inside the main function and also inside the called function. Page 8
- 9. Making Procedure of the Program in “C” Library function used – main(); clrscr(); printf();scanf(); fflush(stdin); getch(); (including related header files) Type of variables used – int; long int; float; (including ralated format specifier) Operator used – arithmatic (addition, multiplication, division) – assignment(=), relational(==),increment(++) Control Statement Used – if statement; – for loop; A progarm largely dependent on the use of array and continuous iteration. Limitations – deigned for 10 residential zone and 2 working zone. Failure of converting the fraction trip value into the next higher integer number. Page 9
- 10. Thanks for your patience. Q/A Page 10
- 11. Page 11
- 12. Page 12
- 13. Page 13
- 14. Page 14
- 15. Page 15

No public clipboards found for this slide

×
### Save the most important slides with Clipping

Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.

Be the first to comment