Fleet size determination for a mixed private and pooled on-demand system with elastic demand

The recent emergence of innovative mobility solutions is changing the mobility landscape in urban areas. However, it remains unknown how the combined operation of private and pooled on-demand services affect service performance and the required dimensioning of the fleet size for such services. This study develops a model to determine the fleet size of an on-demand system offering private service and pooled service, where the demand for these services is an outcome of modal choices. We investigate the fleet size required when taking either the perspective of Transit Planning Authority (Agency) or Service Provider (Operator). The model is implemented for the network of Amsterdam North. Results show that the objectives of Agency and Operator yield different total fleet sizes with the Agency requiring a larger fleet than the Operator and that the optimal scenario for the Agency would be the one where only private on-demand service is offered.


Introduction
The emergence of innovative mobility solutions, brought about by advancements in various ICT platforms and increasing urbanisation, is changing the mobility landscape in urban areas. Service providers and users of such innovative mobility systems often interact with each other through an online platform such as an application in a smartphone. They offer users the flexibility to plan their trips in real-time and potentially address some of the inherent issues with a line-and schedule-based public transport (bus, tram, or metro) such as large waiting time during off-peak hours and low accessibility in rural areas.
Such services have impact on urban mobility at several levels. From a demand perspective, there is some evidence in the literature to suggest that traditional modes of transport such as privately owned cars, line-and schedule-based public transport are increasingly losing their market shares to disruptive mobility solutions such as Cabify, Lyft, Uber, Car2Go, DriveNow, ZipCar (Enoch 2015;Conway, Salon, and King 2018). The operations of such services also have an impact at the network level in terms of additional vehicle-kilometres travelled which in turn influence the levels of congestion across the network. Hence, the dimensioning of these mobility services needs to be designed considering demand elasticity and their impact on overall urban mobility.
Multiple stakeholders with different objectives are involved in the planning stage of such services such as transit planning authority and service operator. The planning authority can play an instrumental role in planning integrated multi-modal transport services. This includes setting priorities, policies and regulations so as to stimulate synergy between fixed line-based services and flexible on-demand services by means of tendering procedures, incentive schemes, integrated ticketing, pricing and travel information platforms, setting level-of-service standards, designate space for vehicle fleets and kerbside management. In the case of a tendered on-demand service, a transit planning authority would be interested in making the overall mobility portfolio more efficient (i.e. reducing the overall travel time and operation cost), whereas a service operator would be interested in profit maximisation. Depending on the number of competing operators, the market is either monopolistic (one service operator) or oligopolistic (multiple service operators compete for market share). Insights into levels of service of such systems based on these distinctive objectives are crucial in planning, operation, and the possible regulation of such services.
In this study, we develop a model to design the service of an on-demand mobility system offering both private and pooled door-to-door services. We determine the optimal fleet size of the on-demand system required when taking two distinctive perspectives. The first one being a transit planning authority interested in improving the travel time of all the users and the second being a single service provider operating in a monopolistic market and interested in maximising its own profit. We conduct our analysis using an agent-based simulation framework that models the day-to-day learning of users.
The remaining of the paper is structured as follows. In the following Literature review section, we provide a review of existing literature on the study area, identify the research gap, and elaborate on the study motivation. The next section presents the modelling framework. This is followed by a section on an application of the model which presents the network and the scenarios considered, followed by a section detailing the results. The paper is concluded by synthesising the key findings and providing directions for future research.

