Incorporating Multi-Modal Travel Planning into an Agent-Based Model: A Case Study at the Train Station Kellinghusenstraße in Hamburg

: Models can provide valuable decision support in the ongoing effort to create a sustainable and effective modality mix in urban settings. Modern transportation infrastructures must meaning-fully combine public transport with other mobility initiatives such as shared and on-demand systems. The increase of options and possibilities in multi-modal travel implies an increase in complexity when planning and implementing such an infrastructure. Multi-agent systems are well-suited for addressing questions that require an understanding of movement patterns and decision processes at the individual level. Such models should feature intelligent software agents with ﬂexible internal logic and accurately represent the core functionalities of new modalities. We present a model in which agents can choose between owned modalities, station-based bike sharing modalities, and free-ﬂoating car sharing modalities as they exit the public transportation system and seek to ﬁnish their personal multi-modal trip. Agents move on a multi-modal road network where dynamic constraints in route planning are evaluated based on an agent’s query. Modality switch points (MSPs) along the route indicate the locations at which an agent can switch from one modality to the next (e.g., a bike rental station to return a used rental bike and continue on foot). The technical implementation of MSPs within the road network was a central focus in this work. To test their efﬁcacy in a controlled experimental setting, agents optimized only the travel time of their multi-modal routes. However, the functionalities of the model enable the implementation of different optimization criteria (e.g., ﬁnan-cial considerations or climate neutrality) and unique agent preferences as well. Our ﬁndings show that the implemented MSPs enable agents to switch between modalities at any time, allowing for the kind of versatile, individual, and spontaneous travel that is common in modern multi-modal settings.


Introduction
A smart and varied mobility mix is one of the key issues in developing effective approaches to sustainable urban development [1]. In the last few years, mobility patterns in urban areas have grown more complex [2]. Firstly, the typical set of stops (home → work/school → home) has become increasingly broken up into longer chains with multiple subroutes [3]. Secondly, new mobility solutions such as shared or on-demand vehicles have grown in popularity (e.g., [4]). These developments lead to the concept of Mobility-as-a-Service [5,6]. The growing complexity of mobility provision and its impact on urban development needs to improve by employing intelligent transport systems (ITS) [7]. Hamburg, Germany is an ITS model city and host of the ITS World Congress 2021 [8]. The city authorities have designed an ITS strategy to integrate individual traffic and public transport into one traffic management system. The main goal is to shift as many individual trips as possible to public transport or other mobility solutions, increasing overall sustainability. To promote the reliability and stability of public transport, the senate has devised the Hamburg-Takt: a plan to implement transport at intervals of no more than five minutes from anywhere in Hamburg 24 h a day and seven days a week. Along with that, there are current plans to set up a mobility infrastructure with up to 70 locations designated by the Hamburg Transportation Association (HVV) that offer an easy transfer between public transportation options and several shared modalities. We refer to such a location as an HVV switch point. The aim is to encourage travelers to readily use public transport in combination with multi-modal travel outside the public transportation system, altogether lowering emissions and reducing traffic load on the roads. Kellinghusenstraße, a subway station and the study area of this research, is one such HVV switch point and showcases the intended developments well. Here, public transport is linked to shared and on-demand mobility systems by offering a bike infrastructure, including a bike parking facility. Traffic is the result of individual decisions made by each traffic participant, given the set of options and mobility offers available. Therefore, and despite the aforementioned improvements, planners continue to be confronted with many conflicting demands and requirements [9,10]. There remains a need for models to both study and understand the status quo and predict the efficacy of future initiatives. Agent-based models (ABM) are a well-known approach for modeling complex systems and patterns that emerge from individual behavior [11,12] and, particularly, a viable tool for studying how to combine the strains of sustainable and smart urbanism effectively. For instance, for Nottingham, United Kingdom and Sofia, Bulgaria, the agent-based paradigm was employed to model a multi-modal traffic management architecture [13]. For Barcelona, Spain, an ABM was developed to emulate a bike-sharing system [14]. In this article, we present a multi-modal model of the traffic flow in Hamburg, Germany, around an HVV switch point to study how different participants interact with a set of given multi-modal travel options and plan their trips. The model, like the one developed in Ištoka Otković et al. [15], focuses on humans and their mobility decisions. However, while her work [15] is based on field research, this work is more concerned with the technical integration of multi-modal path chains into ABMs. We used the MARS Framework, an agent-based simulation system that is capable of integrating various multi-modal and spatio-temporal data into models (for more technical details, see [16,17]). The model and validation method is rooted in publicly available spatio-temporal data from the Urban Data Hub Hamburg 1 and the traffic portal of Hamburg [8,18]. The data contain information on traffic networks for motor vehicles, bicycles, and pedestrians, building locations, parking areas, locations of bike-sharing station, and a history of traffic volume. Due to the data-driven approach, such models offer a solid foundation for studying what-if scenarios and the potential impact of future initiatives in a simulative setting of a real-world environment. This seems particularly true when considering that, in the future, high-traffic locations that enable modality transfers-such as the HVV switch point Kellinghusenstraße-will need to offer services such as booking and advance payment of an entire multi-modal trip, information extracted from real-time data (e.g., weather data pertinent to trip planning), scheduling delays of public transport modalities, and a navigation for pedestrians [19]. Insights gained from the analysis of simulation data can make valuable contributions to satisfying decision support needs and improving the implementation process of such endeavors.

