# Physarum-Inspired Bicycle Lane Network Design in a Congested Megacity
## 3 Physarum-Inspired Bicycle Lane Network Design
### Physarum-Inspired BLN Design Method
#### 3.2.1 Initialization  
The tasks involved in the initialization are the preparation of inputs and then the setting of required variables and matrixes. Pressure assignment of individual nodes is an essential task in this step. A \(1D\) pressure matrix is denoted by \(p\), where \(p_{i}\) is the pressure of the node \(n_{i}\) and is defined based on the demand of a node. Links are represented with three distinct parameters, which are length \(L\), radius \(R\), and conductivity \(D\). Therefore, three n \(\times\) n matrices are used to maintain the link parameters. An element \(L_{ij}\) in the length matrix (\(L\)) denotes the length of the link \(e_{ij}\). An element \(r_{ij}\) in the radius matrix (R) is the radius (i.e., tubular thickness) of the link \(e_{ij}\). An element \(D_{ij}\) in the conductivity matrix (\(D\)) denotes the conductivity of the link \(e_{ij}\). The flux matrix denoted by \(Q\) is also maintained, where an element \(Q_{ij}\) denotes the flux of the link \(e_{ij}\). The values of matrices \(L\) and \(R\) depend on the link conditions and remain unchanged throughout the iterative process. The matrixes \(D\) and \(Q\) are populated with initial values, and they are updated in an iterative process to build the network.  
In this study, an innovative idea is considered to define the initial conductivity of individual links (\(D_{ij}\)), including a hinder parameter (\(h_{ij}\)) along with the width (\(r_{\bar{\eta}}\)) and viscosity (\(\varepsilon\)) of the link:  
\[D_{\bar{\eta}j}=\frac{\pi r_{ij}^{4}}{h_{ij}\varepsilon}. \tag{4}\]  
The fixed value 8 in the existing conductivity equation (Equation (1)) is replaced with the hinder value of an individual link. The value of a hinder parameter represents the value of the collective obstacle of the link. The conductivity is inversely proportional to the hinder value (i.e., \(D\propto h^{-1}\)); a lower \(h_{ij}\) value represents the suitability of the link condition and vice versa. A collective measure of different hinder parameter values is used to set \(h_{ij}\) value of link \(e_{\bar{\eta}}\):  
\[h_{ij}=w\left(f_{ij}+\tau_{ij}+\alpha+\beta+t\right). \tag{5}\]  
In the above equation, \(f_{ij}\) is the footpath condition, \(\tau_{ij}\) defines the traffic condition, \(\alpha\) defines the marketplace condition aside the link, \(\beta\) denotes the divider condition of the road (i.e., one-way or two-way), and \(t\) represents the terminal condition of the link (with or without a dead-end). Moreover, the weighted parameter (\(w\)) is used to provide different preference conditions for the main and link roads.  
Pressures for individual nodes, i.e., \(p=\{\ p_{1},\ldots,p_{n}\}\) are defined based on the demand of individual commercial/residential areas where the pressure of a particular node (\(P_{i}\)) is considered as the accumulated pressure of the node for different source-target pairs of the network. If \(F_{st}\) is flow from starting node \(s\) to target node \(t\), then flux conservation considering Equations (1) and (2) is  
\[\sum_{i\
eq j}\frac{D_{ij}}{L_{ij}}\left(p_{i}^{st}-p_{j}^{st}\right)=\left\{ \begin{array}{cc}-F_{st},&j=s\\ +F_{st},&j=t\\ 0,&j\
eq s,\ t\end{array}\right.. \tag{6}\]  
Setting \(p_{i}=0\) (pressure at target or sink node to 0) as the base pressure level, the unique pressure level at every node \(p_{i}\) is achieved by solving a system of linear equations of Equation (6). Then, the accumulated pressure of a particular node (\(P_{i}\)) is the sum of pressures in the node for different source-target pairs solving Equation (6):  
\[P_{i}=\sum_{st}p_{i}^{st}. \tag{7}\]