Literature review
In this section, we review the literature pertaining to the planning and operations of ondemand mobility systems. While planning pertains to service design aspects such as fleet size and fare determination, operations pertain to the day-to-day aspects of the on-demand service such as fleet dispatching, relocation, and the assignment of travel requests to vehicles. We classify the literature based on the aspects addressed (objective), the methodology employed for design and analysis, and the key findings.
Mathematical and simulation methods have been used in the literature to model the operations of on-demand services. The objective is commonly defined as optimally assigning travel requests to vehicles while satisfying certain constraints. Notable early works that used an analytical approach for the assignment of travel requests include Wilson, Weissberg, and Hauser (1976) and Potter (1976). They used a passenger utility maximisation approach and modelled the assignment to travel requests to vehicles as an Integrated Diala-ride Problem (IDARP). More recently, Posada, Andersson, and Häll (2017), Häll et al. (2009), andSalazar et al. (2018) used a mathematical programming approach that involves solving the assignment problem as an optimisation problem by assigning travel requests to a fleet of on-demand vehicles. Posada, Andersson, and Häll (2017) and Häll et al. (2009) solved the assignment problem as an Integrated Dial-A-Ride Problem (IDARP). They developed a model to assign travel requests to on-demand vehicles by coordinating with the line-based transit service. Salazar et al. (2018) used a flow optimisation model for assigning the travel requests to on-demand vehicles while maximising social welfare. The pitfall of such analytical models is their inherent inability to capture the real-time system dynamics of the on-demand system.
Agent-based simulation methods mitigate this issue to an extent. Notable recent works that used agent-based simulation methods to model the operations of on-demand systems include Neumann and Nagel (2013), , Maciejewski and Nagel (2013), and Atasoy et al. (2015). Neumann and Nagel (2013) presented an evolutionary algorithm for optimal paratransit service network design by designing the paratransit services as a competing mode with a line and schedule-based public transport service. Atasoy et al. (2015) designed an on-demand service which gives a list of travel options to travellers in real time. The travel options include choosing between using a private taxi service, shared taxi service, or minibus (multiple passengers with fixed routes but flexible schedules). Danaf et al. (2019) provide a good overview of how behavioural models can be applied in real time to generate customised recommendations which facilitate the usage of an integrated fixed and flexible public transport system. Notwithstanding, these studies did not determine the service parameters of on-demand service such as fleet size. Moreover, the demand for these services was considered an exogenous value, independent of the level of service offered.
One of the earliest works, which looked into the design of a large scale on-demand fleet, was performed by Ma, Zheng, and Wolfson (2013). They developed a heuristic-based taxi dispatching system for large urban fleets. Later works that looked into the concept of ridepooling include Santi et al. (2014) and Alonso-Mora et al. (2017). The former developed the concept of shareability graph and concluded that all taxi trips in Manhattan could be served by pairing up two requests per taxi while keeping the passenger discomfort low in terms of travel time. The latter adopted the concept of shareability graph from Santi et al. (2014) and developed an algorithm that enables real-time high capacity ride-pooling for Manhattan. Results indicate that 98% of its taxi demand can be served by 3000 vehicles (with a capacity of 4 passengers each) instead of the current fleet which is more than four times larger. Several studies have examined the hypothetical case of city-wide replacement of all private vehicles or even all other transport modes with shared autonomous vehicles. The fleet size requirements for this boundary case were determined for Berlin , Austin (Fagnant and Kockelman 2018), Lisbon (Martinez and Viegas 2017), and Melbourne (Dia and Javanshour 2017). The prime interest of these studies was the potential of shared autonomous vehicles to replace private car trips, indicating that one shared autonomous vehicle could replace the demand served by 10 privately owned cars. In contrast, more recent studies, for the cities of Munich (Moreno et al. 2018) and Amsterdam , suggest a replacement ratio of 10 to 4 and 9 to 1, respectively. However, these studies considered a fixed demand for on-demand systems, and supply parameters were exogenous to the model. Numerous works in the past have studied the service design of on-demand transport systems in terms of their optimal fleet size and fare determination. The objective of such studies was to determine the optimal fleet size required to carry out a set of travel requests with the objective of minimising travel costs. Some of the early works that used analytical and mathematical models include Gertsbach and Gurevich (1977) and Desrosiers, Sauvé, and Soumis (1988). Gertsbach and Gurevich (1977) determined the minimum fleet required to serve a set of travel requests by introducing the concept of a deficit function which is defined as the difference between departures and arrivals at a station. The fleet size required was then proved to be equal to the total deficit. Desrosiers, Sauvé, and Soumis (1988) determined the minimum fleet size required to visit a set of nodes once, subject to time window constraints. The objective was to minimise the travel cost while using Lagrangian relaxation techniques. More recent works that used mathematical models for fleet size determination include Morisugi, Arintono, and Parajuli (1997), Yang, Wong, and Wong (2002) and Yang et al. (2005). Morisugi, Arintono, and Parajuli (1997) determined the optimal pricing and fleet size of a GPS-enabled taxis by considering passengers' willingness to pay and adding an equal net revenue constraint. Yang, Wong, and Wong (2002) and Yang et al. (2005) introduced a mathematical model to optimise the taxi fare and fleet size by considering the demand-supply equilibrium road network and congestion externality. Notable works that used heuristics for optimal fleet size determination include Fu and Ishkhanov (2004) and Li and Tao (2010). Fu and Ishkhanov (2004) developed a heuristic method for determining the optimal fleet size mix for a set of travel requests by maximising the service productivity in terms of (trips/vehicle/hour). They determined the optimal number of vehicles required for different vehicle categories with varying seating capacity and showed the existence of a critical point beyond which additional capacity becomes ineffective. Li and Tao (2010) developed a two-stage dynamic programming model to determine the optimal fleet size and vehicle transfer policy for a car rental company that serves two cities by maximising the income of the rental company. None of these studies considered an elastic demand for on-demand services. From a planning perspective, none of the studies optimised service parameters from an Agency and Operator perspective.
Fleet size optimisation at city-wide level was studied by Chang, Wu, and Lin (2012) and . Chang, Wu, and Lin (2012) considered profit maximisation and cost minimisation for the Taipei Metropolitan Area, while  considered user cost and operating cost minimisation for the port of Rotterdam. Vazifeh et al. (2018) addressed the 'minimum fleet problem' for an on-demand system with fixed demand in New York City. They provided a computationally efficient solution by introducing the idea of 'vehicle sharing network'. The model was tested for the taxi demand data for New York City for a period of one year. More recently, Zhang and Ukkusuri (2016) developed a leader-follower Stackelberg game model between transport authorities, taxi drivers, and passengers to optimise the fleet size and fare setting. The results provided valuable insights into the current NYC taxi market regulation policies.
Studies that have considered elastic demand for on-demand services include Hörl, Erath, and Axhausen (2016), Narayan et al. (2019), Basu et al. (2018), Wen, Nassir, and Zhao (2019). Hörl, Erath, and Axhausen (2016) presented a framework for simulation of autonomous vehicles in an integrated network and population-based traffic environment. The model allows the demand to evolve dynamically from the traffic situation. Narayan et al. (2019) adopted an agent-based simulation framework to explore hypothetical scenarios that involve ride-sourcing replacing private car and public transport trips for Amsterdam. Basu et al. (2018) presented a flexible automated mobility on-demand (AMoD) model developed within an agent-based simulation platform. Wen, Nassir, and Zhao (2019) studied the value of information on passenger demand in an on-demand mobility system at both individual and aggregate levels. Their results indicate that information on aggregate demand can lead to a better service (more requests served and shorter waiting time) while improving system performance and yielding a higher profit. However, these studies did not optimise the supply side parameters while considering an elastic demand. To the best of our knowledge, the work by Liu et al. (2018) addressing fare and fleet size optimisation for a mobility ondemand system with inelastic demand is one of the most direct relevance to this study. They developed a Bayesian model to optimise the fleet size and fare of a mobility-on-demand system and considered a profit maximisation objective from the perspective of a service provider.
Our review suggests that, while fleet size optimisation has been studied in the literature, most of the studies assumed a fixed (inelastic) demand for on-demand services. However, in reality, demand is expected to depend on fleet size due to its impacts on the level-of-service. Supply-demand interactions need, therefore, to be explicitly accounted for to identify the steady-state conditions. Furthermore, the extent to which demand is elastic depends on the availability and quality of service offered by alternative transport modes, including car, bike and lined-based public transport. From a planning and policy perspective, none of the works designed optimal service parameter from the perspective of a transport operator (profit maximisation) and a transit authority (system cost minimisation) with elastic demand. This study attempts to fill the gap in the literature by determining the fleet size required for an on-demand service with elastic demand while considering both service profit maximisation and integrated planning perspectives. In addition, the study provides novel insights into the service design of on-demand systems from a planning perspective. The study analyses the fleet size of two competing on-demand services, one which offers private service and another which offers a pooled service. We analyse and compare the results from the perspective of a service provider (Operator) and a transit planning authority (Agency). The objective of the Operator is to maximise the profit while the Agency aims to minimise the total system cost.