Study Site
This study took place in the city of Hamburg, Germany. The city's authorities are eager to tilt the general use of travel modalities towards being more varied and sustainable. The intention is to reduce the number of kilometers driven by motor vehicles-currently on average 14 km per person per day in German metropolitan areas [18]. One of the key strategies for better integration of public transport and on-demand, shared, and other modalities is to increase the number of locations at which travelers can switch from one modality to another (e.g., a public transport station or bike rental station) throughout the city. We refer to such locations as modality switch points (MSP). At certain subway stations, for example, the HVV offers an easy transfer between several modalities. Therefore, an HVV switch point constitutes an example of an MSP.
At the subway station, Kellinghusenstraße, different urban mobility offers are available to more than 80,000 public transport passengers who pass through per day. Roughly 50% of these travelers transition here during rush hour, that is, between the hours of 6:00-8:00 or 16:00-18:00. Divided evenly over the four hours, this means 10,000 travelers per hour or 167 travelers per minute. Many travelers switch to another subway (lines U1 or U3) or bus line (lines 22, 25, or 26), thereby remaining in the public transportation system. Roughly 10%, however, exit the public transportation system here to continue their trip via other means. Our model is focused on these 10%. For these travelers, there is a varied offer of modalities. In addition to using a car-sharing service or one's own car, roughly 500 bicycles are used here per day (most of them during rush hour). Bike and ride (B&R) station parking offers 600 parking spaces for bikes in a parking garage as well as an additional 400 spaces outside, making for a substantial advantage for bicycle riders. Nearby, there is also a bikesharing station (StadtRad). To facilitate travel by bike even further, Kellinghusenstraße has a direct link to the newly created Veloroute 13. This bicycle-only ring route spans 14 km and goes through the inner-city districts of Altona, Eimsbüttel, Winterhude, Barmbek, Hamm and Eilbek in Hamburg. For cyclists, it is a valuable addition to Hamburg's regular bicycle travel network.
The travelers who exit the public transportation system at Kellinghusenstraße on a typical workday can be divided into three groups in terms of the main modality they choose to continue their trip: 50% by bike, 40% on foot, and 10% by car [18,20]. We consulted with transportation companies and bike-sharing as well as ride-sharing service providers to derive a more detailed stratification from these numbers. The 10% who travel by car can be broken down into 50% who drive their own car [21] and 50% who drive a shared car [22], translating to 5% and 5% of the total number of travelers, respectively. The 50% who travel by bike are divided into 90% who use an owned bike [23] and 10% who use a shared bike [24], making up 45% and 5% of the total number of travelers, respectively. The 45% who use an owned bike can be broken down further into 40% who park their bike outdoors and 60% who park their bike indoors. We consider these numbers during the parameterization and validation of our model.
In our model, agents exit the public transport system at Kellinghusenstraße to continue their trip to a randomly selected point of interest (POI) within a radius of 1 km. Figure 1 illustrates the different modality-specific travel networks within the study site, while Figure 2 shows the circular simulation area resulting from the radius and the POIs available within it. To reach its chosen POI, each agent devises the best multi-modal route in terms of duration and availability at the time of trip planning. There are five modalities to choose from: Own Car, Shared Car, Own Bike, Shared Bike, and Walking. Walking is part of every multi-modal trip and a fallback modality that can be a stand-alone travel solution if it provides the shortest travel time and/or no other modalities are available. Within a multi-modal route, we refer to the agent's non-walking modality as its main modality. The simulation time is 16:00-17:00 of a regular workday. During this time, 15 agents exit at Kellinghusenstraße per minute. We derive this number from 10% of 167 passengers who pass through the subway station per minute during rush hour. In total, there are 900 agents per simulation.    Figure 3 shows the travel flow from Kellinghusenstraße to a chosen POI and the different multi-modal (or single-modal) constellations that each agent can choose from to make its trip. Every multi-modal trip includes a Walking component. While some agents might choose to make their trip exclusively on foot, they can also choose to ride an owned bicycle or car or and shared bicycle or car, depending on personal ownership and current availability, respectively. In this figure and in the diagrams throughout the paper, we use the following color scheme to refer to the five modality types: Walking → gray; Own Bike → green; Shared Bike → olive; Own Car → brown; Shared Car → orange Switch Point Kellinghusenstraße modalities planning trips next POI ? Figure 3. Available modalities and the path chains resulting from the available combinations of modalities.

