# Multi-Objective Routing and Categorization of Urban Network Segments for Cyclists
## 2 Materials and Methods
### Formulation of the Objective Functions
#### 2.1.1 Safety-Related Criteria  
When deciding on which route to take, cyclists consider many safety factors that influence their choice. They understand that safety is the highest priority during their cycling trips and try to use the correct, most efficient route to reduce the risk of accidents. To achieve this goal, they evaluate many factors, such as the direction of cars, average speed and vehicular traffic volume, bicycle infrastructure, road width, and the availability of a bus route. Each parameter is an important piece of the puzzle that helps protect cyclists during their commutes, ensuring the safety they need. We will examine in more detail these safety parameters that cyclists consider before deciding on their route. Driving against the flow of traffic (contraflow cycling): The movement of cyclists against the direction of vehicles, also known as \"contraflow cycling\", is a practice that presents certain challenges and contradictions. The reasons why some cyclists choose to move against the traffic are varied and can include the following:  
* Access to destinations: In some cases, contraflow roads may provide more direct access to destinations for cyclists [29]. By choosing to move in the opposite direction of vehicles, the time and distance needed to reach destinations close to their original location can be reduced. * Risk avoidance: In some cases, cyclists may choose to ride against traffic to avoid dangerous situations, such as heavy traffic, areas with narrow roads, or unsafe cycle lanes [29]. In these situations, cyclists choose to move against the direction of vehicles to feel safer. To model the above, let \(N_{i,j,k}\in\textbf{N}\) be the network links, \(i,j\in\textbf{R}\) the nodes, and \(k\in\textbf{K}\) indexes. The variable \(x_{\text{i,j,k}}=\{0,\ 1\}\) is defined where \(x_{\text{i,j,k}}=1\) if we use the opposite direction of the road and \(x_{\text{i,j,k}}=0\) if we are moving in the same direction as the vehicles. Let \(l_{\text{i,j,k}}\) be the length of the link \(N_{\text{i,j,k}}\) in meters (m). Finally, let the variable \(y_{\text{i,j,k}}=\{0,\ 1\}\)--which will be localized in all the objective functions \(F_{\text{i}}\)--to be equal to 1 when using the link \(N_{\text{i,j,k}}\), and 0 otherwise. This objective function  
\[F_{1}(x,y)=\min\sum_{ij\in R}\sum_{k\in K}x_{ijk}l_{ijk}y_{ijk} \tag{1}\]  
needs to be minimized to reduce the total distance traveled in the opposite direction of the traffic flow. Average vehicle speed: The average car speed influences the route choice of cyclists. When cars drive at high velocities, the risk of accidents for cyclists increases. High speeds may reduce cyclists' and cars' reaction time in dangerous situations [30], thus cyclists would like to avoid being on roads with high vehicle speeds for long distances. \[F_{2}(y)=\min\sum_{ij\in R}\sum_{k\in K}z_{ijk}l_{ijk}y_{ijk} \tag{2}\]  
To model this, let \(z_{\text{i,j,k}}\) be the average speed of the vehicles at each link \(N_{\text{i,j,k}}\) in km/h. The function above needs to be minimized. Width of the road to the right--overtaking ability: Wider roads often provide more space for the safe coexistence of cyclists and motor vehicles. A wider road allows greater separation between cyclists and passing vehicles, reducing the likelihood of narrow passes or collisions. Bicycle users may prefer wider roads as they provide a more comfortable riding experience by offering a greater safety zone between them and motorized traffic. Cyclists may choose wider roads to avoid busy routes, especially during rush hours, as it can lead to smoother and faster travel [30]. To model this, let variable \(o_{\text{i,j,k}}\in\ \{0,\ 1\}\) be equal to 1 if the user of the link \(N_{\text{i,j,k}}\) can be overtaken by motorized traffic and \(o_{\text{i,j,k}}=0\) if (s)he cannot. Then, the respective objective function  
\[F_{3}(o,y)=\max\sum_{ij\in R}\sum_{k\in K}o_{ijk}l_{ijk}y_{ijk} \tag{3}\]  
seeks to maximize the travel distance where the road is wide enough such that an overtaking can occur.