Modelling framework
This section presents the modelling framework, details the individual components, and presents the optimisation formulation. Figure 1 shows the overall modelling framework. The input modules comprise of Demand, Network, and Supply. The Demand data comprise of passengers with a set of origin-destination points in the network. The Network data comprise of the road network and public transport network represented by a set of nodes and connecting links. The Supply data comprise of the modes available to each user to travel from their origin to their destination. The modes available are car, walk, bike, schedule and line-based public transport (PT), and on-demand service (private and pooled). On-demand service in this study is modelled as a fleet of vehicles operated by a central dispatching unit that assigns travel requests to vehicles in real time and offers door-to-door service to passengers.
Two types of on-demand services are considered in this study based on the type of service offered. The types of services are as follows: • Private on-demand: This service offers individual taxi-like service to passengers • Pooled on-demand: This service offers shared rides where passengers may share their ride with an occupancy of 4 passengers Each user starts with a set of travel plans that define their performing activity (type, duration, and departure time) and travel modes. The 'Assignment and Network loading module' comprise the within-day dynamics of the system. The users evaluate the services in the 'Evaluation' module by assigning a score to the executed plan and replan their travel strategies accordingly in the 'Re-planning' module. This sequence of assignment, network loading, scoring and re-planning forms an iteration which corresponds to a day. The process continues until a convergence criterion is achieved. Nagel and Marchal (2003) show that while day-to-day learning may not satisfy the mathematical definition of equilibrium conditions, the iterative process results in a stochastic user equilibrium. During an iteration, users may undertake different strategies to alter their travel plans while making their trip from origin to destination based on service experience. In this study, the strategies available to an agent are changing the route of travel, changing the mode of travel, changing the departure time from an activity, and selecting a plan with the best score. The demand at equilibrium along with the supply configuration is the input data to the 'Supply determination' module where they are scored and evaluated. The proposed model is embedded in a multi-agent transport simulation framework. It is implemented and integrated into the open-source software MATSim .
In the context of this study, the objective of the 'Supply determination' module is to set an optimal fleet size for the two on-demand services offering private and pooled rides. The desired fleet size for on-demand service is explored and analysed from two different perspectives, namely: (1) Agency's perspective: A public authority interested in setting the fleet size of on-demand services so as to minimise the generalised travel cost of users and the operator's operating cost.
(2) Operator's perspective: A transport service provider interested in finding the fleet size of on-demand service so that its total profit -defined as the difference between revenue and expenditure -is maximised.
In the following sub-sections, we present the mathematical formulation of the objective function, decision variables, and constraints for the two perspectives: the Agency and the Operator.