Methodology
In this section, the process of implementing the scenario described in Section 2 is outlined. The concept of multi-agent simulations is considered to represent the physical world, using an existing multi-agent framework. Furthermore, the data integration mechanism developed to feed data into the model is described.

Multi-Agent Simulation
Multi-agent simulation applies the concept of multi-agent systems for simulation in which active agent components have individually specified behaviors. This individual perspective enables investigations of emergent phenomena with dynamic interactions between agents. The concept is a part of microscopic simulation and differs from other methods by applying a discrete execution of pro-or reactive agent logic instead of solving a dynamic equation using a numeric approximation approach. Multi-agent simulations are commonly used in sociology, traffic physics, or evacuation simulations where agents act in a simulated spatial environment. The physical world has its digital representation, allowing spatial operations such as range queries, and as the environment changes over time, temporal changes are applied to keep a consistent state.

Simulation System
The Multi-Agent Research and Simulation (MARS) framework provides an ecosystem for developing multi-agent simulations based on the Modeling and Simulation as a Service paradigm [25]. End-users can create their simulations in a variety of ways and execute them directly on their machine or in the dedicated MARS cloud [26]. The system is designed to serve in cloud-native environments, scaling up the simulations and considering update-intensive state management. Results are persisted in multiple databases or files, subsequently processed for usage in visual analytics boards and available visualization tools [16,27].

Model Realization
In order to implement the model, we use the existing MARS framework for spatiotemporal data processing in multi-agent simulations [28]. We differentiate active and passive model elements with their respective domain-oriented data management and applicable operations. Actions originate from agents and use information from other agents and the environment. Action logic concludes with changes in states of respective objects and can result in new actions in the next simulation step. Active components of the model are agents and events that can occur externally, whereas passive components include the representation of environmental information. In the following, we describe the respective model components in detail.

Environment Representation
The system represents the model by utilizing different geospatial layers. Different layers represent individual facets of the simulation area, which can be queried individually by agents (see Figure 1). Agents use query results for decision-making regarding POIs, modalities, and routes. The simulation domain includes the following facets: • Multiple LINESTRING networks to map exact paths in the urban area on which agents may move; • POINT bicycle rental stations to select a Shared Bike from the available capacity; • POINT B&R stations to map individual parking spaces for Own Bikes; • POLYGON buildings to map building cross-section areas. Each cross-sectional area has perimeter areas representing individual pedestrian and bicycle paths and parking spaces; • POLYGON parking bays to map available vehicle parking spaces for Shared Cars and Own Cars.
The parking layer holds distinct objects such as individual lots or bays along the boundaries of the buildings POLYGONS. Parking lots can be occupied by one or a few vehicles, depending on the available area. Parking bays can be occupied by multiple vehicles depending on their respective length to the length of the bay. This differentiation is required because not all data of parking areas in a city is available. Instead, we merge individual lots with road cross-section areas and buildings.

Environment Operations
In MARS, environmental information is represented using vector-layers. Each vectorlayer allows importing of heterogeneous inputs. Inputs can be static or dynamic. Static data objects have no time reference, whereas dynamic data objects are linked to a validity period that restricts the visibility and access to their state to the respective time range (e.g., the number of Shared Bikes available at a bicycle rental station). The vector-layer allows querying data from geospatial datasets via the following operations: • Point-Location Queries for a set of data objects that intersect with the given coordinate; • Window-Queries (WQ) to retrieve a set of data objects within the extent of a bounding box given by a lower-left and upper-right coordinate. Data objects which intersect with the box, that is, their supporting coordinates are within the box, are returned; • Distance-Range Queries providing circle queries in which a WQ is combined with a given radius, building a circle around a source point; • Constrained K-Nearest-Neighbor (CK-NN) queries of k elements that are the most similar or closest objects in space over the given distance function of the vector-layer and applicable for a given predicate optionally.
All operations are implemented via a Patricia Trie and allow accelerated access to geospatial data. We utilize the GeoHash approach in order to compute hash values for individual raster cells of the simulation area. The GeoHash encoding technique uses grid partitioning proposed by Gustavo Niemeyer. Given a longitude and latitude, the Geohash is derived by interleaving bits and then converting the bits to a string using a base-32 character map. Each character indicates a more precise grid cell of the earth [29] that provides a 1D value, such as i1x0g7, and is inserted into a Patricia Trie [30]. Figure 4 shows the mapping of 1D-GeoHash cells to nodes within the trie, building the hierarchical structure for efficient lookups.  The Patricia trie stores character strings efficiently by compressing the same suffix and prefix values into one node. This prevents additional splits of nodes when only considering single characters, as done in regular tries. Each operation is wrapped over a selection of nodes within a window and subsequently implements the corresponding semantics. Therefore, we compute the most significant available window, restricted to the precision (number of bits) of the GeoHash, enclosing the requested area. Then, we transform the query into a prefix query for the trie by selecting the parent node responsible for the desired area and return an iterator on the values within this scope. Further information about the operations and the index representation in the system is described in [16,28].

