Introduction

About 77% of today’s inland freight traffic in Europe is operated on the road system, followed by rail with 17%, and inland waterways with 6% (Eurostat 2022). In Switzerland, road freight transport accounts for about 92% of the total inland freight transport (ARE 2021; BFS 2019a, 2019b). In terms of quantity, the dominant Swiss inland transported merchandise groups are (i) ores, stones and earths (29.8%), (ii) small general cargo (18.7%) and (iii) building materials and glass (10.3%) (ARE 2021).

In comparison to rail transport, road freight transport is typically described as more flexible but less efficient in terms of energy consumption and required personnel resources per ton. Furthermore, the environmental impact per ton-kilometer is much larger for road transport compared to the railway system (see e.g., Garcia-Alvarez et al. 2013; van Wee et al. 2005; van der Meulen et al. 2020). Even in the case of fully decarbonized road transport, negative external effects remain, e.g., non-exhaust air pollution (Kaddoura et al. 2022), noise, and accidents. In addition to these effects, the large prevalence of freight road transport also burdens passenger road traffic and contributes to the overall welfare loss due to traffic congestion.

This study addresses intermodal road and rail freight transport which is defined as the combined usage of both the road and rail system during the same trip. Since in most cases the trip origin and/or destination does not have direct rail access, the rather flexible road system is ideally used for the initial and final leg (first/last mile) from the trip origin to the terminal and from the terminal to the trip destination. In contrast, the rail system is used for the intermediate and rather longer part of the trip between the terminals where containers are loaded from heavy goods vehicles (HGV) to trains and vice versa. Depending on various variables such as the entire trip distance, the distance from and to the terminal, the cargo train schedule as well as the cost factors, intermodal road and rail transport may yield a significant reduction in shipping costs compared to road only transport.

Literature review

