# A Particle Swarm Optimization Algorithm for the Solution of the Transit Network Design Problem

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Problem Formulation

- User equilibrium in the transit network (assignment constraint). Such a constraint corresponds to a hyperpath approach for the simulation of user choice behaviour on transit [30]:$$\mathit{q}*=\mathit{\Lambda}\left[{\mathit{C}}_{t}\left(\mathit{r},\mathit{f}\right)\right]$$
- Bus capacity constraints:$$\frac{{q}_{hk,i}}{{f}_{i}\cdot {C}_{v}}\le f{c}_{\mathrm{max}}$$
- Feasibility constraints that define both minimum and maximal values for route length and bus frequency:$${L}_{\mathrm{min}}\le {L}_{i}\le {L}_{\mathrm{max}}$$$${f}_{\mathrm{min}}\le {f}_{i}\le {f}_{\mathrm{max}}$$

_{a}, I

_{i}, I

_{w,}

_{i}, I

_{n}are the set of links hk of the road network, the set of the network lines i, the set of the segments (hk,i) of line i, and the set of the nodes of the transit network, respectively;

_{hk,i}shows the boarding passengers on segment (hk,i) of line i;

_{hk,i}and tw

_{hk,i}indicate the travel time and the waiting time for segment (hk,i) of line i, respectively;

_{n}is the number of transfers at node n;

_{t}is the time penalty associated to a transfer;

_{hk}shows the pedestrians flow on link hk of the road network;

_{hk}indicates the access travel time on link hk of the road network;

_{u}is the time penalty associated with an unsatisfied transit user;

_{u}is the unsatisfied transit demand;

_{km}is the unit cost factor depending on the total bus distance travelled, namely the vehicle operating cost;

_{h}is the unit cost factor depending on the total time of bus service, namely the travelling personnel’s cost;

_{u}is the average monetary value of time for the users; and

_{1}, W

_{2}, and W

_{3}are a set of weights that reflect the relative importance that the decision-maker assigns to each of the three cost components.

## 3. Methodology

- HRGA generates a large and rational set of feasible routes, by applying different design criteria and practical rules.
- The PSO algorithm finds the optimal network of routes and their frequencies.

_{a}, row of dimension $1\times {N}_{L}$) is computed among the k a-th particles for each set value of a ranging from 1 to ${N}_{S}$. Besides, the best “partial best” is the “global best” (GBEST, row of dimension $1\times {N}_{L}$) among the $k\times {N}_{S}$ particles. By doing so, PSO introduces the concept of “memory” of each particle that allows individuals to store their successful past practices. The fastness of the convergence of particles towards the “partial” or “global best” is controlled in the sixth step according to some constraints to be satisfied.

#### PSO Algorithm for the Optimization of the Bus Network

- Initialization
- Initialization of the swarm ${S}^{0}$ of size ${N}_{S}$ by randomly generating particles ${P}_{a}^{0}$, each one composed by ${N}_{L}$ elements; dim(${S}^{0}$) = ${N}_{S}\times {N}_{L}$; dim$({P}_{a}^{0})=1\times {N}_{L}$;
- Initialization of particles speed:
- CR1 = CR1IN, CR2 = CR2IN, CR3 = CR3IN;

- Initialization of particles memory:
- PBEST
_{a}= ${P}_{a}^{0}$, a = 1, …, ${N}_{S}$; dim(PBEST_{a}) = $1\times {N}_{L}$;

- Initialization of the iteration counter: k = 0

- Evaluation
- OF evaluation $z({P}_{a}^{k})$ for any particle ${P}_{a}^{k}$ of the swarm ${S}^{k}$;

- Memory update (Partial best update)
- Identification of the ${N}_{S}$ partial best solutions; they are the particles implying the best OF values among the k a-th particles:
- PBEST
_{a}= argmin $z({P}_{a}^{k})$, $\forall k$, a = 1, …, ${N}_{S}$

- Update the matrix PBEST;
- PBEST = (PBEST
_{a}); dim(PBEST) = ${N}_{S}\times {N}_{L}$

- Global best update
- Identification of the global best solution; it is the particle implying the best OF value for any iteration k:
- GBEST = argmin $z({P}_{a}^{k})$, $\forall k$, $\forall a$; dim(GBEST) = $1\times {N}_{L}$