Event Scheduling
The input of events into the simulation is provided via a temporal resource supplemented with spatial data. The goal is to create new agents at runtime within different cycles in the simulation system or to trigger other events.
With the help of a scheduling input, the validity of event actions can be triggered by specifying periods with a start time and an end time. Each action is executed recurrently or once in the simulation, triggering events and observing objects or the creation of agents within the space.

Agent Movement
The model implements the movement of agents by utilizing a spatial graph, denoted as Spatial Graph Environment (SGE). The SGE abstracts the moving space and reduces the freedom of re-positioning to defined paths within a network. For this purpose, the SGE consists of several individual graphs, each representing different modalities in space. Agents insert themselves into one SGE and move along network edges. When an agent reaches a node that holds one or more modalities, it can switch from its current modality to another one. These nodes represent MSPs in the model. For example, a walking agent can reach a node at which a bicycle rental station is located and obtain a Shared Bike, if available at the time of arrival. An Own Bike, on the other hand, can be picked up or dropped off by an agent anywhere within the SGE. Figure 5 exemplifies the representation of the environment with edges and intersection from the road and pedestrian network, such as the network in Figure 2. The environment is represented as a graph, consisting of nodes (intersections) with respective input and output edges (roads). Each edge consists of a set of lanes that are indexed from l 0 , ..., l n starting from the center. Objects are placed on the edges and can move back and forth along them. Lane change maneuvers on the same edge and across edge boundaries move the object to the left or to the right. More precisely, the Move operation of the SGE describes moving along a given route consisting of the edges in the network with an optional desired lane index. The SGE performs the Move operation of multiple agents concurrently and checks actions for possible collisions. Collisions occur when the 1D length of one agent collides with the 1D length of another agent. Detected collisions prevent the involved operations from executing completely, causing the SGE to provide a FIFO 2 consistency model [31] for all agents and actions. Agents bound to the network are constrained to the network topology and can move only in free spaces, such as roads and pedestrian paths. This restriction allows agents to perform route discovery and global path planning towards remote destinations. Due to strong binding to the topology, routes in geometric space (e.g., grassed areas) are not supported. This action requires agents to separate from the SGE and switch to a Cartesian environment for vector geometries, as shown in Figure 4. Then, a geometric routing [32] allows the determination of a least-cost path in free space. However, the SGE can create routing mesh space as well, but this requires much more space and computing time for path planning.
An intersection connects multiple incoming and outgoing edges. If no mapping of the incoming edges e i to the outgoing edges e j is given, the SGE approximates the crossings in terms of angles. Sharp angles prevent linkage, whereas open-and right-angled transitions allow linkage. Once an agent crosses over and passes an intersection via Move, the SGE assigns the agent to the specified or approximated lane l i of the edge in a given route.
Adapted from the read operation in Section 3.3.2, the SGE provides three main operations for the model to find other agents or network elements within the graph. The Explore operation is similar to the WQ of the index in Figure 4. Instead of intersecting a region, the operation returns an ordered sequence of objects along with the edge's position based on their 1D positions on the trace l i . Nearby objects are determined starting from a given position in both forward and backward directions. The NearestNode operation allows a CK-NN query to find nodes. Agents use these results for route planning as well as entry points into the SGE. The operation searches for k nodes near the starting point and selects those objects matching a given predicate. The FindRoute operation determines a least-cost path for a given heuristic (e.g., travel time reduction given permitted maximum velocity) that can be used for movement within the network. The SGE computes multi-modal routes by linking multiple subroutes across one or more graphs, depending on an agent's vehicle capabilities. For route computation, we use directed A* search with Landmark Triangle Inequality preprocessing [33] to reduce import and computing time.