In this study, an agent-based simulation approach is developed as a tool to investigate different cargo schedule and terminal concepts focusing on the potentials for intermodal road and rail freight transport. The developed tool makes use of the agent-based simulation framework MATSim (Multi-Agent Transport Simulation, http://www.matsim.org, Horni et al. 2016) which already has been used in various other freight contexts. Most of these studies focus on the road transport system only, e.g., the simultaneous simulation of commercial and private vehicles (Joubert et al. 2010), long-distance road transport (Lu et al. 2022), or address the logistics (Schröder et al. 2011) with several applications, e.g., for waste collection (Ewert et al. 2021a) or food retail distribution (Martins-Turner et al. 2020; Ewert et al. 2021b). For freight transport on the rail system, there are few applications of agent-based simulation approaches. In Bruckmann et al. (2014, 2016), MATSim was successfully applied to the simulation of single wagonload transport in Switzerland. The authors used their simulation approach to investigate various network and schedule concepts regarding the total amount of transported goods. In Bruckmann et al. (2014, 2016), a simplistic approach is used where transport demand is inelastic and the router only accounts for a rail as single network mode. In several studies, different simulation frameworks are used to investigate intermodal freight transportation. An overview and a multi-dimensional classification of the existing literature on freight transport simulation is provided in Crainic et al. (2018). Baindur and Viegas (2011) use the simulation software ANYLOGIC (https://www.anylogic.com/) to investigate the modal share of intermodal road/sea freight transport. Their illustrative case study only consists of a single corridor, and dynamic queueing effects are not accounted for. Gambardella et al. (2002) use a simulation approach to investigate intermodal road/rail transport focusing on the different phases within an intermodal terminal, including the queuing dynamics. Less focus is placed on the freight demand, which is a fixed number of units for which no user equilibrium is computed. Sakai et al. (2020) propose a different agent-based simulation framework which allows for applications in the logistics context, without explicitly addressing intermodal road/rail transport. Sirikijpanichkul et al. (2007) propose an agent-based approach to optimize the location of intermodal terminals, however, without simulating the queuing dynamics at intermodal terminals.

In several other studies, a methodologically different approach is chosen and mathematical optimization is used to address intermodal road/rail transport. Ke and Verma (2021) use a mixed-integer programming model to look into the disruption effects of intermodal road/rail freight transport in the United States. In their study, the total demand for intermodal transport is fixed and disruption costs are computed without explicitly simulating the queueing dynamics. Several studies address the optimization of road/rail terminal locations. Limbourg and Jourquin (2008) optimize the European hub-and-spoke network for a given set of potential terminal locations. Arnold et al. (2004) use a linear integer programming model to investigate the optimal terminal locations for intermodal road/rail freight transport in the Iberian Peninsula. Road and rail costs are found to have a significant impact on market shares for intermodal transport, whereas the terminal locations are found to have little or no impact on mode choice. Overall, most of the existing model implementations which address the design of intermodal road/rail transportation systems are rather simplistic and lack of realism (Basallo-Triana et al. 2021). A more advanced model is developed by Li et al. (2022) who compute a stochastic user equilibrium for the container freight transport between China and Europe and account for delay effects using bottleneck congestion functions and service capacity constraints.

In contrast to the existing research, the present study uses a simulation approach which addresses intermodal freight transport at the large-scale national level focusing on a detailed representation of transport supply, in particular both the road and rail transport network. The road network contains all roads, with detailed information about speed levels and traffic congestion. The rail system is represented by a detailed cargo train schedule and train capacities. Intermodal terminals are represented by a capacity constrained queue with predefined operation times. In contrast to most of the existing studies, the present study accounts for elastic freight demand by computing a stochastic user equilibrium. Demand elasticity is introduced by accounting for mode choice (road only vs. intermodal road/rail transport), time choice, and route choice, including the choice of the intermodal terminal hub. The proposed tool uses a recently developed intermodal and dynamic routing approach (Rieser et al. 2018) which has so far only been used in the passenger transport context (e.g.,Kaddoura et al. 2021; Müller et al. 2022). Going beyond the few existing rail freight transport simulation studies mentioned above, the newly developed modeling approach accounts for dynamic delay effects resulting from the cargo train schedule, capacity constrained trains, terminals and roads, and therefore contributes to a more sophisticated investigation of freight transport concepts.

Methodology

The developed approach makes use of the agent-based and dynamic simulation framework MATSim which is briefly described in section “Agent-based simulation framework: MATSim”. Section “Intermodal freight transport simulation context” addresses the application of MATSim to the intermodal freight transport context.

Agent-based simulation framework: MATSim

The proposed approach uses the simulation framework MATSim (Horni et al. 2016). In MATSim, each traveler is simulated as an individual agent. Agents are enabled to adapt to the transport supply to minimize an individual generalized cost function. An agent’s choice set is described by a set of daily travel plans. A daily travel plan typically contains the activity-trip-chains, modes of transportation and departure times. Depending on the enabled choice dimensions, various elements of the initially provided travel plan may be changed. The demand adaption process follows an evolutionary iterative approach which consists of the following three steps:

  1. 1.

    Mobility simulation: All agents simultaneously execute their daily travel plans and interact with each other (e.g., road traffic congestion, overcrowded public transit vehicles). MATSim uses a time-step based simulation approach which allows for a detailed consideration of queuing dynamics and resulting delay effects. Road segments (links) are simulated as First-In-First-Out queues with a limited outflow rate and storage capacity (Gawron 1998). If a transit vehicle is at maximum capacity, additional boardings are denied and agents have to wait for the next transit vehicle (Rieser 2010, 2016).

  2. 2.

    Plan evaluation: Each agent evaluates the executed daily travel plan taking into consideration a configurable generalized cost function which typically contains the travel time, monetary costs as well as departure and arrival time constraints or preferences.

  3. 3.

    Learning: A predefined share of agents is enabled to create a copy of an existing plan and modify elements of that plan according to predefined choice dimensions (e.g., route choice, mode choice, departure time choice). The newly generated and mutated plan will be executed and evaluated in the next iteration. All other agents select the plan with the (expected) maximum utility from their existing choice set to be executed an (re-)evaluated in the next iteration.

Repeating these steps enables the agents to improve and obtain plausible choice sets which approximates the user equilibrium.

Intermodal freight transport simulation context

This section describes how the simulation framework MATSim is applied to the freight transportation context. Each agent represents a TEU (twenty-foot equivalent unit) container which is either transported by a truck (road only transport) or a train (intermodal transport). As shown in Fig. 1, an intermodal transport trip consists of the rail access leg on the road system from the trip origin (O) to the start terminal (T1), the rail leg(s) between the terminals and the rail egress leg from the final terminal (T2) to the trip destination.

Fig. 1
figure 1

Intermodal versus road only transport from Origin (O) to Destination (D); with intermodal terminals T1 and T2

The agent’s generalized cost function contains shipping relevant cost components, including departure and arrival time constraints related to the supply chain (see later in Sec. 3.3).

MATSim’s default plan evaluation (see step 2 in section “Agent-based simulation framework: MATSim”) of activity scheduling decisions is replaced by a scoring function which accounts for time constraints and does the following:

  • Add a reward to the plan’s score if the container has arrived at the destination within the tolerated arrival time window.

  • Add a penalty to the plan’s score if the container has arrived at the destination later than the desired arrival time window.

  • Add a penalty to the plan’s score if the container has departed earlier than the desired departure time window.

The road and rail network are connected by intermodal terminals which are designed as shown in Fig. 2. The link from node CIN to COUT represents the terminal cranes which are modeled as First-In-First-Out queue. Each crane link has a limited outflow rate which corresponds to the capacity of the terminal, given by the number of containers that can be handled by the available number of cranes per hour. If a single crane requires for example 5 min to load a container from a truck to a train, the handling capacity per crane amounts to 12 containers per hour. The queue’s outflow rate is set to a constant value which implies the assumption that a crane’s handling time does not change with the overall number of queued containers. Each container agent which switches the mode of transportation has to pass the crane queue. The crane link is connected to both the road network (dashed lines) and the rail system (dotted lines). The crane link and connection links (solid lines) are simulated as road infrastructure of the terminal. R represents the nearest node in the real-world road network which is connected to CIN and COUT. The link from node LIN to LOUT is the link where trains stop, and wagons are hitched and unhitched. The actual cargo stop is located on node LOUT. This is also where container agents that have passed the crane queue wait for the cargo train to arrive. If the cargo train is at maximum capacity, waiting container agents are not allowed to enter the train. These agents are then queued and continue waiting for the next train to arrive. In addition to the queuing dynamics, there is a minimum travel time to pass all terminal links from CIN to LOUT or from LOUT to COUT.

Fig. 2
figure 2

Intermodal terminal with nodes (circles) and links (arrows) connecting the nodes

In this study, MATSim’s intermodal public transit routing module funded by Swiss Federal Railways (Rieser et al. 2018) which so far has only been used in the passenger transport context, is applied to the freight context. Container agents are routed on both the road network and the cargo rail system taking into consideration the detailed network characteristics (distance, travel time, traffic congestion) as well as the transit schedule (terminal locations, train departure times). The router also takes into consideration the crane handling fees at terminals as an intermodal transfer penalty. For the car legs, delays resulting from the queuing dynamics are translated into an average travel time per time of day which is then used by the router. The routing module can be configured in multiple ways which significantly affects the simulation results. For example, limiting the search radius of the car mode which is used as access and egress mode in combination with the train system will strongly reduce intermodal travel options.

Illustrative case study and simulation experiments

This section describes the case study in which the supply concepts and cost assumptions do not reflect any specific planning option but are of rather fictive origin to demonstrate the functionality of the developed modeling approach.

Transport demand

Demand generation

To generate freight transport demand for the year 2050, the Aggregierte Methode Güterverkehr (AMG) was used as a starting point (ARE 2019a, 2019b). The AMG model is implemented at the aggregation level of spatial mobility (MS) regions, which divide Switzerland into 106 units of intermediate, micro-regional scale. The regions are characterized by a certain spatial homogeneity and follow the principle of small-scale labor market regions with a functional orientation towards regional centers (BFS 2005).

The potential freight demand relevant for intermodal road and rail transport is based on the total projected merchandise quantity for the year 2050 and according to ARE’s baseline socio-economic scenario (ARE 2021). The dataset holds the merchandise quantity in tons for the origin and destination zone pair, the transport type (inland, import, export, transit), the merchandise group and the vehicle type (HGV, light vehicles, etc.). The data was generated by the AMG model with input parameters reflecting ARE’s baseline scenario. The demand per year given by the AMG model is then divided by 250 to obtain the road freight transport demand for a single working day. Freight demand relevant to intermodal transport further narrows the data to (i) inland transport only, (ii) road transport on HGVs only and (iii) exclusion of ores, stones, earths, and energy fuels from the relevant merchandise types. The resulting freight table is translated from tons into the corresponding number of TEUs using a fixed value for the average tons per TEU.

For each TEU per origin destination relation, an agent is created and an initial plan is added to the agent’s choice set. The plan contains two artificial activities freight_origin and freight_destination (see Fig. 3), and a trip which connects these activities. Activity coordinates are drawn using a weighted random draw along the spatial distribution of full-time equivalents in the second sector in the origin and destination regions.

Fig. 3
figure 3

Spatial distribution of freight trip origins (blue) and destinations (red)

The MS regions were intersected with the centroids of the STATENT hectare grid (BFS 2019c) and a spatial distribution of the variable B08VZATS2—full-time equivalent sector 2 was derived per MS region. Assuming that for short distances intermodal transport is less relevant, only trips with Euclidean distances above the threshold of 100 km are considered. In case of the freight_origin activity, a departure time is required. For this purpose, region-specific daily curves for HGV (type Lorry in the dataset) have been derived from the ASTRA road traffic count data (ASTRA 2021, see Fig. 4). Next, the traffic count locations were assigned to the MS regions and region-specific hourly vehicle frequencies were calculated. Regions without any traffic count stations were assigned the global day curve of all count stations. The assumption was made that TEU departure times follow the observed hourly patterns at traffic count locations in the origin region and that the temporal distribution in 2050 and today is the same. In addition, it is assumed that the daily pattern of inland freight traffic is identical to the pattern of all counted HGV.

Fig. 4
figure 4

Average (blue) and MS region-specific (gray) daily courses of measured HGV flows from ASTRA traffic counts for the second half of the year 2021 (ASTRA, 2021)

Utility functions

The following paragraphs address the utility functions used in the iterative simulation process described in section “Agent-based simulation framework: MATSim”.

For the evaluation of executed travel plans (see step 2 in section “Agent-based simulation framework: MATSim”), the following scoring functions are applied:

$${V}_{road}=-{c}_{s,road}\cdot {s}_{road}-{d}_{l}\cdot {c}_{l}-{d}_{e}\cdot {c}_{e}+{d}_{r}\cdot {c}_{r}$$
(1)
$${V}_{IM}={-c}_{s,roadIM}\cdot {s}_{roadIM}-{c}_{s,rail}\cdot {s}_{rail} - {c}_{u}\cdot u-{d}_{l}\cdot {c}_{l}-{d}_{e}\cdot {c}_{e}+{d}_{r}\cdot {c}_{r}$$
(2)

where V denotes the container agent’s utility, the index road refers the road only transport, the index IM refers to the intermodal rail and road modes, the index roadIM refers to the road leg of the intermodal transport trip, the index rail refers to the rail leg of the intermodal transport trip, cs denotes the distance-based monetary cost rate, s is the distance, and cu is the cost rate per transfer (road to rail, rail to road or rail to rail). d denotes a 0/1 variable with index l for arriving later than the desired arrival time window, index e for departing earlier than the desired departure time window and index r for arriving within the desired arrival time window. cl denotes the late arrival penalty, ce is the early departure penalty and cr is the reward for arriving within the desired arrival time.

The desired departure time and arrival time windows are set based on the road only transport alternative in the initial iteration which is considered as benchmark. The departure time directly results from the today’s temporal departure time distribution. The desired arrival time is the simulated arrival time in the initial iteration where all container agents use the road only transport. The time window is obtained by applying a configurable tolerance for early departure and late arrival, e.g., one hour which means that departing up to one hour earlier or arriving up to one hour later than the desired time of day is still considered within the desired time window.

For the routing relevant costs which are computed in step 3 of the iterative simulation approach (see section “Agent-based simulation framework: MATSim”), a slightly different utility function is used which does not contain the rather complex information about each agent’s individual departure and arrival time preferences, and instead contains a simplified consideration of travel time. This simplification is addressed by using a randomization factor which increases or decreases one of the cost terms. Over several iterations, the randomization approach generates a diverse set of transport routes for each agent. The transport routes are then evaluated using Eqs. (1) and (2); based on the evaluation the transport routes are kept in the agent’s choice set or removed from the agent’s choice set. For generating new routes, the following utility functions are used:

$${\widetilde{V}}_{road}=z\cdot {(-c}_{s,road})\cdot {s}_{road}-{c}_{t,road}\cdot {\widetilde{t}}_{road}$$
(3)
$${\widetilde{V}}_{ IM}=z\cdot \left({-c}_{s,roadIM}\right)\cdot {s}_{roadIM}-{c}_{t,roadIM}\cdot {\widetilde{t}}_{roadIM}$$
$$-{c}_{s,rail}\cdot {s}_{rail}-{c}_{u}\cdot u-{c}_{t,rail}\cdot {\widetilde{t}}_{rail}$$
(4)

where \({\widetilde{V}}_{road}\) and \({\widetilde{V}}_{ IM}\) denote the approximated utility considered by the router, where z is randomly drawn from a log-normal distribution (in the default setup the width parameter is \(\sigma =6\)) for each agent in each iteration, ct is the cost rate per travel time and \(\widetilde{t}\) is the expected travel time which for road is based on the average travel time in the previous iteration and for rail includes the in-vehicle time plus the waiting time according to the transit schedule but neglects delays resulting from barding denials due to vehicles at maximum capacity.

Transport supply

The road network contains all road types in Switzerland, including minor roads. Passenger cars and other freight demand categories than the one described above, e.g., international transit freight traffic or vehicles for certain good categories, are not taken into consideration in the mobility simulation. However, to account for a realistic level of traffic congestion, the travel time is adjusted every 15 min for each road segment. The travel time information is derived from SIMBA MOBI, a passenger traffic focused simulation setup, for the year 2050 (Scherr et al. 2020).

The cargo train network, schedule and terminals are modeled based on a given design concept which does not reflect any specific planning option and is purely fictive. Yet, the supply concept is considered as an overall plausible planning context. As shown in Fig. 5, for the simulation experiments carried out in this study, 16 terminals are connected via various transit lines, with realistic travel distances between each terminal.

Fig. 5
figure 5

Fictive simulated supply: Cargo rail network and terminals (blue), and road transport network (gray)

For each train, the capacity is set to 40 TEU container agents. Handling capacities of terminals are set differently depending on the number and type of cranes per terminal. Different terminal categories are taken into consideration: large terminals such as Basel or Lausanne, mid-sized terminals such as Biel, and small terminals such as Oberwallis. Figure 6 shows the overlay of all handling and train capacities for all terminals and cargo lines throughout the day. The cargo lines are operated from 6 a.m. to 11 p.m. Simulated operation times of terminals are set from 5 a.m. to 8 p.m. for small and mid-sized terminals and 24 h/day for arge terminals.

Fig. 6
figure 6

Total infrastructure capacity over the course of the day

Simulation experiments

This section briefly describes the simulation experiments carried out in this study.

In the reference simulation experiment (internal run ID: 3.37), the distance-based cost rates are set such that the ratio \({c}_{s,road} / {c}_{s,rail}\) is 4.3 (illustrative example), and the ratio \({c}_{s,road} / {c}_{s,roadIM}\) is 0.8 (illustrative example). The former ratio expresses the assumption that the costs per container-kilometer are lower for rail compared to the road, and the latter ratio expresses the assumption that distance-based cost rate for road transport as part of an intermodal trip is higher compared to the cost rate for direct road transport which is explained by a higher proportion of fix costs, e.g., planning overhead and dispatching. The handling fee per intermodal transfer cu is set to a fixed amount which is equivalent to the reference experiment’s costs of 14 km in the road transport mode. Furthermore, in the reference experiment, container agents are enabled to adjust their mode of transportation, departure time and route (which includes the intermodal terminal choice). The agents’ learning weights and total number of iterations are set such that a relaxed simulation outcome is obtained.

The reference experiment is used as the starting point for several sensitivity simulation experiments (see sections “The impact of capacity constraints and demand’s flexibility”, “The impact of autonomous driving” and “Sensitivity analysis”), in which several model inputs are altered, e.g.:

  • Terminal and train capacities: Limited vs. unlimited.

  • The departure and arrival time window: 1 h vs. 3 h.

  • The agents’ choice dimensions: With vs. without departure time choice.

  • The kilometer-cost ratios for road vs. rail: Less expensive road transport due to autonomous driving technology.

Results and discussion

Overview

In this section, the illustrative reference run is analyzed to provide an overview of the most relevant simulation outcome. The primary goal is to highlight what types of analyses are possible which make use of the innovative agent-based, capacity-constrained, dynamic, and multi-modal freight simulation approach.

Intermodal transport demand

In the illustrative reference simulation experiment, a total of 2034 container agents are observed to use the intermodal transport which corresponds to 23% of the total demand level (only trips with Euclidean distance above 100 km, only goods relevant for intermodal transport, see section “Transport demand”). These numbers are the outcome of the fictive initial supply concept described in section “Transport supply” Improving the initial setup, e.g., by optimizing the transit schedule or terminal capacities, will have a crucial effect on the attractiveness of the intermodal transport mode and increase the total demand level (see later in section “The impact of capacity constraints and demand’s flexibility”). As shown in Fig. 7, most intermodal mode trips are observed for relations along the East–west axis in the northern part of Switzerland.

Fig. 7
figure 7

Intermodal transport trips per origin destination relation

Most containers are routed through the rail network using a single cargo line. Only 14% of all container agents have a transfer and are loaded from one train to another one.

Container agents that have switched from road only transport to intermodal rail/road transport have significantly improved their score. Even though container agents using the intermodal transport mode pay for the terminal handling fees and the slightly higher kilometer-costs for the road access/egress leg, they are still better off. This is explained by the significantly reduced kilometer-costs for rail compared to the road system. For these agents, the average shipping costs decrease by 46%.

Departing earlier than 1 h or arriving later than 1 h compared to the road only transport alternative in the initial iteration yields a strong penalty which is avoided by the agents. Analyzing the departure times reveals that 80% of all agents in the intermodal transport mode make use of their flexibility and depart up to 1 h earlier, 20% depart at the same time or even later than in the initial iteration. Analyzing the arrival times reveals that 43% of all agents in the intermodal transport mode arrive up to 1 h later compared to their benchmark road only alternative, 57% of the agents arrive at the same time or even earlier.

Terminal utilization

Figure 8 depicts the cumulative use of the cranes at the terminals during the day. A distinction is made between loading from the road onto the wagon on the rail (upper plot) and unloading from the rail onto the truck on the road (lower plot). Since a crane can work in both directions, loading and unloading share the same capacity (dashed line). For the same time bin, the sum of the blue bars in both plots can therefore not exceed the capacity. Containers entering the terminal via train or road within the 1-h time bin and then entering the crane queue are depicted in gray. The containers which are then loaded or unloaded within a time bin are shown in blue. If the gray bar is higher than the blue bar, this means that not all waiting containers could be transferred in this hour and the overhang is therefore carried over to the next hour. In the reference scenario, the system's cranes are almost fully utilized from 10:00 to 16:00, with a predominance of loading in the morning and unloading in the afternoon starting at 14:00. Before 05:00 in the morning, the crane capacities are hardly used.

Fig. 8
figure 8

Crane utilization of all terminals (reference simulation experiment)

The bar height in Fig. 9 shows the number of containers on trains leaving a terminal (upper plot) and entering a terminal (lower plot) per time of day and summed up across all terminals.

Fig. 9
figure 9

Containers leaving and entering terminals via the rail system (all terminals, reference simulation experiment)

Upper plot in Fig. 9: The total number of containers leaving a terminal consists of (i) containers that have been hitched to the train (shown in red) and (ii) transit containers that have already entered the terminal on a train (shown in black).

Lower plot in Fig. 9: The total number of containers entering a terminal consists of (i) containers that will be unhitched from the train (shown in red) and (ii) transit containers that will stay on the train and continue their journey (shown in black).

More general, the red part of the bar depicts the handling of containers in the current terminal, which is the hitching or unhitching of wagons loaded with containers to a cargo train. The black part of the bar depicts containers in transit not affected by the capacity-constrained crane edge of the current terminal. The total rail capacity (dashed line) for the leaving containers is delayed compared to the entering capacity due to the average 30-min stopping time of the cargo trains. Between 10:00 and 16:00 the utilization is at its highest, although there is a strong directional variation of the utilization in the reference simulation experiment. There tends to be one or more directions with heavily utilized trains on departure, whereas other directions from the same terminal are less used. This directionality varies throughout the day.

Terminal access and egress

Figure 10 shows the number of intermodal transport trips per origin regions whose boarding terminal is Dietikon (marked by the red dot). In this situation, the region with the largest number of starting trips is Olten. Although Olten has a closer terminal (Gaeu), for several intermodal transport trips the further away terminal Dietikon is used to load containers from road to rail. This is explained by the agents’ cost minimizing route (and terminal) choice, e.g., the better train connections.

Fig. 10
figure 10

Number of intermodal transport trips per origin regions whose boarding terminal is in Dietikon (red dot). The other terminals are indicated by smaller orange dots

The same kind of analysis as in Fig. 10 can be conducted for all 16 terminals, in both TEU check-in and TEU check-out directions. Instead of evaluating all combinations separately, a more synthetic view is possible when considering the terminal dominance in each zone. A terminal is dominant in a zone when it has the highest market share in terms of number of containers. Figure 11 shows the geographical distribution of terminal dominance at check-in. The stippling indicates regions where the classification error rate (see e.g., James et al. 2013) is lower than 0.2, indicating a clear-cut dominance. The dominance of terminals such as Lausanne, Basel, or Suedostschweiz in the neighboring zones is expected. Dominance patterns for terminals as Gaeu are more challenging with disjoint spatial connectivity, which can be explained by the low quantity of containers starting in a zone and thus a less relevant market shares meaning. The same analysis as in Fig. 11 has been conducted for the terminal dominance at check-out (figure not shown) and the new additional feature is an extension of the Lausanne dominance in Wallis and a clear dominance of the Terminal in Geneva (Genf) at check-out.

Fig. 11
figure 11

The main terminal at check-in pro MS region is indicated by different colors. The stippling indicates region where the main terminal clearly dominates all others

In the current experimental setting, the median cumulated distance travelled is 62 km on the road network, and 162 km on the rail network. The former quantity can be key number when figuring out the plausibility of the model when discussing with experts from the field. In the present setting, the median catchment area radius of 62 km was larger than expected by the experts. While the goal here is not to provide a definitive answer, this debate highlights the potential of our approach: model parameter can be adapted to reflect expert knowledge. In return, the reciprocal effect can also be true, where unintuitive behaviors are unveiled by simulations and brought to the attention of experts.

The impact of capacity constraints and demand’s flexibility

Starting from the reference simulation setup, further experiments are carried out to explore the impact of capacity constraints on total demand.

In a first experiment, for each crane queue the capacity is set to unlimited (sufficiently large number to avoid queuing). In a second experiment, the train capacities are set to unlimited. In a third experiment, both the crane and the train capacities are set to unlimited. The first experiment (unlimited crane capacity) yields a moderate increase of + 46% compared to the reference setup. The second experiment (unlimited train capacity) yields a relatively small increase in demand for intermodal transport by only + 2% compared to the reference setup. However, in the third experiment (unlimited crane and train capacity), a significant increase in demand level is observed and the demand level climbs up by + 114% compared to the reference setup. This indicates that in the reference case, the cranes are the main bottleneck which reduce the demand level. Once crane capacities are unlimited, the trains become the relevant bottleneck which limit the demand level. It is important to notice that even in the unlimited crane and train capacity experiment, the modal share only amounts to roughly 50% and many container agents do not switch to the intermodal transport mode. This may be explained by the limitations of the initial transit schedule, in particular a mismatch of the given departure and arrival times per cargo line and the desired departure and arrival times per origin–destination relation. Optimizing the transit schedule is expected to further increase the demand for intermodal transport.

An alternative to improving the supply side is to allow for more flexibility on the demand side. More flexible container agents can better adjust to the given supply which may yield a more efficient utilization of limited resources. In the initial simulation setup, the desired departure and arrival time window is 1 h. An additional simulation experiment reveals that extending the desired departure and arrival time window from 1 to 3 h increases the total demand level by 33%. In a further simulation experiment, the agents’ departure time choice is disabled and instead agents have to stick to their initial departure time. Thus, reducing the agents’ degrees of freedom to only mode and route choice yields a decrease in total demand by 13%.

The impact of autonomous driving

How does price considerations impact the intermodal transport market share? Autonomous driving technology may yield a significant reduction in variable operating cost rates for road transport. To address this question, in a series of simulation experiments, the ratio of the monetary distance rate ratio of road versus rail transport is changed between almost zero (i.e., road made very attractive) to a ratio of eleven (i.e., road is an order magnitude less attractive than rail). The result is shown in Fig. 12 where a clear transition is observed: Between a ratio of 0 and 2, almost all container agents prefer the direct road transport. For a ratio of 1, both kilometer-cost rates are the same, but container agents still need to pay the terminal handling fees which explains why most container agents prefer the direct road transport mode. Above a ratio of 1 where kilometer-costs are higher for road compared to rail transport, market shares for intermodal transport increase. Above a ratio where direct road transport is approximately 3 times more expensive than rail, the intermodal transport market share saturates slightly above 20%. In between, a smooth sigmoid-like transition connects the two regimes. The results indicate the potential impact of autonomous driving technology and resulting reductions in road operation costs on the attractiveness of intermodal transport. To present an attractive alternative from the users’ point of view, the intermodal transport mode requires that cost rates per container-kilometer for the road system are at least 3 times higher compared to the rail system. The simulation experiments also demonstrate the existence of an upper bound for the intermodal transport mode share. In the current experimental setting this upper bound is far below 100%, highlighting the role played by other factors like railways schedule, train tonnage, terminal capacities. Hence, a natural continuation of the sensitivity to extend the parameter sampling from one dimension (cost ratio road/rail) to a full multidimensional sampling along the key variables and then assess their relative importance with regard to the intermodal transport share, see section “Sensitivity analysis”.

Fig. 12
figure 12

Impact of the monetary distance cost ratio road/rail on the intermodal trip share

Sensitivity analysis

64 new simulation experiments have been carried out in addition to the runs analyzed above. Besides the cost ratio road vs. rail, other key parameters have been varied either alone or in combination with other variations. The cargo handling fees (i.e., cost of loading and unloading a container between HVG and cargo train) range from 0 to 40 CHF. The line switch costs (i.e., switching a cargo wagon from one train line to another) range from 0 to 30 CHF. The intermodal routing radius (i.e., cut-off radius around terminals pre-defining a catchment area for containers) varies between 30 and 200 km. The cargo infrastructure was simulated in five different configurations: the default setting, terminals with doubled supply capacity (e.g., with twice as many cranes), terminals with unlimited capacity, trains with unlimited capacity and finally both terminals and trains with unlimited capacity. In addition, internal MATSim setting parameters have also been evaluated: the number of MATSim iterations and the randomness which is used for routing (the width parameter \(\sigma\) which is used to draw the random term z, see Eq. 4). The number of iterations is varied between 100 and 1000, and the width parameter is varied between 0 and 12. Their importance with respect to the intermodal transport share has been quantified using a machine-learning approach. The parameter importance is computed with the Permutation Feature Importance (Breiman 2001) and expresses the reduction in prediction performance when the values of the assessed parameter are randomly shuffled. When Random Forests (see e.g., James et al. 2013) is used to fit the intermodal transport share, see Fig. 13a, the model performance (expressed in terms of squared correlation between the model prediction and the truth on an independent test subset) amounts to 0.9. The parameter importance is then dominated by the cost ratio road/rail, followed by the cargo supply version. If any, the other parameters play little role in the intermodal transport share.

Fig. 13
figure 13

Boxplots for the Permutation Feature Importance, when fitting the intermodal transport share with either a Random Forests or b a linear model

For transparency, a simpler linear model is fit to the data, see Fig. 13b. For the selection of variables, a cross-validated Lasso method (see e.g., James et al. 2013) retains the road/rail ratio, the terminal and train capacity and the number of iterations as relevant parameters. In this setup, the adjusted coefficient of determination \({R}^{2}\) is 0.62. The linear model parameters are described in Table 1.

Table 1 Covariates of the linear regression with the intermodal transport share as target variable, together with the corresponding coefficients, statistical significances (P-values) and 95% confidence interval. Rows in boldface indicate statistically significant parameters

In the linear model setting, when the terminal handling capacity is doubled, the increase in intermodal transport share is not statistically significant (P-value over 0.05, or equivalently, a confidence interval containing zero as a possible regression coefficient). The same statistically non-significant result is obtained when a train capacity is unlimited. In contrast, an unlimited terminal capacity increases the intermodal transport share by 10.9% and a combination of unlimited terminal capacity and unlimited train capacity shifts the intermodal transport share by 23.8%. Note that these increases are not directly comparable with those reported in section “The impact of capacity constraints and demand’s flexibility”, as the total container demand level changes from one simulation experiment to the other. Section. “The impact of capacity constraints and demand’s flexibility” describes the relative change in total demand in comparison to the reference simulation experiment. In contrast, here, the focus is set on the intermodal transport share, and not on the absolute number of intermodal transport trips. The specified number of iterations is found to have an impact of roughly 1% additional intermodal transport share by lengthening the run by 1000 iterations. This is explained by the iterative learning cycle which approximates the stochastic user equilibrium. Even after many iterations, some agents are still able to improve by finding a suitable intermodal route and switching from car to the intermodal transport mode. Typically, this effect decreases with more iterations and at some point, the changes are negligible. Finally, the intermodal transport share dynamics is also found to be dominated by the ratio of road vs rail prices, with 19% share increase when the road price is 10 times more expensive than for rail, provided the relationship is linear. All remaining parameters (routing randomness, cargo transfer costs, line switch cost and the intermodal routing radius) do not play a significant role in either the Random Forest models, or in the linear model.

Conclusions and future directions

In this study, an innovative agent-based simulation approach is developed to investigate the potential shift from road freight transport to intermodal road/rail freight transport. The approach applies the agent-based simulation framework MATSim (Multi-Agent Transport Simulation) in the freight context: Each TEU (twenty-foot equivalent unit) container is modeled as an agent who minimizes a predefined cost function by adjusting the mode of transportation, the departure time and (intermodal) transport route. The simulated transport supply consists of the road network, the rail network, the cargo rail schedule, and the terminals where containers are loaded from Heavy Goods Vehicles (HGV) to cargo trains and vice versa.

Going beyond the existing literature, for both, the road and rail system, dynamic queuing effects are explicitly taken into consideration: road segments and cranes are modeled as capacity constrained First-In-First-Out queues and trains have a limited capacity. For the first time, MATSim’s intermodal transit routing module is transferred from the passenger transport context to the freight transport context. This opens the door for a new field of application studies and contributes towards an improved toolset for freight transport simulation. A further novelty is given by extending the existing intermodal simulation features by a sophisticated representation of capacity constrained terminals. This allows for a detailed investigation of queuing dynamics at the intermodal terminals.

The developed methodology provides insightful results to understand the impact of supply concepts, prices, and assumptions regarding temporal restrictions on the mode shift effects. The methodology was successfully applied to the illustrative case study of Switzerland’s inland freight traffic in the year 2050. The agent-based and dynamic simulation approach allows for a detailed investigation of queuing effects, including the utilization of terminals and cargo trains. The simulation outcome reveals that intermodal rail and road transport provides a great potential to reduce road traffic. From the users’ point of view, switching from road to intermodal transport yields a significant cost reduction by 46% on average. Even without any further improvement or optimization of the transit schedule or terminal capacities, the initial supply concept yields a significant trip share of 23% for the intermodal transport mode. Both train and terminal capacities as well as the number of train departures per origin destination relation are limiting factors and have a crucial impact on the demand for intermodal transport. Also, the transport demand’s flexibility and temporal restrictions related to the supply chain are found to significantly impact the demand level. A sensitivity analysis of the cost ratios for road and rail reveals the potential competitive impact of autonomous driving technology on the intermodal transport mode. To present an attractive alternative from the users’ point of view, the intermodal transport mode requires the price per container-kilometer to be at least 3 times more expensive for the road system compared to the rail system. In the case of lower prices in the road system, demand for intermodal road/rail transport will drop significantly. In future research, the presented approach may be extended by an optimization heuristic which improves the interplay of the cargo train schedule and the terminal capacities. The idea would be to adjust the cargo train schedule such that terminals are used in the most efficient way, without demand peaks or time periods where demand is zero and available crane resources are not used (see, e.g., Kuo et al. 2010). The presented approach may also be extended towards a more heterogenous transport demand. Making full use of the agent-based approach, container categories may be differentiated, e.g., high-priority agents for time-critical goods, with different agent-specific cost attributes and behavior. Further elements of the simulation framework may be transferred from the passenger transport context to the freight context, e.g., bicycles’ queue passing/seepage may be used for high-priority goods. Future work may also address capacity constrained terminal shunting tracks and storage space at the terminals which in the present study are both considered as unlimited. A further element that needs to be addressed is that, in contrast to passenger traffic, freight demand does not change in single container units but rather in larger groups of containers if an entire company adjusts their shipping concepts. This may be incorporated by implementing agent groups with the same mode choice behavior.

In terms of real-world implementation, the presented case study requires investments in expanding Switzerland’s current intermodal terminal infrastructure. Also, the rail network capacity needs to be evaluated regarding bottlenecks taking into consideration both the future cargo and passenger train services. The presented methodology may also be used for simulating different time horizons to maximize the benefits during the start-up implementation phases. Demand levels in early implementation phases may also be used to validate or calibrate the model and improve the accuracy for later implementation phases. This study only addressed the potential shift from road to rail. However, the proposed approach also allows to simulate other effects relevant for today’s political decisions, such as the modal shift from rail only (e.g., single wagon load transport) to intermodal road/rail transport. Finally, today’s political decisions need to account for the potentials and challenges addressed by the transport planning community, e.g., increasing competition due to autonomous trucks.