- Spread update
- Spread of partial best solution within the swarm:
- If round (CR1 · rand) = 0; a = 1, …, ${N}_{S}$; n = 1, …., ${N}_{L}$;
- ${\mathrm{PAUX}1}_{a}^{k}(n)={P}_{a}^{k}(n)$;
- else
- ${\mathrm{PAUX}1}_{a}^{k}(n)={\mathrm{PBEST}}_{a}(n)$; ${\mathrm{PAUX}1}_{a}^{k}(n)$: element in position n of auxiliary matrix ${\mathrm{PAUX}1}_{a}^{k}$

- Spread of local solution within the swarm:
- If round (CR2 × rand) = 0; a = 1, …, ${N}_{S}$; n = 1, …., ${N}_{L}$;
- ${\mathrm{PAUX}2}_{a}^{k}(n)={\mathrm{PAUX}1}_{a}^{k}(n)$,
- else
- ${\mathrm{PAUX}2}_{a}^{k}(n)=\mathrm{GBEST}(n)$; ${\mathrm{PAUX}2}_{a}^{k}(n)$: element in position n of auxiliary matrix ${\mathrm{PAUX}2}_{a}^{k}$

- Spread of randomness within the swarm:
- If round (CR3 × rand) = 0; a = 1, …., ${N}_{S}$; n = 1, …., ${N}_{L}$;
- ${\mathrm{PAUX}3}_{a}^{k}(n)={\mathrm{PAUX}2}_{a}^{k}(n)$,
- else
- ${\mathrm{PAUX}3}_{a}^{k}(n)$ is randomly selected among basin lines; ${\mathrm{PAUX}3}_{a}^{k}(n)$: element in position n of auxiliary matrix ${\mathrm{PAUX}3}_{a}^{k}$

- Iteration update
- Set k = k +1

- Swarm update
- ${P}_{a}^{k}(n)={\mathrm{PAUX}3}_{a}^{k}(n)$

- Speed update
- Speed update for each particle, verifying if several constraints are satisfied or not, for k > 50

- Convergence check
- Return to Step 2 or stop if the fixed number of iterations is reached.

## 4. Real Size Test Network Application