Agency perspective
The Total Agency Cost is formulated as follows: ( 1 ) The Total Agency Cost (TAC) is defined as the summation of the User's travel cost (UC) and the Operator's operating cost (OC) as shown in Equation (1). The User's travel cost is a function of the travel time experienced by all the users ( i∈U t i ). The passenger travel time t i is, in turn, the summation of all the travel time components experienced by the user. This includes the mode-specific travel time components such as walking time, in-vehicle time and waiting time. The travel time of all the users ( i∈U t i ), in turn, is a function (f ) of the decision variables of the optimisation model which are the fleet size of private and pooled on-demand services, θ 1 and θ 2 , respectively. The Operator's operating cost (OC) is a function of the fleet size of the two on-demand services (θ 1 and θ 2 ) and the distance travelled by the on-demand vehicles, ζ m . The distance travelled by each of the on-demand service (ζ m ) is a function (g m ) of the fleet size of the two on-demand services. The travel time of the users (t i ) and the distance travelled by the on-demand service ζ m are obtained as an output from the simulation. The optimisation problem is formulated as follows, subject to two constraints: min where U is the set of all passengers; m is the on-demand service, where m = 1 represents private and m = 2 represents pooled service; t i is the total travel time of passenger i in h; δ is the value of travel time in e/h; α m is the maintenance cost of on-demand service m in e/vehicles which corresponds to the leasing cost of the fleet of vehicles; θ 1 is the fleet size of private on-demand service; θ 2 is the fleet size of pooled on-demand service; σ m is the operating cost of on-demand service m in e/km which corresponds to the fuel cost; ζ m is the total distance travelled by all vehicles of on-demand service m in km; θ min 1 is the minimum required fleet size of private on-demand service; θ max 1 is the maximum required fleet size of private on-demand service; θ min 2 is the minimum required fleet size of pooled on-demand service; θ max 2 is the maximum required fleet size of pooled on-demand service.

Operator perspective
The Profit (P) of the operator is formulated as The Profit(P) is defined as the difference between the Revenue (R) and the Operating cost (OC) as shown in Equation (3). The Revenue (R) is a function of the demand for each of the on-demand service ( m ) and the distance travelled by the users of the on-demand service (ξ m,i ). The distance travelled by the users of the on-demand service (ξ m,i ), in turn, is a function (h m ) of the decision variables of the optimisation model which are the fleet size of private and pooled on-demand services, θ 1 and θ 2 , respectively. The distance travelled by the on-demand users (ξ m,i ), the total distance travelled by the vehicles (ζ m ), and the demand for each of the on-demand service ( m ) are obtained as the output from the simulation. The optimisation problem is formulated as, subject to two constraints: where μ m is the base fare of mode m in e; m is the set of all passengers using mode 'm'; γ m is the distance-based fare of mode m in e/km; ξ m,i is the total distance travelled by passenger i using mode m in km.

Network and demand data
The model is applied for a network centred around the northern district of the city of Amsterdam, Netherlands. The network is developed using data extracted from OpenStreetMap (Haklay and Weber 2008). A layer of links and nodes was first selected in OpenStreetMap that included the road infrastructure (motorway, trunk, primary, secondary, tertiary, and minor) and public transport stops. The network was then cleaned for redundant/duplicate links and unconnected nodes. The total number of nodes and links in the final network is 11,399 and 24,396, respectively. The demand data are adopted from the national activitybased demand model, Albatross (Arentze et al. 2000). Albatross is a learning-based model of activity-based travel behaviour. The model predicts the time, place, and duration of activities of users and the travel modes involved. The demand data hence comprise an activitybased travel plan for each user in the Netherlands and comprise of activities (type, duration, arrival and departure time) and travel modes (type, route, and travel time). The data were then converted to a format to be consistent with MATSim (Winter and Narayan 2019). Next, the demand data located within the network of Amsterdam North was extracted. The final demand data consist of 4169 agents with a total number of daily trips as 20,996. Figure 2 shows the case study network.

