# Generating Activity-Based Mobility Plans from Trip-Based Models and Mobility Surveys
## 3 Materials and Methods
### Approach
#### Step 1: Determining One Anchor Time per Day  
The anchor time (one end time per day) locates a sequence of activities on the timeline. The first step depends on whether the start time information is available for any of the activities, which is the case if it is a static activity known from the synthetic population, such as working. If so, the start time of the first activity with available information is used as the anchor. If not, the start time of the day's first activity is drawn from a start time distribution for the respective activity type. Using this start time, the end time of the previous activity is calculated and used as the next anchor time. The start time distributions model the start times of activities. The distribution fitting process was the same as for the driving and detour willingness. For each activity type \(p\) (including the activity of being at home), one PDF \(f_{p}^{T}(t,parameters_{p})\) of start time \(t\) over a continuous random time variable \(T\) is created. It is not further differentiated between main and secondary activities in order to prevent the creation of many small groups. The same applies to activity duration distributions. Since the start time behavior distribution is provided as a continuous PDF, probabilities can only be calculated for intervals and not for individual values, and those intervals are of \(len_{\text{bin},start}\). We used bin lengths of \(30\,\text{min}\)  
Figure 8: Exemplary illustration of the four process steps of assigning an end time and duration to each activity. The red arrow in step one marks the drawn or inserted start time. Vertical red lines represent activity end times. Bent arrows illustrate that that element at the head of the arrow can uniquely be located on the timeline given the element the arrow originates from. Blue and red represent driving and activity, respectively. Drive times are exaggerated for illustrative purposes. Please note that the underlying mobility plan is not consistent with the assumption that a person either has work activities on all days (working) or on none (non-working), but it was chosen to illustrate both cases. (\(len_{\text{bin},start}~{}=~{}30\) min) for the start time distributions. This comparably large bin size was motivated by the distribution not being skewed toward the value 0 (midnight) and by the distribution covering a comparably large span of 24 h. This bin size represents a good balance of realistically representing the distributions' major characteristics while not overfitting to the data. The end time or anchor time of the preceding activity is calculated and inserted into the mobility plan based on the start time and the drive time to this activity. In the case of a drawn start time, a bin is drawn with a probability \(\Pi_{\text{bin}_{i}}\):  
\[\Pi_{\text{bin}_{i}}~{}=~{}\int\limits_{t^{\prime}\in\text{bin}_{i}}f_{p}^{T}( t^{\prime},parameters_{p})\text{d}t^{\prime}. \tag{14}\]  
where \(f_{p}^{T}\) is the PDF of the start time distribution and \(T\) is the random continuous time variable. The distribution type is once more specific to the activity type \(p\) and the fitting parameters \(parameters_{p}\), which results from the distribution fitting process. The center of the drawn bin is then taken as the start time. The drive times \(\Delta t_{\text{drive},xy}\) between arbitrary locations \(x\) and \(y\) are calculated using the direct line distance \(\overline{d_{xy}}\), a constant factor \(a_{\text{dist}}\) for estimating the road distance based on the direct line distance, and the average velocity \(v_{\text{avg,city}}\) of the analyzed urban area:  
\[\Delta t_{\text{drive},xy}~{}=~{}v_{\text{avg,city}}^{-1}a_{\text{dist}} \overline{d_{xy}}. \tag{15}\]  
The average speed of cars in Munich, \(v_{\text{avg,Munich}}=32~{}\frac{\text{km}}{\text{h}}\), is applied for calculating the drive times [61]. The applied constant factor to approximate the road distance based on the direct line distance is \(a_{\text{dist}}=1.5\) in the city of Munich [62].