## 5. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Newell, G.F. Some Issues Relating to the Optimal Design of Bus Routes. Transp. Sci.
**1979**, 13, 20–35. [Google Scholar] [CrossRef] - Baaj, M.H.; Mahmassani, H.S. An AI−based approach for transit route system planning and design. J. Adv. Transp.
**1991**, 25, 187–210. [Google Scholar] [CrossRef] - Baaj, M.H.; Mahmassani, H.S. Hybrid route generation heuristic algorithm for the design of transit networks. Transp. Res. Part C Emerg. Technol.
**1995**, 3, 31–50. [Google Scholar] [CrossRef] - Desaulniers, G.; Hickman, M.D. Chapter 2 Public Transit. Handb. Oper. Res. Manag. Sci.
**2007**, 14, 69–127. [Google Scholar] - Guihaire, V.; Hao, J.-K. Transit network design and scheduling: A global review. Transp. Res. Part A Policy Pract.
**2008**, 42, 1251–1273. [Google Scholar] [CrossRef][Green Version] - Kepaptsoglou, K.; Karlaftis, M. Transit Route Network Design Problem: Review. J. Transp. Eng.
**2009**, 135, 491–505. [Google Scholar] [CrossRef] - Gallo, M.; Montella, B.; D’Acierno, L. The transit network design problem with elastic demand and internalisation of external costs: An application to rail frequency optimisation. Transp. Res. Part C Emerg. Technol.
**2011**, 19, 1276–1305. [Google Scholar] [CrossRef] - Schöbel, A. Line planning in public transportation: Models and methods. OR Spectr.
**2011**, 34, 491–510. [Google Scholar] [CrossRef][Green Version] - Ibarra-Rojas, O.J.; Delgado, F.; Giesen, R.; Muñoz, J.C. Planning, operation, and control of bus transport systems: A literature review. Transp. Res. Part B Methodol.
**2015**, 77, 38–75. [Google Scholar] [CrossRef] - Cipriani, E.; Fusco, G.; Patella, S.M.; Petrelli, M.; Quadrifoglio, L. Transit network design for small-medium size cities. Transp. Plan. Technol.
**2018**, 42, 84–97. [Google Scholar] [CrossRef] - Jia, G.-L.; Ma, R.-G.; Hu, Z.-H. Review of Urban Transportation Network Design Problems Based on CiteSpace. Math. Prob. Eng.
**2019**, 1, 1–22. [Google Scholar] - Iliopoulou, C.; Kepaptsoglou, K.; Vlahogianni, E. Metaheuristics for the transit route network design problem: A review and comparative analysis. Public Transp.
**2019**, 11, 487–521. [Google Scholar] [CrossRef] - Carrese, S.; Gori, S. An Urban Bus Network Design Procedure. In Transportation Planning; Patriksson, M., Labbé, M., Eds.; Kluwer Academic Publishers: Boston, MA, USA, 2002; pp. 177–195. [Google Scholar]
- Lee, Y.-J.; Vuchic, V.R. Transit Network Design with Variable Demand. J. Transp. Eng.
**2005**, 131, 1–10. [Google Scholar] [CrossRef] - Xiong, Y.E.; Schneider, J.B. Transportation network design using a cumulative genetic algorithm and neural network. Transportation Research Record. J. Transp. Res. Board
**1993**, 1364, 37–44. [Google Scholar] - Chakroborty, P. Genetic Algorithms for Optimal Urban Transit Network Design. Comput.-Aided Civ. Infrastruct. Eng.
**2003**, 18, 184–200. [Google Scholar] [CrossRef] - Dhingra, S.L.; Muralidhar, S.; Krishna Rao, K.V. Public transport routing and scheduling using genetic algorithms. In Proceedings of the 8th CASPT International Conference, Berlin, Germany, 21–23 June 2000. [Google Scholar]
- Bielli, M.; Caramia, M.; Carotenuto, P. Genetic algorithms in bus network optimization. Transp. Res. Part C Emerg. Technol.
**2002**, 10, 19–34. [Google Scholar] [CrossRef] - Yang, Z.; Yu, B.; Cheng, C. A Parallel Ant Colony Algorithm for Bus Network Optimization. Comput.-Aided Civ. Infrastruct. Eng.
**2007**, 22, 44–55. [Google Scholar] [CrossRef] - D’Acierno, L.; Gallo, M.; Montella, B. Ant Colony Optimization approaches for the transportation assignment problem. WIT. Trans. Built Environ.
**2010**, 111, 37–48. [Google Scholar] - Pattnaik, S.B.; Mohan, S.; Tom, V.M. Urban Bus Transit Route Network Design Using Genetic Algorithm. J. Transp. Eng.
**1998**, 124, 368–375. [Google Scholar] [CrossRef] - Fan, W.; Machemehl, R.B. Optimal transit route network design problem with variable transit demand: Genetic algorithm approach. J. Transp. Eng.
**2006**, 132, 40–51. [Google Scholar] [CrossRef] - Michaelis, M.; Schöbel, A. Integrating line planning, timetabling, and vehicle scheduling: A customer-oriented heuristic. Public Transp.
**2009**, 1, 211–232. [Google Scholar] [CrossRef][Green Version] - Alt, B.; Weidmann, U. A stochastic multiple area approach for public transport network design. Public Transp.
**2011**, 3, 65–87. [Google Scholar] [CrossRef] - Bagloee, S.A.; Ceder, A. Transit-network design methodology for actual-size road networks. Transp. Res. Part B Methodol.
**2011**, 45, 1787–1804. [Google Scholar] [CrossRef] - Szeto, W.Y.; Jiang, Y. Transit route and frequency design: Bi-level modeling and hybrid artificial bee colony algorithm approach. Transp. Res. Part B Methodol.
**2014**, 67, 235–263. [Google Scholar] [CrossRef][Green Version] - Iliopoulou, C.; Tassopoulos, I.; Kepaptsoglou, K.; Beligiannis, G. Electric Transit Route Network Design Problem: Model and Application. Transp. Res. Rec.
**2019**, 267, 264–274. [Google Scholar] [CrossRef] - Jha, S.B.; Jha, J.K.; Tiwari, M.K. A multi-objective meta-heuristic approach for transit network design and frequency setting problem in a bus transit system. Comput. Ind. Eng.
**2019**, 130, 166–186. [Google Scholar] [CrossRef] - Cipriani, E.; Gori, S.; Petrelli, M. Transit network design: A procedure and an application to a large urban area. Transp. Res. Part C Emerg. Technol.
**2012**, 20, 3–14. [Google Scholar] [CrossRef] - Spiess, H.; Florian, M. Optimal strategies: A new assignment model for transit networks. Transp. Res. Part B Methodol.
**1989**, 23, 83–102. [Google Scholar] [CrossRef] - Coello, C.A.; Lamont, G.B.; Van Veldhuizen, D.A. Evolutionary Algorithms for Solving Multi-Objective Problems; Springer: Berlin, Germany, 2007. [Google Scholar]
- Kennedy, J.; Eberhart, R. Particle Swarm Optimization. In Proceedings of the IEEE International Conference on Neural Networks IV, Perth, Australia, 27 November–1 December 1995; pp. 1942–1948. [Google Scholar]
- Carlisle, A.; Dozier, G. An Off-The-Shelf PSO. In Proceedings of the Particle Swarm Optimization Workshop, Indianapolis, IN, USA, 6–7 April 2001. [Google Scholar]
- Sengupta, S.; Basak, S.; Peters, R. Particle Swarm Optimization: A Survey of Historical and Recent Developments with Hybridization Perspectives. Mach. Learn. Knowl. Extr.
**2018**, 1, 157–191. [Google Scholar] [CrossRef][Green Version] - Lovbjerg, M.; Krink, T. Extending Particle Swarm Optimizers with Self-Organized Criticality. In Proceedings of the Fourth Congress on Evolutionary Computation, Honolulu, Hawaii, HI, USA, 12–17 May 2002. [Google Scholar]
- Niknam, T.; Amiri, B. An efficient hybrid approach based on PSO, ACO and k-means for cluster analysis. Appl. Soft Comput.
**2010**, 10, 183–197. [Google Scholar] [CrossRef] - Kukkonen, S.; Lampinen, J. Constrained Real-Parameter Optimization with Generalized Differential Evolution. In Proceedings of the 2006 IEEE International Conference on Evolutionary Computation, Vancouver, BC, Canada, 16–21 July 2006. [Google Scholar]
- Carrese, S.; Giacchetti, T.; Patella, S.M.; Petrelli, M. Real time ridesharing: Understanding user behavior and policies impact: Carpooling service case study in Lazio Region, Italy. In Proceedings of the 5th IEEE International Conference on Models and Technologies for Intelligent Transportation Systems (MT-ITS), Naples, Italy, 26–28 June 2017. [Google Scholar]
- Carrese, S.; Giacchetti, T.; Nigro, M.; Patella, S.M. An innovative car sharing electric vehicle system: An Italian experience. WIT Trans. Built Environ.
**2017**, 176, 245. [Google Scholar] [CrossRef] - Patella, S.M.; Sportiello, S.; Petrelli, M.; Carrese, S. Workplace relocation from suburb to city center: A case study of Rome, Italy. Case Stud. Transp. Policy
**2019**, 7, 357–362. [Google Scholar] [CrossRef] - Gatta, V.; Marcucci, E.; Nigro, M.; Patella, S.; Serafini, S. Public Transport-Based Crowdshipping for Sustainable City Logistics: Assessing Economic and Environmental Impacts. Sustainability
**2018**, 11, 145. [Google Scholar] [CrossRef][Green Version]

