# Passenger Flow-Oriented Metro Operation without Timetables
## 3 Mathematical Description
### Objective Function
#### 4.1.3 Passenger-Train Interaction Section  
This part mainly concentrates on the interaction between the metro system and the passenger flow; it calculates all passengers' waiting time and evaluates the system's capability. Trains are dispatched based on the strategies generated in the last section, and passengers arrive at each station according to the average passenger flow entering speed recorded by the passenger flow section. With trains departing and stopping based on the chosen departure interval and dwell time, passengers get off firstly to make more space for passengers preparing to board. The metro infrastructure section should define train capacity. If there is free space on the train, passengers will board in sequence according to different destinations until the train's maximum capacity is filled. Remaining passengers will keep waiting in the station. The process of the passenger-train interaction simulator is shown in Algorithm 2 below:```
Input: Passenger data from passenger flow section; system data from metro infrastructure section; departure and arrival time from timetable section Output: Total passengers' waiting time \(WAT\). 1\(WAT=0\)
2 for time t <= T do, t++
3 for station \(s\in\ \overline{S}\) do
4\(WAT=WAT+p_{i,s}^{station}\)
5 end for
6 for train \(i\ \in\ \overline{I}\) do
7\(t\) do
8 if \(a_{i,\,s}=t\)
9 for \(p_{i,s}^{off}>0\) do
10\(p_{i,s}^{train}-\)
11\(c_{i,\,s}++\)
12 end for
13 end if
14 if \(d_{i,\,s}=t\)
15\(p_{i,s}^{left}=p_{i,s}^{station}\)
16 for \(p_{i,s}^{station}>0\)&& \(c_{i,\,s}>0\) do
17\(p_{i,s}^{in}++\)
18\(p_{i,s}^{left}-\)
19\(c_{i,\,s}-\)
20 end for
21 else
22 continue
23 end if
24 end for
25 end for
26 end for
27 return \(WAT\)
```

**Algorithm 2**Passenger-train interaction simulator

### GA_RPOM Algorithm

GA (genetic algorithm) is a metaheuristic inspired by the process of natural selection that belongs to the larger class of evolutionary algorithms (EA). GA is commonly used to generate high-quality solutions to search and optimise problems by relying on bio-inspired operators. In the GA, a population of candidate solutions (individuals, creatures, or phenotypes) to an optimisation problem evolves toward better solutions. Each candidate solution has a set of properties (its chromosomes or genotype) which can be mutated and altered; traditionally, solutions are represented in binary as strings of 0 s and 1 s.

Because of its clear concept, GA has become increasingly popular in the optimal train operational problems. For the RPOM problem, with the binary coding, the GA is more suitable to simulate the choices of dwell time and departure time interval in the metro system than other heuristic algorithms (such as the ant colony algorithm). With a large number of variables in the objective function, the GA could calculate the optimised result in a shorter time and also jump from the local optimal solutions with the crossover and the mutation process easily. Furthermore, the GA can be easily modified and integrated with the simulator for this problem. Based on the traditional GA, the modified process of GA_RPOM can been shown with the following steps:

**Initialize population:** in general, the population of a GA consists of fixed-length binary arrays called gene sequences which represent the specific variables in the objective functions. At first, the population will be generated randomly according to the designed population size. For this research, we use binary numbers to represent the chosen departure time interval's level and dwelling time's level. Thus, each train can obtain a unique binary array representing its operation strategy. After integrating different trains' binary arrays, an enormous binary array is generated as the gene sequence. However, different from the traditional GA, the number of adjustable departure time intervals and dwelling times keeps changing.