Simulation scenarios
Two scenarios are considered based on the type of service available for users. In the Base Scenario, the modes available consist of car, walk, bike, PT (line-and schedule-based public transport including bus, tram, and metro). In the On-demand scenario, an on-demand mobility operator enters the market with two types of on-demand services: private ondemand and pooled on-demand. These new services compete with each other as well as with other modes of travel demand. In order to account for stochasticity in the results, 10 runs for each simulation instance was carried out, and the key performance indices were averaged over these runs.

Dispatching strategy of on-demand service
The dispatching strategy of the on-demand system offering private service is as follows. A vehicle that has been assigned a request drives to the pick-up location, picks up the passenger, drives to the travel request destination, drops off the passenger and stays at the drop-off location until further requests are assigned. The dispatching strategy of the ondemand system offering pooled service is as follows. A vehicle that has been assigned a request drives to the pick-up location, picks up the passenger, makes detours to pick up other pooled requests, drives to their destination, drops off the passenger and stays at the drop-off location until further requests are assigned. The dispatching strategy of the ondemand vehicles has been adopted from Bischoff and Maciejewski (2016) and .

Objective function parameters
The values of the parameters included in the objective function are given in Table 1.

Fare setting
The ratio of fare of public transport, pooled on-demand, and private on-demand is set to 1:5:10 which is a reasonable assumption for line-and schedule-based, private, and pooled services in Amsterdam. The fare of public transport provided by GVB (the public transport operators in Amsterdam) is used in this study (GVB 2019).

Calibration and parameters of the mode choice model
Calibration of the model and parameter setting plays a crucial part in system performance and simulation output, particularly because the system comprises dynamic transport services such as private and pooled services where travel time variability plays an important part in the mode choice of users (Alonso-González et al. 2020). For instance, for pooled on-demand services, this entails longer travel time for its users as the service becomes popular and attracts more users. The model hence has to be adequately calibrated considering these feedback effects between travel demand and service performance. In the absence of real data, the choice model (utility function) was calibrated following the calibration guidelines in MATSim. This was done by means of investigating the alternate specific constants of the available modes methodically following the calibration guidelines provided in MATSim . The modal share for all the available modes (car, walk, bike, public transport) was set corresponding to the actual value for the case study area, thus obtaining the ASCs (alternate specific constants) that yielded the respective modal shares. The set of values obtained for the ASCs was then kept fixed throughout the simulation runs. The marginal utility of performing an activity (β dur ), marginal utility of time spent by travelling (β travel ) for all available modes and marginal utility of arriving late for an activity (β latear. ) have been set to +6 utilities/ h, −6 utilities/ h, and −18 utilities/ h, respectively. Finally, the marginal utility of money (β money ) was set to −0.685 utilities/Euro based on the Dutch value of time.

Results and analysis
In the following, we investigate the relation between the fleet size of on-demand services (both private and pooled) and the individual objective functions from the Agency and Operator perspective. The objective of this investigation is to determine the upper and lower bound of the fleet size values of the two alternative on-demand services. Then, we present the objective function values for Agency and Operator in relation to the fleet size of private and pooled services exploring all possible fleet size combinations for the two alternative on-demand services, assuming a reasonable fleet size increment. We also present the contributing components of each objective function for alternative fleet size solutions of the two services, and analyse the underlying trends of the objective function values and their relation with the fleet size. Figure 3 shows the variation of Agency and Operator cost for various total fleet sizes of on-demand services. The ratio of fleet size of private and pooled on-demand services is 1:1 here. As can be seen from Figure 3 The trends also reveal the presence of an optimal value of fleet size for both Agency and Operator in the range considered. Hence, we truncate the solution space by excluding all fleet size combinations involving a total fleet size less than or equal to 200 and greater than or equal to 1600.