**Figure 1.**OF minimum and mean values for the 130 lines scenario (Particle Swarm Optimization (PSO) algorithm).

**Table 1.**Objective function (OF) values in the five different scenarios, for both the optimization techniques.

SCENARIO | ALGORITHM | ITER = 1 | ITER = 10 | ITER = 50 | ITER = 100 | ITER = 250 | ITER = 500 |
---|---|---|---|---|---|---|---|

40 LINES | PSO | 1,074,267 | 1,051,914 | 1,017,672 | 1,003,923 | 995,499 | 989,290 |

GA | 1,069,351 | 1,041,039 | 1,015,565 | 1,005,095 | 993,503 | 984,260 | |

(PSO-GA)/PSO (%) | 0.46% | 1.03% | 0.21% | −0.12% | 0.20% | 0.51% | |

55 LINES | PSO | 1,050,306 | 1,026,737 | 1,000,541 | 987,277 | 972,614 | 963,467 |

GA | 1,048,322 | 1,030,895 | 1,006,451 | 996,670 | 980,814 | 977,757 | |

(PSO-GA)/PSO | 0.19% | −0.41% | −0.59% | −0.95% | −0.84% | −1.48% | |

85 LINES | PSO | 1,020,711 | 1,001,708 | 993,070 | 982,987 | 965,285 | 956,967 |

GA | 1,028,344 | 1,012,388 | 997,786 | 985,752 | 974,862 | 965,661 | |

(PSO-GA)/PSO | −0.75% | −1.07% | −0.47% | −0.28% | −0.99% | −0.91% | |

110 LINES | PSO | 1,016,509 | 1,003,617 | 987,110 | 981,690 | 965,924 | 956,751 |

GA | 1,018,004 | 997,120 | 989,749 | 980,939 | 968,848 | 961,299 | |

(PSO-GA)/PSO | −0.15% | 0.65 % | −0.27% | 0.08% | −0.30% | −0.48% | |