Planning Algorithm
Every agent selects on arrival at Kellinghusenstraße a random node on the walking graph (SGE) as its POI. Independent of this POI, agents may own a car or bicycle or otherwise prefer to rent either of them. These personal characteristics are randomly assigned based on the statistical distribution described in Section 2. Given the available means of transportation, agents calculate different routes incorporating their MSPs like rental stations or parking spots (integrated into the model by their respective layer) and then choose the cheapest alternative in terms of travel time as one example. Figure 6 illustrates the sequential order of considerations made by an agent during decision-making process. The resulting routes are inter-modal, meaning that each of their subroutes is linked to a specific modality type. The modalities represent the different transportation devices of the model, which execute their movement on the respective environments (see Figure 1). By switching from one subroute to another, a context change has to be performed. Semantically, this means that the agent switches into (or out of) a vehicle. Technically, the MSPs have to be found by the agent by accessing the respective vehicle layer and fulfilling the requirements of the immediate situation.
Own Cars and Shared Cars can be found on parking bays, which can be reached via the shortest walking route. When approaching a car, the agent leaves the walking graph and enters the car by fulfilling certain checks: the agent has the skills required to drive the car, the car is not occupied by someone else, and the car is close-by (proximity). On departure, the car leaves its parking space and enters the drive graph on which it proceeds in accordance with driving rules (traffic rules and speed limits), physical realities (acceleration and deceleration), and traffic volume. Agents have to fit their travel plans into pre-simulated regular traffic and parking space availability, which might affect travel times by car and the search for a parking space.
Speed limits are imported into the model with the graph structure of the simulation area, which are represented by the street environment. Traffic rules are part of the internalized behavior of agents, which is encapsulated in a so-called VehicleSteeringHandle. This handle also takes care of reasonable acceleration and deceleration by using a car-following model for accident-free traffic. Cars use the Intelligent Driver Model [34], whereas bicycle acceleration behavior is based on the human-factor model in [35]. Cars can be parked in a free parking spot near the POI. If the targeted parking spot is occupied on arrival, then the agent re-plans and searches for the next available parking spot. On reaching a free spot, the car leaves the graph and enters the parking spot. Finally, the agent leaves the car and walks to the POI.
Using an Own Bike, the agent can cycle directly to the POI (and park it there). The retrieval of the bicycle depends on its whereabouts. If a bicycle is locked in a B&R box, it has to be extracted; otherwise, if parked on a sidewalk node, the agent can use it directly. Shared Bikes are located at their respective rental station and have to be reached on foot. Likewise, they must be returned to a rental station near the POI, implying a final sub-route on foot. If a bicycle rental station has no free Shared Bikes, then the agent adapts its plans and moves to the next station with available bicycles. Returning a Shared Bike is always possible regardless of the rental station's occupancy.

Results
The results shown here summarize the simulation of 900 agents, repeated 100 times. Therefore, they comprise 90,000 agents in total, each of which has individually chosen the best combination of modalities in terms of travel time and availability of modalities to arrive at its POI. We processed simulation result and generated plots using Python v3.9.6, pandas v1.3.1, and Matplotlib v3.4.2. Figure 7 shows the distribution of chosen main modalities. The majority of agents (43.0%) took an Own Bike to get from the HVV switch point to their respective POI. Only slightly less (42.7%) walked from the HVV switch point to their POI without resorting to any other modalities, opting for a single-modal trip. Shared Bikes (10.0%) were the most frequently used modality among the shared modalities by a wide margin, followed by Shared Car with only 0.7%. Similarly, the use of Own Cars (3.6%) is substantially less than that of Own Bikes. In Figure 8, the observed average distribution of main modalities over 100 simulation runs is compared to the expected values based on the model parameters. The percentages that make up the hatched bars are obtained from our research of the study site (see Section 2). The comparison illustrates the extent of independence in each agent's decision-making process: although the model parameters influence the agents, each agent determines the optimal combination of modalities individually and based on the circumstances it is presented with at the time of planning its trip. Given the short travel distances available in the model, the use of Shared Cars is underrepresented in the main modality distribution. Instead, Shared Bikes were used more than expected. Likewise, the single-modal option Walking was chosen more frequently than expected based on the parameters. Figure 9 shows the distribution of modalities and its deviation, highlighting the extent to which the random selection of POIs and the agents' ownership of bike or car may account for differences in results across simulation runs. The random selection of POIs by agents leads to differences in results across simulation runs. Still, there appear to be no outliers, indicating that the simulation runs altogether produced a reliable and representative result.