Upper and lower bound of fleet size
We further investigate this trend by examining the mode share and travel times for all possible fleet size combinations of private and pooled service within a total fleet size range from 200 to 1600 with an increment of 100 vehicles. We plot the travel times and mode shares for all possible fleet size combinations within the range for both private and pooled on-demand users (Figures 4-6). Figures 4 and 5 plots the average waiting time and average in-vehicle time respectively for private and pooled on-demand service users and Figure 6 plots the mode share for private and pooled on-demand service.
The initial decrease in the Agency cost in Figure 3(a) is attributed to an overall increase in the mode share of on-demand service as shown in Figure 6. The increase in fleet size   Similarly, the initial increase in the Operator cost in Figure 3(b) is attributed to an overall increase in the mode share of on-demand service (Figure 6), thereby also increasing the Revenue. The increase in the Revenue outweighs the increase in Operating cost within this range. However, beyond a certain point, the increase in fleet size does not cause a significant increase in the Revenue, and the Operating cost outweighs the Revenue. During the entire range of fleet size considered, the Revenue exceeds the Operating cost.
As can be seen from Figure 6, the mode share of private and pooled on-demand service increases monotonically when operated as the sole on-demand service. When the private and pooled on-demand services start operating in competition, the combined mode share of the private on-demand service and the pooled on-demand service decreases compared to when they operate in isolation. This can be seen from the trends of the mode share of the two on-demand services which shows a decrease along the fleet size axis of the competing on-demand service. However, as can be seen from the figure, this decrease is more pronounced for pooled on-demand users where the rate of reduction is more along the private on-demand axis. This indicates that the effect of the increase of fleet size on mode share is more pronounced for private on-demand users. The effect of fleet size on mode share also decreases for higher fleet size as shown in Figure 6, indicating that the increase in fleet size does not attract significant mode share beyond a certain point.
This trend can be further explained by Figures 4 and 5. As can be seen from Figure 4, the waiting time for private on-demand users decreases along the private on-demand fleet size axis and that of pooled on-demand users decreases along the pooled fleet size axis. The trend is more pronounced when the two services operate as the sole on-demand service. It can also be seen from the figure that the decrease in average waiting time is more pronounced for private on-demand service compared to pooled on-demand service indicating that the waiting time of on-demand users is more sensitive to fleet size increment as compared to pooled service. From Figure 5, it becomes evident that the in-vehicle time of private on-demand users is less sensitive to fleet size as compared to pooled on-demand users. The marginal increase in in-vehicle time of pooled on-demand users along the pooled on-demand fleet axis indicates inadequate supply for the corresponding demand which results in more detours for pooled on-demand users. The in-vehicle time for pooled ondemand users also decreases along the private on-demand axis which is due to the rapid decline in the mode share of pooled service when private service enters the market as shown in Figure 6.

