## 2 Methodology
### Synthesis Framework
A cost to each facility \(\mathbf{x}_{i}\) is set as the absolute difference between the calculated commute distance and the declared commute distance of the inhabitants (straight-line distance to the primary location) \(c_{j}\). Afterward, facilities with no remaining occupants are marked with infinity cost. If there are still facilities with finite cost, the algorithm chooses the one with the minimum cost. On the other hand, if all filtered facilities have infinite cost, the assigned facility is the one with the highest occupancy. Algorithm 2 runs only once, but separately for work and education locations. The first step assigns a radius to each person \(\mathbf{p}_{i}\) based on the cumulative distribution function (cdf) of all trips in the HTS data (selected based on home location), and defines facility \(j\) and occupancy \(\mathbf{O}_{j}\) as in Algorithm 1. The facility order is based on the proximity to the assigned radius \(\Delta d_{i}\). If there is not a facility found within the given radius, the algorithm assigns the nearest facility available and reduces the capacity of the assigned facility. In the case of unavailability of the nearest facility because of full occupancy, the algorithm drops them from the search set and tries to find another one. In the case of an absent facility with available occupancy, the algorithm still assigns the citizen into the nearest facility. In step D2, travel-distance distributions from both HTS datasets were generated for each journey transport mode according to the weight of sample citizens and declared trip time. For some transport modes only used in several samples, a bin size of 20 is applied. In step P3, the relaxation-discretization algorithm [41] was used as in the Sao Paulo scenario [19] to assign the secondary activity locations for the citizens. We contributed here by removing facilities from the list of possible locations when they have no available capacity (similar to Algorithm 2 of P2 operation). At first, the algorithm finds the available secondary-activity facilities with at least occupied ones (the expected number of visitors  
Figure 3:1 The visitors of the facilities (free-time, shopping, and errands). for secondary locations is utilized here). After that, the algorithm selects all activity chains containing secondary trips. Then, sampling of travel distances for each trip is conducted based on declared travel time and journey transport mode. Afterward, possible destinations to assign secondary activity locations (from a primary activity location as origin) are determined to match travel distances between the activities based on the sampled distances. Following the order of possible destinations, if the assigned location is fully occupied, the algorithm removes it from the list of possible locations and tries to assign the next possible destination. This occurs until a facility is assigned to a person and the visitor capacity (i.e., occupancy) of this location is reduced by one after each successful assignment. Lastly, the final synthetic population files were created in MATSim format. The resulting synthetic population for the study area is presented. Figure 3:2 Assignment process for primary activity locations.