Overview
The data shown in Figure 10 highlight that agents who chose Walking as their main modality do not incur any additional travel time as a result of detours; rather, they walk from the HVV switch point directly to their respective POI. By contrast, the highest amount of added travel time is observed with agents whose main modality is Shared Bike. Taking a multi-modal trip that involves this station-based modality requires a trip on foot to reach the nearest bicycle rental station that has at least one Shared Bike available. Then, the agent must travel to another bicycle rental station near the POI to drop off the Shared Bike. From here, the last leg of the trip to the POI is taken on foot. Traveling with a free-floating shared modality such as a Shared Car, on the other hand, involves on average substantially lower added travel time. Here, the added travel time tends to be spent in search of a designated parking space. The designation of these spaces might account for the slightly shorter added travel time of Shared Car compared to Own Car, as the latter does not have designated parking spaces.       Figure 12 compares the use of Own Bikes and Shared Bikes across the simulation runs. Agents were rather unwilling to opt for Shared Bikes, presumably because this stationbased modality adds additional travel segments-getting to and leaving from a bike rental station to rent and drop off a bike, respectively-to the total travel routes. The use of Own Bikes is much higher due to the impact of the model parameters on the planning algorithm.  Figure 13 compares the use of Own Cars and Shared Cars. In general, driving by car-and especially by Shared Car-was an unpopular option in our scenario. This is partly due to the inner-city setting of the modeled HVV switch point and the associated cost and difficulty of parking one's car near the subway station to pick it up at a later time. Furthermore, the short travel distances available in the scenario seem to have made cycling modalities and travel on foot more worthwhile options than driving by car.