Optimal private and pooled fleet size
In this section, we explore the effect of fleet size of private and pooled on-demand service on the Agency cost and the Operator cost. Figure 7 shows the split of the Agency cost along with its individual components as shown in Equation (1). We plot the Agency cost along with its individual contributing components in relation to the fleet size of the two on-demand services (private and pooled). The Users's travel cost in the figure corresponds to the total travel time cost of all the users. Operator's operating cost corresponds to the operational cost of the on-demand services. Total agency cost corresponds to the summation of the two components. As can be seen from the figure, the Users's travel cost decreases monotonically along the axis of private and pooled on-demand services. However, the rate of decrease is more along the private on-demand fleet size axis than that for the pooled ondemand fleet axis. The Operator's operating cost increases monotonically along the axis of private and pooled on-demand services. As expressed in Equation (1), the Operator's operating cost is a linear function of the total fleet size and the vehicle-km travelled. The leasing cost which is assumed the same for the two on-demand services (Table 1) is the dominant factor compared to the cost incurred by vehicle-kms driven. Hence the Operator's operating cost shows a uniform variation along the two fleet size axes. As can be seen from the range of values for the two components of the Agency cost, the Users' travel cost is the dominant factor in the Agency cost.
The decrease in Users' travel cost is attributed to the modal shift of users when comparing the Base Scenario and the On-demand scenario. The mode share of active modes in Base Scenario is close to 75% and that of on-demand services in the On-demand scenario ranges between 60% and 90%. Hence, a considerable share of active mode users in the Base Scenario shifts to on-demand services in the On-demand scenario, thus resulting in an overall reduction in the travel time of users. This results in a decrease in Users' travel costs.
As can be seen from Figure 5, the average in-vehicle time of private on-demand service users is marginally lower than that of pooled on-demand service. This is due to the possible detours that pooled on-demand vehicles perform in order to pick up other passengers. The private on-demand service being a direct door-to-door service does not have such detours, and this results in lower in-vehicle travel time. From Figure 4 it can be seen that the average waiting time of pooled on-demand service is initially lower than that of private on-demand service up to a fleet size of 500. Beyond this point, the average waiting time of private ondemand users is lower than that of pooled on-demand users. The initial gain in average waiting time for pooled on-demand users is attributed to the number of vehicles in service in relation to the demand for that service. Initially, the number of private on-demand vehicles is not sufficient enough to cater to its demand when compared to the pooled service. However, as the fleet size increases, this gain in waiting time decreases and beyond a certain point, the waiting time for private on-demand service becomes lower than for pooled on-demand service. This could be explained by the rate of decrease in average waiting time for private on-demand users and pooled on-demand users. The rate of decrease in average waiting time for private service users is higher than that of pooled on-demand users. Thus, the effect of an increase in fleet size on the average waiting time is much more pronounced for private on-demand service than that for pooled on-demand service.
Similarly, Figure 8 shows the split of Operator's Profit along with its individual components as shown in Equation (3). Revenue corresponds to the revenue generated from the on-demand service, Operating cost corresponds to the operational cost of the on-demand system, and Profit corresponds to the overall profit which is the difference between the revenue and the operational cost. The Revenue monotonically increases as the fleet size increases along both axes of private and pooled on-demand services. However, the rate of increase of revenue is higher along the private on-demand axis than the pooled axis. This can be explained by the trends observed in Figures 4-6. As can be seen in Figure 4, the rate of decrease of average waiting time for private on-demand users is higher than that for pooled on-demand users, thus making the service increasingly more competitive compared with the pooled service with an increase in fleet size. This is also visible in Figure 6, which indicates that the mode share of private on-demand service is significantly higher than the shared service for all possible fleet sizes. We also observe that the rate of increase of mode share for private service is higher than for the pooled service and that the private service is more competitive than pooled service. This also explains the shape of the plot of Revenue and Profit in Figure 8. The maxima of Revenue and the Profit are skewed towards the private on-demand axis. The range of values for Revenue and Operating cost indicates that the Profit is primarily governed by the Revenue.
The fleet size configuration of private and pooled on-demand service that yields the optimal values are 400 and 0, respectively, for Agency and 300 and 0, respectively, for Operator. Hence both from an Agency perspective and from an Operator perspective, the ideal strategy would be to operate a private on-demand service only. The increase in fleet size from 300 to 400 cause an increase in the operating cost and revenue and a decrease in the overall travel cost of users. However, from an Agency perspective, during the increase in fleet size from 300 to 400, the travel time savings of the users outweighs the increase in operating cost. However, from an Operator's perspective, the additional operational cost outweighs the increase in Revenue. This explains the difference in optimal values for the Agency and the Operator. Hence from a planning perspective, the Agency allowing the Operator to determine the fleet size would result in a sub-optimum solution for the Agency.
Finally, we compare the Agency cost in the Base Scenario and On-demand scenario. The Agency cost at the optimal solution of 400 private vehicles is 31,300e and that in the Base Scenario is 55,359 e. Hence, the Agency cost at Base Scenario yields a higher cost than the Agency cost at the optimal solution for scenario On-demand. This shows that from an Agency perspective, the optimal scenario would be the On-demand indicating that the best plan of action from an Agency perspective would be to operate an on-demand service as opposed to the Base Scenario.

Fare sensitivity analysis
In this section, we perform a fare sensitivity analysis for the private and pooled on-demand services. To this end, we consider 4 fleet size instances. First, we consider the fleet size instance that yields the optimal Agency cost (private on-demand fleet size = 400 and pooled on-demand fleet size = 0). Next, we consider the fleet size instance that yields the optimal Operator cost (private on-demand fleet size = 300 and pooled on-demand fleet size = 0). For the two fleet size instances, we vary the fare ratio of public transport to private on-demand service by varying the fare of private on-demand service. The ratios of fare of public transport to private on-demand service considered are 1:1, 1:2, 1:3, 1:5, 1:10, 1:15, and 1:25.
In addition, we consider two fleet size instances with both private and pooled ondemand service. The first one being the mixed fleet size instance with the lowest fleet size (private on-demand fleet size = 100 and pooled on-demand fleet size = 100) and the next being the mixed fleet size instance with the highest possible fleet size (private ondemand fleet size = 800 and pooled on-demand fleet size = 800). For both instances of the mix fleet size, we vary the fare of pooled on-demand service relative to public transport and private on-demand service. The ratios of fare of public transport to pooled ondemand service to private on-demand service considered are 1:1:10, 1:2:10, 1:3:10, 1:5:10, and 1:10:10.

