# Generating Activity-Based Mobility Plans from Trip-Based Models and Mobility Surveys
## 3 Materials and Methods
### Approach
#### 3.3.3 Assign Activity Locations  
This section explains the assignment of TAZs to activities. As mentioned before, we distinguished between the main and secondary activities based on the survey results provided by MID. It was assumed that the distance to (and therefore the location of) the main activity does not depend on any other activities, which is why all main activities are located independently. Thereafter, all secondary activities would be located depending on the main activities' locations. This resembles the approach of [PERSON] and [PERSON] [60] and [PERSON] and [PERSON] [43], who first assigned locations to activities on the highest hierarchical level--main activities in this context--and then, based thereon, the locations of activities on the lower or secondary hierarchical levels. The locations of the static main activities were inserted from the car information table. The locations of all unassigned main activities were chosen based on a combined concept of TAZ attractivity and driving willingness. While, per definition, the locations of static activity types such as home and work always remained the same, the locations of non-static activity types such as shopping and recreation were chosen for each activity individually, (i.e., two main activities of the same activity type might not be located in the same location). Driving willingness distributions model the willingness of persons to drive for a certain distance to conduct an activity. Driving willingness has been modeled by employing a variety of different distributions fitted with real-life trace data. Using this method, scholars considered gamma [19; 21], Weibull [20], lognorm [20; 21], exponential [22; 23], and chi-squared [20] distributions. A clear consensus could not be identified. Hence, all aforementioned distribution types were fitted to the reported driving distances from MID using the following approach, as illustrated in Figure 5. For each activity type \(p\) occurring as a main activity, one probability density function (PDF) \(f_{p}^{D}(d,\mathit{parameters}_{p})\) of driving willingness \(d\) over a continuous random distance variable \(D\) is created. The driving willingness of activity type \(p\) is the distribution of distances \(d_{ip}\) (non-directed) of all trips \(\overline{pi}\) and \(\overline{ip}\) between home \(i\) and main activity \(p\). In case of trips \(\overline{ipi}\), the considered distance is \(d_{p}~{}=~{}\frac{1}{2}(d_{ip}+d_{pi})\). Each distribution was determined by fitting a set of distribution types to the analyzed feature and qualitatively selecting the best fit based on three criteria:  
1. Qualitative evaluation of the visual fit of the fitted distribution and a histogram of the analyzed feature, especially around the extreme values;
2. Quantitative (Kolmogorov-Smirnov test and Anderson-Darling test) and qualitative (QQ-plot) evaluation of statistical tests;
3. Qualitative plausibility check of whether the fitted distribution could be explained by real-life behavior, especially regarding overfitting. The exemplary results are depicted in Figure 6.  
To finally draw the locations of the main activities based on the driving willingness distribution and TAZ attraction, the probability \(\Pi_{j|i,p}\) of choosing TAZ \(j\) for conducting main activity \(p\) when currently being in TAZ \(i\) is given by Equation (1):  
\[\Pi_{j|i,p} = \frac{w_{j|i,p}}{\sum_{l=1}^{m}w_{l|i,p}} \tag{1}\]  
with  
\[w_{j|i,p} = conf_{j|i,p}\,att_{j,p}, \tag{2}\] \[conf_{j|i,p} = \int_{d=d_{ij}}^{\infty}f_{p}^{D}(d,\;parameters_{p})\;\text{d}\;d\] (3) \[= 1-F_{p}^{D}(d_{ij},\;parameters_{p}),\] (4) \[d_{ij} = a_{\text{dist}}\,\overline{d_{ij}}. \tag{5}\]  
where \(m\) is the number of possible TAZs. This formula structurally resembles a multinomial logit choice model comparing all possible activity locations. Hence, locations were selected from all feasible alternatives. In line with econometric models, there was no pre-selection of alternatives [4].