Discussion
We developed a multi-modal traffic model focused on agents that exit an urban subway station. The model is configured and parameterized with geographically relevant real-world data and historical multi-modality distribution data from the City of Hamburg [8,18,20,22,23,36,37]. We intend for the simulation output to offer insights into the behavior and decision-making of travelers in urban settings and the distribution of mobility choices, particularly with respect to multi-modal travel. The complexity of modern mobility is exacerbated by increasingly long path chains [3] and a growing number of mobility offers. MaaS should enable every resident and visitor of Hamburg [8] to spontaneously select from a varied assortment of modalities when planning trips in and around the city. A side effect of this is that clear-cut movement patterns become fuzzy [3]. Still, this adaptivity of human behavior can be modeled particularly well with multi-agent systems [38,39]. Traffic emerges from many individual decisions, making prediction and planning efforts difficult. To foster such efforts, spatio-temporal data, human behavior and human behavior and experience need to be coupled. The presented model should be viewed as merely a first step in this direction. The simplifications discussed below result from the fact that the main focus was on assuring a sound technical implementation.
An intuitively explainable but nonetheless noteworthy observation from the results-which serves to validate the planning and route finding algorithm-is that agents that chose Walking as their main modality did not use any other modalities during their trip (see Figure 10). A key contributor to the high percentage of agents who opted for Walking (see Figure 7) is the relatively small simulation area (see Figures 1 and 2) within which agents were able to choose a POI to travel to. Widening the model's simulation area would certainly lead to a more balanced modality distribution and, particularly, to more agents choosing a motor vehicle as their main modality. One might therefore argue that our model's configuration gives its planning algorithm an inherent bias towards recommending Walking to agents. Analogously, however, agents in a similar multi-modal traffic model with a particularly large simulation area might experience a bias towards motorized modalities. We view the high average percentage of Walking agents as being in favor of our model: in the model's real-world counterpart, many of the travelers who exit at Kellinghusenstraße and have a short travel distance to their POI are likely to cover that distance on foot as well. Here, it should also be mentioned that POIs chosen by agents whose main modality was Walking were equally distributed throughout the simulation area. In other words, the travel distances of agents whose main modality was Walking were fairly equally distributed from very low to very high. One might expect such a distribution to be hyperbolic: a dense cluster of POIs around the HVV switch point and a rapidly decreasing density as travel distance increases. We argue that this otherwise expected observation was suppressed by the 1 km radius, and that a simulation with a larger radius would produce such a distribution for agents whose main modality is Walking.
A similarly high percentage of agents chose an Own Bike to ride to their POI (see Figure 7). Historically and well before the state-subsidized implementations of bike-sharing concepts, Hamburg has been known as a bicycle-friendly city, boasting many dedicated and well-maintained bicycle paths and public bicycle parking facilities. The observation that many agents chose a cycling modality is due to both the size of the simulation area and the fact that the HVV switch point is designed to attract bicyclists (as described in Section 2). The latter accounts for the high percentage of bicycle owners defined in the model parameters (see Section 2). This, in turn, resulted in a high percentage of agents who chose to ride by bike-as the planning algorithm offers agents with an Own Bike to ride it to their POI unless walking there is faster (see Figure 6).
The high percentage of bicycle owners is also one of a few factors that might explain the relatively low percentage of agents who chose a Shared Bike as their main modality. The planning algorithm does not offer agents who own a bicycle the option of using a Shared Bike. We base this implementation detail on the assumption that a traveler who arrives at the HVV switch point where he/she has previously locked an Own Bike is unlikely to continue his/her trip via a Shared Bike. Per default, this reduced the share of agents that could be offered the Shared Bike modality by 40%. Furthermore, Shared Bikes being the only station-based modality included in the model, agents who used it incurred, on average, a substantially higher amount of time traveling on foot (see Figure 10). This is due to having to walk to a bicycle rental station to obtain a Shared Bike and having to walk to the POI after having dropped off the Shared Bike at another bicycle rental station. Depending on where the bicycle rental stations are located, the distances spent walking can vary significantly. These travel distances can be minimized by (1) strategically placing bicycle rental stations at optimal locations, and (2) optimizing the number of bikes per rental station to minimize the amount of time any bicycle rental station is empty. The planning for both of these endeavors can be aided by models like the one presented here. Alternatively, free-floating bike sharing systems can be implemented, enabling travelers to drop off their rented bicycles anywhere in town rather than only at designated stations. However, these systems are prone to issues such as illegal parking and low utilization [40] and therefore require other considerations during the modeling and implementation process.
We expected the usage of Own Car and Shared Car to be relatively low. Results across all simulations unanimously confirm this expectation (see Figure 11). As defined in the model parameters, only a small percentage of agents parked a personal vehicle near the HVV switch point. This is due to the fact that there are very few reliably available car parking opportunities in the near vicinity of the HVV switch point. By design, the subway station Kellinghusenstraße is geared towards travelers and commuters who use cycling modalities and public transport (see Section 2 for details), resulting in only a small minority of the total number of transitions through the switch point to be by car. This trend is exacerbated by the size of our simulation area: it reduces the probability that agents opt for motorized modalities, as their short-distance trips can often be made on foot or by bicycle in a similar or even shorter amount of time. Finally, the total travel time is increased by both the amount of time spent in search of a parking space and the subsequent subroute from the parking space to the POI. This is especially true when using an Own Car because there are no designated parking spots for privately owned vehicles. However, companies offering Shared Car services have designated parking spots and parking areas for their vehicles, reducing the probability of a lengthy search for a parking space.
Summarizing the discussion of results, we find that the average distribution of modality choices across simulation runs is fairly realistic, validating this aspect of the model. The real-world modality distribution we used for baseline comparison (see Figure 8) confirms this finding. We attribute the imbalances in the distribution to the size of the simulation area and find that it aligns with our expectation of mobility choices made by real travelers, given the short distances between the HVV switch point and potential POIs in the model. Based on the findings, we argue that the model is ready for being employed in other settings and to address broader inquiries. Still, an even closer alignment between simulation data and real-time data would be beneficial to increasing and maintaining the model's validity. For instance, the city of Hamburg is currently in the process of developing a bicycle and traffic counting network [8]. Data obtained from this system could provide a richer baseline data set to compare simulation outputs to. While we are fairly confident of the data we used to parameterize and validate our model (see Section 2), such a rich source of information would likely offer more varied and reliable parameters and validation data for our model. Another worthwhile approach to enhancing the model is to establish a real-time data link to its real-world counterpart [41]. Such a link could allow for mid-simulation data streams from real-world data sources (e.g., sensors networks that are part of the Internet of Things (IoT)) into the model, enabling real-time correction of inaccuracies that might accumulate as time progresses in the simulation. This would help to keep the simulation trajectory in line with real-time developments, making for more valid and truthful simulation results and transforming the model into a Digital Twin (DT) of its real-world pendant [17,42].
Along with the limits imposed on the model by the size of its simulation area, there are other noteworthy limitations that we hope to mitigate in future iterations. Given that this is a multi-modal model, one of its shortcomings is that not all reasonably conceivable mobility choices are available (see Figure 3). Specifically, it is currently not possible for an agent to devise a multi-modal trip that consists of subroutes taken both by bike and by car (in any order). Suppose that this model had a larger simulation area and an agent that has neither an Own Car nor an Own Bike wants to travel from the HVV switch point to a remote POI. It is reasonably possible that the optimal multi-modal route for this agent is to take a Shared Bike from the HVV switch point to a free-floating Shared Car that is not within walking distance and to continue the rest of the trip by car (with subroutes on foot at the beginning and end of the trip). This modality constellation is currently not considered by the model's planning algorithm. We felt that it is one of the less likely use cases, and therefore omitted it from this version of the model. Its availability would result in a more comprehensive selection of mobility choices for the agents. Furthermore, while the model design and implementation is informed and verified by pertinent real-world data, we should point out that the model has been developed by a team of computer scientists with little domain expertise in traffic modeling, analysis, or research. Consulting with domain experts during the design and development process-rather than merely the for data acquisition-would very likely enrich the model in various ways. Lastly, this being an agent-based model, one informative way to assess its quality is to review the internal structure and behavioral complexity of the agents. In terms of cognition and decision-making, the model's agents are equipped with rudimentary internal logic geared towards making a modality choice by perceiving external information and processing it in a pre-defined sequential order. The only agent-internal component that might be indicative of a human quality is a preference towards a modality (see Figure 6). While the focus of this exercise was mainly to produce a successful technical implementation of the dynamics of multi-modal travel, we find it indispensable to explore ways to make the agents' decision-making and behavioral logic more layered and intricate in future versions of the model. Modeling human behavior at a sufficiently specific level is necessary for drawing meaningful conclusions about humans' potential concerns, considerations, and behaviors from simulation results. The work presented here is intended to enable interested parties and traffic experts to explore different scenarios, preferences, and mobility constellations by using the model themselves. The model can be obtained at the link https://git.hawhamburg.de/mars/model-deployments/-/tree/master/SOHKellinghusenBox (Accessed on: 30 October 2021) and configured as needed. With this approach, the authors would like to illustrate a form of collaboration with traffic experts in the context of decision support.