Agency and operator optimal fleet size instances
Figures 9 and 10 shows the variation of Agency cost and Profit of operator along with their individual components with varying fare ratios for the optimal fleet size configuration for Agency and Operator, respectively. As can be seen from the two figures, the Agency cost remains relatively stable during the initial increments in fare ratio (till 1:5) and then monotonically increases beyond this point. The total Agency cost follows the trend of User's travel cost which is the dominant part of the Agency cost. The Operator's operating cost monotonically decreases for all the fare increments. The increase in fare ratio makes the on-demand service relatively less attractive, and consequentially, the mode share of private on-demand service decreases with the increase in fare ratio. However, during the initial increments, the decrease in mode share is marginal and not sufficiently high to cause an overall decrease in total Users' travel cost (and thus Agency cost). The decrease becomes substantial for higher fare ratios which cause an increase in the Users' travel cost and Agency cost at higher fare ratios. This also explains the decrease in operating cost component for both the optimal fleet size instances. In both cases, the optimal pricing strategy for the Agency would be to keep the fare of private on-demand service as low as possible (comparable to public transport).
The Profit for the Operator increases monotonically for both optimal fleet size instances with an increase in the fare ratio. Although the mode share of the private on-demand service decreases the more its fare increases, the increase in its revenue caused by the fare increment outweighs the revenue loss caused by the decrease in its modal share. Consequently, the Operator sees an overall increase in its profit when it becomes increasingly expansive relative to public transport despite the decrease in its modal share.

Mixed fleet size instances
Figures 11 and 12 plot the Agency cost and Profit of the operator along with its individual components for the mixed fleet size instances of 100 and 800. As can be seen from the two figures, as the fare of pooled on-demand service increases, the total Agency cost and the users' travel cost decrease till a ratio of 1:5:10 and then increase from 1:5:10 to 1:10:10. The Agency cost is primarily governed by the market share of the on-demand service and the share of private and pooled on-demand services. As the fare of pooled on-demand service increases, the service becomes less attractive and there is a modal shift from pooled ondemand to private on-demand service. Private on-demand service being a direct door-todoor service, the increase in its market share causes an overall decrease in the travel time of its users which also yields to a decrease in the Agency cost. This decrease in travel time  caused due to the shift from pooled service to private service outweighs the effect of an overall decrease in on-demand modal share till a ratio of 1:5:10. Conversely, beyond this point, the decrease in the market share of the on-demand service caused by the increase of fare ratio from 1:5:10 to 1:10:10 is substantial enough to outweigh the effect of travel time reduction caused due to the shift from pooled to private. The minimum Agency cost is hence achieved for a fare ratio of 1:5:10.
As in the previous case, the Profit for the operator increases monotonically for both mixed fleet size instances with an increase in the fare ratio of public transport to pooled to private service. Although the overall market share of on-demand services decreases with an increase in the fare ratio, the increment in Revenue due to an increase in its fare outweighs the decrease in its market share. This results in an overall increase in its Profit for the operator despite an overall decrease in its market share.

Conclusion
This study explored the relation between the optimal fleet size of an on-demand system with elastic demand from the perspective of a transport planning authority (Agency) and a service provider (Operator). An agent-based simulation framework was adopted for implementing the model with the day-to-day learning of users (which corresponds to the elastic demand). The model was implemented in the real world network based on Amsterdam North. Results indicated that operating a private on-demand service is more profitable for both Agency and Operator than a pooled on-demand service. Analysis of travel time of ondemand passengers also indicated that the effect of an increase in fleet size on travel time is more prominent for private on-demand when compared with pooled on-demand. Comparative analyses of optimal fleet size for Agency and Operator indicated different total fleet size with the Agency perspective requiring a larger fleet than would have been required if it is to be set by the Operator. The analysis also showed different dominant parts of the individual objective functions with revenue dominating the Operator's cost and user's travel cost dominating the Agency cost. An analysis of the Agency cost indicated the optimal scenario for the Agency would be the On-demand scenario in which the Agency operates a fleet of private on-demand vehicles as opposed to a scenario where no on-demand service is offered. This is due to an overall reduction in the travel time of users in the On-demand scenario compared to the Base Scenario. Fare sensitivity analysis of private and pooled on-demand service indicated that the optimal pricing strategy for the Agency would be to keep the fare of private on-demand service as low as possible (comparable to public transport).
In this study, we determined the private and shared fleets of an on-demand service provider with elastic demand. However, the service levels of the line-and schedule-based services were exogenously defined. Passengers were also not allowed to combine ondemand and line-based services in a single trip, albeit unlikely in the application considered in this study. Also, the cost components considered in this study do not include costs beyond the transit system such as societal costs (emissions and health). Moreover, a monopolistic market, where only one on-demand service provider prevails, was considered in this study. However, the market of on-demand services may consist of multiple competing operators offering competing services that cater to different segments in the market and differ in price, level of service (travel time and comfort), and types of service offered (private or pooled). Competition between such services will affect the optimal fleet size configuration. Future research directions and model improvement include thus developing a model which jointly optimises the service parameters of line-based public transport and an on-demand service while considering costs beyond the transit system, developing a route choice model that allows users to combine line-based public transport and on-demand services in a single trip, and considering oligopolistic markets where multiple on-demand operators prevail and a scenario where there is no overseeing authority and tendering of services.