130 LINES | PSO | 1,005,612 | 998,011 | 980,368 | 977,090 | 957,987 | 952,837 |

GA | 1,006,506 | 998,140 | 980,201 | 972,560 | 964,664 | 956,224 | |

(PSO-GA)/PSO | −0.09% | −0.01% | 0.02% | 0.46% | −0.70% | −0.36% |

Scenario | Algorithm | OF min | Veh.∙km | Uns. Demand (pax) | Boardings (pax) | Access Time (h) | Waiting. Time (h) | In-veh. Time (h) |
---|---|---|---|---|---|---|---|---|

EXISTING NETWORK (214 LINES) | 1,102,602 | 18,912 | 14,206 | 320,817 | 101,656 | 33,131 | 99,906 | |

40 LINES | PSO | 989,290 | 11,094 | 6,982 | 323,477 | 104,809 | 22,583 | 80,493 |

GA | 984,260 | 11,583 | 6,958 | 322,612 | 103,419 | 22,765 | 81,681 | |

55 LINES | PSO | 963,467 | 12,745 | 5,896 | 320,388 | 100,296 | 22,406 | 82,100 |

GA | 977,757 | 12,347 | 6,878 | 328,919 | 101,236 | 22,822 | 82,215 | |

85 LINES | PSO | 956,967 | 15,174 | 5,311 | 324,706 | 97,522 | 22,014 | 82,361 |

GA | 965,661 | 14,997 | 5,651 | 325,823 | 97,336 | 22,155 | 83,031 | |

110 LINES | PSO | 956,751 | 15,671 | 5,354 | 334,851 | 95,802 | 22,725 | 83,299 |

GA | 961,299 | 16,583 | 5,634 | 333,625 | 95,734 | 22,301 | 83,962 | |

130 LINES | PSO | 952,837 | 16,994 | 5,121 | 330,065 | 95,099 | 22,083 | 83,497 |

GA | 956,228 | 16,816 | 5,044 | 329,120 | 95,774 | 22,293 | 82,858 |

**Table 3.**Comparison among OF parameters for different design networks with respect to the existing one.

Scenario | Algorithm | OF min | Veh.∙km | Uns. Demand (pax) | Boardings (pax) | Access Time (h) | Waiting. Time (h) | In-veh. Time (h) |
---|---|---|---|---|---|---|---|---|

EXISTING NETWORK (214 LINES) | - | - | - | - | - | - | - | |

40 LINES | PSO | −10.3% | −41.3% | −50.9% | 0.8% | 3.1% | −31.8% | −19.4% |

GA | −10.7% | −38.8% | −51.0% | 0.6% | 1.7% | −31.3% | −18.2% | |

55 LINES | PSO | −12.6% | −32.6% | −58.5% | −0.1% | −1.3% | −32.4% | −17.8% |

GA | −11.3% | −34.7% | −51.6% | 2.5% | −0.4% | −31.1% | −17.7% | |

85 LINES | PSO | −13.2% | −19.8% | −62.6% | 1.2% | −4.1% | −33.6% | −17.6% |

GA | −12.4% | −20.7% | −60.2% | 1.6% | −4.2% | −33.1% | −16.9% | |

110 LINES | PSO | −13.2% | −17.1% | −62.3% | 4.4% | −5.8% | −31.4% | −16.6% |

GA | −12.8% | −12.3% | −60.3% | 4.0% | −5.8% | −32.7% | −16.0% | |

130 LINES | PSO | −13.6% | −10.1% | −63.9% | 2.9% | −6.5% | −33.3% | −16.4% |

GA | −13.3% | −11.1% | −64.5% | 2.6% | −5.8% | −32.7% | −17.1% |

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Cipriani, E.; Fusco, G.; Patella, S.M.; Petrelli, M.
A Particle Swarm Optimization Algorithm for the Solution of the Transit Network Design Problem. *Smart Cities* **2020**, *3*, 541-555.
https://doi.org/10.3390/smartcities3020029

**AMA Style**

Cipriani E, Fusco G, Patella SM, Petrelli M.
A Particle Swarm Optimization Algorithm for the Solution of the Transit Network Design Problem. *Smart Cities*. 2020; 3(2):541-555.
https://doi.org/10.3390/smartcities3020029

**Chicago/Turabian Style**

Cipriani, Ernesto, Gaetano Fusco, Sergio Maria Patella, and Marco Petrelli.
2020. "A Particle Swarm Optimization Algorithm for the Solution of the Transit Network Design Problem" *Smart Cities* 3, no. 2: 541-555.
https://doi.org/10.3390/smartcities3020029