Conclusions
This work shows that behavior related to mobility transfers can be modeled such that it aligns with real-world observation. This is indicated by the distribution of modality choices that emerged from the simulation runs (see Figure 8). While the focus was on the technical implementation, one of the key outcomes is that the model enables the simulative recreation of the dynamics of MaaS. There is no doubt that humans and their individual decisions impact traffic patterns. In the future, mobility will become increasingly varied and complex. In this first attempt, only the temporal component of travel was used to define the mobility distribution. Other attempts and models might factor in financial, environmental, and other components. One of the advantages of the model presented here is that the setup does not need to be re-tailored to suit other hypotheses. Rather, only the preferences within the agents or only within a group of agents needs to be adjusted. Likewise, other mobility offers and modalities can be readily integrated into the model and existing ones can be reconfigured. This makes it apt for analyzing a range of scenarios, such as the impact of undesirable situations or the efficacy of potential initiatives. Examples include not having enough available shared modalities and installing new bicycle rental stations, respectively. Both avenues can produce valuable insights for promoting smart urbanism, sustainability goals, and improved traffic management. Bearing in mind that the agents' current internal logic is far from sophisticated enough to mirror human thought and decision-making processes, we have shown that the model configuration and the travel planning algorithm produce an expected distribution of modality choices. Upon this baseline performance, the expressiveness of the agents can be improved. Another promising enhancement is the implementation of a wider range of modalities and possible modality combinations. We have implemented regular bicycles; but station-based as well as free-floating e-bikes, scooters, Segways, mopeds, and other similar modalities are gaining traction in urban environments. Ride-sharing concepts (e.g., MOIA in Hamburg) are becoming increasingly established alternatives to public transport [4]. Connected and Autonomous Vehicles (CAV) are entering the mainstream, promising to reshape transport and become a cornerstone of smart mobility [7,43]. Due to their novelty, these and other modalities are especially interesting objects of investigation in model-based research.
Generally, a model strives to capture the relevant aspects of its real-world pendant as accurately as possible while forgoing as few relevant details as possible. This is especially true for models like the one presented here, which are by design restricted to a specific geographic context and setting. Such models risk succumbing to overspecialization, being too closely fitted to one setting to be applicable to and valuable in even slightly different settings. Despite our model being configured for a specific geographic context and parameterized with corresponding data and modality distributions, however, we argue that its core functionalities and algorithms are readily transferable to other urban settings. The main challenge of transferability lies in the availability of data for the setting in which the model is to be applied. Another advantage of our approach is the simple adaptivity to other urban regions. With the right data set and some tweaking of the model-internal parameters, multi-modal simulations similar to the ones carried out for this research can be run in other geographic settings, allowing for the study and analysis of local circumstances and initiatives.  Data Availability Statement: An executable version of the model is provided under https://git. haw-hamburg.de/mars/model-deployments/-/tree/master/SOHKellinghusenBox (accessed on 30 October 2021). It enables parametrizable model runs of the scenario described in this paper.