Discrete dynamic pricing and application of network revenue management for FlixBus

We consider a real discrete pricing problem in network revenue management for FlixBus. We improve the company's current pricing policy by an intermediate optimization step using booking limits from standard deterministic linear programs. We pay special attention to computational efficiency. FlixBus' strategic decision to allow for low-cost refunds might encourage large group bookings early in the booking process. In this context, we discuss counter-intuitive findings comparing booking limits with static bid price policies. We investigate the theoretical question whether the standard deterministic linear program for network revenue management does provide an upper bound on the optimal expected revenue if customer's willingness to pay varies over time.


Introduction
When the German government deregulated the long-distance bus market in 2013, thirteen bus companies entered the market. But only five years later, FlixBus had conquered 90% of German bus market and has expanded well beyond Europe to Asia and the United States, see The Economist (2018).
The dramatic growth of the company is often attributed to its highly scalable business model: to be officially licensed as a bus company, FlixBus owns one bus, which is parked permanently. While regional bus companies own the green buses with the FlixBus logo, employ the drivers, and are responsible for the day-to-day running of routes, FlixBus can focus on permits, network planning, marketing, pricing, quality management and customer service. Ticket prices are split with its partners accordingly.
The willingness of investors to suffer from short term losses in order to gain market share is also cited as a source of FlixBus' growth, see The Economist (2018). Given its dominant position in Germany, however, the company started to focus on expected revenue maximization and employed roughly 50 revenue managers as of 2018. Each of those revenue managers manually supervised more than 20 FlixBus is a global mobility provider since 2013, and from 2018 also with FlixTrain, expanding this service to the rail industry. As a unique combination of tech-startup, e-commerce platform and transportation company, FlixBus quickly became Europe's largest intercity bus network, allowing for an affordable and sustainable alternative to private transportation. FlixBus network, that is in rapid growth in Europe and abroad, relies on close partnerships with small and medium-sized enterprises and often family-owned businesses. For the operation of the long-distance FlixTrains, the company cooperates with the most-successful private train operators in Europe. bus lines (independent networks) with a total of more than 150 legs per day.
Given this challenge and the willingness to expand even further, it was an operational necessity to automate pricing decisions to a larger degree than in the past. There are two main aspects of this problem: obtaining a realistic demand forecast including information about price elasticity and determining a pricing policy based on this forecast. This paper is mainly concerned with the second aspect, even though the first aspect had to be addressed also in order to obtain data, which could be used for realistic experiments.
Although many of the operational pricing constraints mimic those of the airline industry (perishable resource given highly price sensitive demand), a few key differences are: (1) only one of a few predetermined prices should be offered for each origin-destination-pair at the same time, (2) since tickets can be refunded at very low costs, large group bookings might be an issue if an uncontrolled number of cheap tickets can be bought early in the selling process, (3) given the limited computing resources, it is impossible to perform computationally expensive optimization procedures frequently for each bus line, (4) given the nature of bus rides with many stops, a typical customer uses more legs on a given ride than airline customers, and (5) since tickets can be returned with a maximum fee of 5 Euros (or Dollars), the need for increasing prices over time is large.
Problems with property (1) are usually referred to as discrete dynamic pricing problems and well-studied in the network revenue management literature. Most notably, Walczak et al. (2010) and Fiig et al. (2010) have shown that a transformation exists to transform discrete pricing problems to revenue management with independent demand. In this paper, we apply this transformation and discuss some lesserknown implications.
FlixBus traditionally imposed nested booking limits to guide revenue managers' decisions. Given this history and its implied computational infrastructure as well as the strategic decision (2) combined with the limited computing resources (3), a straight-forward bid price control was viewed as risky since bid price policies might allow groups to buy a large quantity of seats at a low price early in the selling process and then return them in case they are not needed. To quantify the expected revenue loss in the presence of early group bookings and to address the particularities (4) and (5), we present a computational study that focuses on those risks and discusses concepts on how to address those problems.
In particular, we make the following contributions: 1. We exploit the equivalence transformation from Walczak et al. (2010) to transform discrete pricing to revenue management with independent demand. We implement deterministic linear programs for both models to obtain booking limits, which can then be used directly in a leg-based pricing mechanism. Our simulation results suggest that this change alone could improve their current best practice pricing policy, which is based on expected demand forecasts. 2. We adopt a simple extension of the well-known deterministic linear program (DLP) for network revenue management to obtain an upper bound of the maximum expected revenue. This dynamic DLP is closely related to the approximate linear program obtained from the affine approximation as suggested by Adelman (2007). Doing so, we highlight that in dynamic discrete pricing with non-constant willingness to pay, the standard (static) deterministic linear program is not guaranteed to provide such an upper bound. 3. Given a discrete set of feasible prices, the network pricing problems we obtain are linear, leading to implementable and efficient pricing algorithms. This property, which is in stark contrast to the non-linear continuous pricing problems discussed in the literature, is especially important given the large number of bus lines served by carriers such as FlixBus. 4. Working with historical sales data including group bookings from FlixBus, we compare the company's present best practice pricing policy with standard revenue management pricing methods. We present counter-intuitive findings comparing nested booking limits with bid price policies. Considering worst-case scenarios, the fear of bid prices being risky due to the threat of early group bookings might indeed be unsubstantiated. 5. We find that dynamic programming decomposition provides the best results in all scenarios of our simulation. Due to its large computational requirements, however, this technique is infeasible for most practical purposes. This is why we suggest a reduction of the required memory capacity using piecewise linear approximations.

Literature review
The problem considered in this paper can be described as discrete dynamic pricing in network revenue management with time-dependent price elasticities and independent demand across origin-destination-pairs. As we discuss below, this problem is linked to the network revenue management problem with independent demand. In the first half of this section, we summarize relevant literature concerning general network revenue management and pricing. In the second half, we focus on literature which is more closely related to our specific setting.

General revenue management and dynamic pricing literature
Traditionally, revenue management models assume that a firm sells multiple perishable products simultaneously.
Prices for different products are fixed and demand for each product is independent of the availability of other products. In this setting, the firm can decide if incoming customer requests to buy a given product should be accepted or rejected, see e.g., Talluri and Van Ryzin (2004). Network revenue management and pricing problems consider products that may use more than just one resource. In general, these models suffer from the curse of dimensionality and can thus usually not be solved exactly. As a consequence, they have been approached by different approximation methods and heuristics.
The most common method is the deterministic linear program (DLP), see Talluri and Van Ryzin (1998). When including customer choice, or when considering a discrete dynamic pricing problem, a corresponding choice deterministic linear program (CDLP) can be formulated, see Gallego et al. (2004). Since both the DLP and CDLP are static and do not consider dynamic stochastic demand over time, it is common practice to frequently re-solve those linear programs during the selling process, see e.g., Jasin and Kumar (2012). However, there is no guarantee that re-solving increases the expected revenue, see Kumar (2013) or Cooper (2002). In addition, it is well-known that the DLP provides an upper bound of the maximum expected revenue in the traditional revenue management model. Similarly, CDLP provides an upper bound to the discrete dynamic pricing problem if the willingness to pay is constant over time, see e.g., Zhang and Adelman (2009). This result, however, does not hold for varying willingness to pay over time. In the context of approximate dynamic programming (ADP), tighter upper bounds than DLP can be found for traditional revenue management models.
Methods based on a dynamic programming decomposition divide the network problem into several single-resource problems by assigning adjusted prices to each productresource combination, see Talluri and Van Ryzin (2004).
Based on those approximations, booking limits or bid prices are often used to control a traditional network revenue management or discrete pricing problem, see Talluri and Van Ryzin (2004). Booking limits represent the maximum number of units of a product that should be sold. On the other hand, bid price policies approximate marginal seat values. A product is thus offered whenever its price exceeds the sum of all bid prices connected to the consumed resources.
De Boer et al. (2002) compare leg-based nested booking limits and bid price policies for network problems with independent demand. A similar comparison was conducted by Pimentel et al. (2018) for hotel revenue management. Both papers report superiority of nested booking limits over bid price methods. We add to this discussion in our numerical experiments.
Static booking limits and bid prices can be obtained from DLP. But static bid prices have the disadvantage of not considering remaining time or capacity. Adelman (2007) provides an ADP-based approach for computing timedependent bid prices. The resulting method is closely related to simply adding a time index to the DLP, see 'Dynamic versions of the static DLPs' and 'Upper bounds in pricing' below. Taking into account the remaining capacity becomes important when realized demand differs substantially from demand forecasts. Capacity dependent bid prices are addressed for example by Bertsimas and Popescu (2003), Topaloglu (2009), Meissner andStrauss (2012) or Vossen and Zhang (2015).
Dynamic pricing models determine prices for different products. Demand for each product generally depends on the set of prices for each product, see Gallego and Van Ryzin (1997) for an introduction and Chen and Chen (2015) for a literature overview. In the context of setting prices in transportation, as considered in this paper, customers often only request one particular origin-destination-pair without being influenced by the prices of other routes, see e.g., Erdelyi and Topaloglu (2011).
In contrast to continuous pricing problems, discrete pricing problems restrict the set of feasible prices for each product to a finite set. Such a problem can be transformed efficiently to an independent demand model, see Walczak et al. (2010) as well as Fiig et al. (2010).
Using ADP for dynamic pricing models, continuous prices usually lead to non-linear mathematical programs, see e.g., Ke et al. (2019). On the other hand, the discrete pricing problem often leads to a linear program, see e.g., Ke et al. (2019).

Related literature on bus and railway revenue management
Most literature about practical applications of revenue management theory is concerned with the airline industry.
For the bus industry, the authors are not aware of any literature on revenue management models. Passenger railway is very similar to the bus industry and has received much more attention in the literature. For an overview, see Armstrong and Meissner (2010). We summarize the most relevant literature on this application in the following.
Because prices are often fixed for railway companies due to government restrictions, most papers introducing models for this industry do not consider dynamic pricing, see e.g., Ciancimino et al. (1999), You (2008), Wang et al. (2016). Yuan et al. (2018) apply the compact reduction for the affine approximation done by Vossen and Zhang (2015) to a railway revenue management problem. Since their setting includes a general customer choice model, even the reduced linear program is of an exponential size and must be solved by constraint generation. Zheng and Liu (2016) and Zheng et al. (2017) optimize over a continuous set of feasible prices, which renders their mathematical problem highly non-linear. Similarly, Hu et al. (2020) implement a Quasi-Newton method to solve their dynamic pricing problem.
Hetrakul and Cirillo (2014) discuss a simultaneous pricing and seat allocation model. In their model, the total demand over the selling horizon is fixed. Dynamic pricing can only influence the booking time distribution. Qin et al. (2019) as well as Zhu and Zhao (2020) need booking limits together with dynamic pricing because their model includes an upper bound constraint on the price. The resulting mathematical programs are solved by a heuristic algorithm or LINGO, respectively.

Outline of paper
In 'Preliminaries and problem formulation', we introduce the general problem framework and notation. In 'Status quo: leg-based booking limits based on expected demand', we shortly outline the pricing policy currently used by FlixBus. We start the discussion of standard revenue management methods with the introduction of the choice deterministic linear program and its equivalent independent demand DLP in 'Other heuristics for the discrete pricing problem'. The dynamic improvement of the DLP is done in 'Dynamic versions of the static DLPs'. We discuss upper bounds that are obtained from our pricing problems in 'Upper bounds in pricing'. Then, we discuss the threat of early group bookings in 'Danger of early group bookings'. We also suggest remedies which take into account computational limitations. The paper concludes with numerical experiments using real data in 'Numerical experiments'.
All proofs to our theorems and lemmas can be found in 'Proofs'.

Preliminaries and problem formulation
A bus route starting at origin 1 and running to destination L + 1 with stops at locations 2, 3, … , L is commonly referred to as a bus line. Since in our application, transfers are rare, we consider a network corresponding to one bus line.
For a particular bus line, various origin-destination-pairs j ∈ {1, … , J} are sold during a finite selling horizon of continuous time ∈ (0, T ] , where denotes the time-to-go until departure. The bus company may choose the best price for every origin-destination-pair over time from a given set of prices. Its goal is to maximize the expected revenue generated from the selling process.
Each origin-destination-pair j starting at origin o and ending at destination d consists of T be the column corresponding to origin-destination-pair j . For each origin-destination-pair j , there are fare classes f ∈ {1, … , F} with corresponding prices P j,f , with P j,1 > P j,2 ⋯ > P j,F . The additional artificial fare class f = 0 provides the possibility of closing a particular origin-destination-pair for sale. At time T , no ticket has been sold yet and the bus has a total capacity of c l = C seats on each leg l . For notational convenience, we The customer arrival stream is modeled as a non-stationary Poisson process with arrival rate ,j . An arriving customer requesting origin-destination-pair j is willing to pay fare class f with probability Pr(f | , j) , where Pr(F| , j) = 1 . To model group bookings, we assume that the probability distribution of the group size is known and given by s s∈ℕ , where we interpret s as the probability for a group size s . For each group size s , the arrival stream is then modeled as a non-stationary Poisson process with arrival rate s ,j ∕s . To simplify the model, we divide the time horizon into a finite number of intervals t−1 , t , t = 1, … , T . In each time interval t , the expected number of customers requesting origin-destination-pair j and willing to pay at most P j,f is We choose the time grid fine enough such that ∑ j D t,j,F ≤ 1 for each t , i.e., we assume that for all t , at most one customer arrives in expectation.
Let x l be the number of remaining seats on leg l during the selling process and � ⃗ x = x 1 , … , x L T . The value function maximizing the expected revenue that can be obtained by choosing the fare class of each origin-destination-pair for all t is then given by: The optimal pricing policy based on the value function is: where Given � ⃗ x , the chosen fare class maximizes the sum of the expected one-stage revenue and the expected value function given the reduced number of seats � ⃗ x − A j given a sale and � ⃗ x given no sale. Since the number of states increases exponentially in the number of legs, this recursion suffers from the curse of dimensionality and is therefore intractable even for relatively small problems.

Status quo: leg-based booking limits based on expected demand
Until recently, FlixBus exclusively implemented a pricing policy which specifies booking limits that are based directly on the expected demand. We present a simplified version of their algorithm which should be sufficiently compatible in order to illustrate the core idea. Expected demand D t,j,f for origin-destination-pair j at time t willing to pay at most P j,f is estimated from historical data. Given this, the number of customers expected to request origin-destination-pair j and willing to pay fare class f but Assuming that demand equals expected demand on leg l , a booking limit of tickets should be sold to fare class f for each leg l . These booking limits are then adjusted in order to ensure that the cumulative booking limit on each leg l does not exceed the total capacity of seats, c l = C , by reducing the booking limits of the lowest-priced fare classes.
Having computed these booking limits for each leg l and each fare class f , the fare class offered is determined as the lowest fare class that is available for sale on all legs l contained in the requested origin-destination-pair j. This leg-based booking limit mechanism for pricing is remotely related to the nested network policy discussed by Pimentel et al. (2018). Since expected demand is used directly to compute booking limits and nesting is done by fare class, it can be viewed as a computationally less expensive dynamic pricing version of the algorithm suggested by De Boer et al. (2002) for traditional network revenue management with independent demand.
In the following, we refer to this booking limit policy based on expected demand as BL-ED. As long as the demand forecast is not changed, leg-based booking limits always lead to increasing prices over time. The additional ( recommendation to only update booking limits of fare classes that are not fully booked at the time of the update ensures increasing prices over time even in the presence of forecast updates. This control policy has two major drawbacks: (1) booking limits based on expected demand may perform poorly even on single-leg problems depending on the price differences between fare classes and the shape of the demand distribution and (2) leg-based booking limits severely restrict the options to control demand streams in network revenue management.
Drawback (1) is well-known in the revenue management community. Therefore, we provide a short toy example to demonstrate drawback (2):

Example drawback 2
Consider a bus with 5 seats going from origin 1 to destination 3. Prices for origin-destination-pairs 1-2 and 2-3 are 5 for fare class 2 and 15 for fare class 1. Prices for origin-destination-pair 1-3 are 7 for fare class 2 and 20 for fare class 1. Expected demand for all origin-destination-pairs is expected to be larger than 5 for fare class 2; it is 0 for fare class 1. Even though it is obvious that origin-destinationpair 1-3 should now be closed to bookings in fare class 2 and the others should remain open, such a policy cannot be implemented given leg-based booking limits. Note that (leg-based) bid prices could resolve this drawback by setting them equal to 4 for both legs. Since 5 > 4 but 7 < 4 + 4 , this would open fare class 2 for origin-destination-pairs 1-2 and 2-3, and close fare class 2 for origin-destination-pair 1-3.

Other heuristics for the discrete pricing problem
To address the drawbacks mentioned above, we suggest a set of standard methods of revenue management, adapted to the discrete pricing problem.

Deterministic linear programs
Within the class of deterministic linear programs, we suggest two approaches: (1) view the discrete pricing problem as a special case of the deterministic linear program with customer choice, as suggested by Gallego et al. (2004), and (2) transform the discrete pricing problem to a capacity control problem with independent demand and then use the standard DLP, see Talluri and Van Ryzin (2004). We first introduce both approaches and then show that they are equivalent.

Choice deterministic linear program
The following linear program was suggested for general customer choice models by Gallego et al. (2004) but can easily be applied to our discrete pricing setting as demonstrated by Erdelyi and Topaloglu (2011): where D j,f = ∑ T t=1 D t,j,f . For each origin-destination-pair j , the variable j,f can be interpreted as the portion of time at which fare class f is offered during the selling horizon. The objective is to maximize the expected revenue. The first constraint is the availability constraint, the second constraint enforces consistency with the interpretation of . The dual values of the first constraint yield bid prices l , which can be used as an approximation for the marginal seat value: Inserting this approximation into (3), we obtain the following pricing policy, which aims at a maximization of a one-stage expected revenue with bid price adjusted prices: We refer to this policy as BP-CDLP. Given the statusquo implemented at FlixBus, a policy based on leg-based booking limits would require only minimal changes. We hence also suggest to control the selling process as outlined in 'Status quo: leg-based booking limits based on expected demand' but based on the expected demand that should be satisfied, D j,f j,f instead of D j,f − D j,f −1 , i.e., using booking limits b l,f = ∑ j A l,j D j,f j,f . We refer to this policy as BL-CDLP in the following.
To allow the underlying bid prices to change over time, the underlying deterministic linear program is often resolved multiple times during the selling process in practice.

Transformation to revenue management with independent demand
Since it is well-known that discrete pricing problems can be transformed to capacity control problems with independent demand (see Fiig et al. (2010) and Walczak et al. (2010)), the well-known DLP used in network revenue management can also be used for our discrete pricing problem.
As a first step, we transform total demand and prices as follows: For every origin-destination-pair j , we delete all fare classes which do not belong to the efficient frontier, see Fiig et al. (2010). In the following, we only consider the remaining set of efficient fare classes F j .
If fare classes f � = 1, … , f are offered given the independent demand assumption, customers willing to pay at most P j,f ′ with f ′ < f do not buy down to fare class f . Since they buy down in the discrete pricing problem, demand is adapted to d j,f � ∶= D j,f � − D j,f � −1 . According to Walczak et al. (2010), we then transform prices as follows: With the transformed demand d j,f and prices p j,f , we can reformulate the standard DLP given in Talluri and Van Ryzin (2004): In this linear program with independent demand, the value y j,f represents the booking limit for origin-destination-pair j and fare class f . The objective is to maximize the expected revenue. The first constraint ensures availability. The second constraint forces the booking limits to not exceed the demand forecasts. The following Theorem shows that P DLP is equivalent to P CDLP and yields the same bid prices.

Theorem 1
The linear programs P CDLP and P DLP are equivalent and yield the same bid prices.
Booking limits y j,f obtained from P DLP are booking limits of the transformed problem and in general not equal to D j,f j,f . Since P DLP has much more intuitive appeal, however, we also suggest a pricing policy BL-DLP that controls the selling process as outlined in 'Status quo: legbased booking limits based on expected demand' but based on P DLP using booking limits b l,f = ∑ j A l,j y j,f . For integer demand forecasts d j,f , the unimodularity of the constraint matrix implies that optimal solutions of P DLP and hence the corresponding booking limits used by BL-DLP are always integer, see Bertsimas and Popescu (2003).
In revenue management with independent demand, all fare classes which satisfy p j,f ≥ ∑ l l A l,j are offered. Consistent with the above intuitive discussion of the transformation formula, the corresponding discrete pricing policy BP-DLP offers the lowest such price, implying Lemma 1 The pricing policies BP-CDLP and BP-DLP are equivalent.

Dynamic versions of the static DLPs
Both P CDLP and P DLP ignore the dynamic nature of the problem. Given time-dependent price elasticities, we expect that adding a time index to the variables should improve performance. The following linear program is based on a more general dynamic formulation of P CDLP provided in Kunnumkal and Topaloglu (2008): The intuition of this linear program closely follows the interpretation of P CDLP : Variable t,j,f is interpreted as the probability that price class f for origin-destination-pair j is offered at time t.
A dynamic version of P DLP can be formulated accordingly. To do this, let d t,j,f , p t,j,f be the result of a transformation as outlined in 'Transformation to revenue management with independent demand', but using D t,j,f instead of D j,f . The following linear program is similar to the singleresource multi-product stochastic version of Maglaras and Meissner (2006): Just like their static counterparts, these two problems are equivalent. The proof of the following theorem is analogue to the proof of Theorem 1.

Theorem 2
The linear programs P d−CDLP and P d−DLP are equivalent and yield the same bid prices.
Bid prices l obtained from P d−CDLP or P d−DLP can be used to construct a policy using (4) if D j,f is replaced with D t,j,f . We refer to this policy as BP-dDLP. We can also construct leg-based booking limit policies BL-dCDLP resp. BL-dDLP by computing

Upper bounds in pricing
For capacity control problems with independent demand and constant prices, it is well known that the (static) DLP provides an upper bound of the exact value function, see e.g., Bertsimas and Popescu (2003). Adelman (2007) prove that the (static) CDLP is an upper bound of the exact value function. If we transform a discrete pricing problem with timedependent price elasticity to a single stage capacity control problem with independent demand, however, the optimal value of neither P CDLP nor P DLP provides an upper bound for the exact value function. This is because these static models assume constant prices over time and a timedependent price elasticity leads to time-dependent transformed prices. We demonstrate this in numerical experiments in 'Numerical experiments'. Kunnumkal and Topaloglu (2008) prove that the dynamic deterministic linear program P d−CDLP , however, provides an upper bound. Again, the affine approximation from Adelman (2007), adapted to the discrete pricing model, provides a tighter bound. The proof of the following theorem can be found in 'Proofs'. It highlights the close similarity of P d−DLP and the affine approximation from Adelman (2007): Theorem 3 Let Z d−DLP be the optimal value of P d−DLP and P d−CDLP . Furthermore, let P AL be the approximate linear program based on (1) and (2) with the affine approximation as described by Adelman (2007), and let Z AL be the optimal value of P AL .

Danger of early group bookings
Given the strategic decision to allow for low-cost refunds, groups could buy large numbers of tickets early in the selling process without large financial risks. In the face of such a threat, a booking limit policy often appears to be safer than a static bid price policy since the number of tickets sold at small prices is limited. Using a booking limit policy for a given origin-destination-pair j , the number of tickets sold at P j,f is always restricted by the booking limit. If the remaining capacities are x l , tickets are currently offered at P j,f , and a group requests n tickets at the same time, at most min l {x l − ∑ f −1 f � =1 b l,f � } seats are sold at price P j,f . If this number is smaller than n , the remaining seats are offered at higher prices.
A pricing policy based on bid prices always offers the lowest price class f such that the transformed price p j,f is larger than the sum of the bid prices of the legs used on this origin-destination-pair. If the remaining capacity on each leg l is x l , tickets are currently offered at P j,f , and a group requests n tickets at the same time, the total price charged is nP j,f as long as n ≤ x l for each leg l used by origin-destination-pair j.
Most commonly, this drawback of bid price based policies not being capacity-dependent is addressed by resolving the underlying problem multiple times over the selling horizon. Given these updated bid prices, new capacity levels are taken into account. In our setting, however, updates can only be done overnight due to computational capacity restrictions. But even given more computational resources, it seems difficult to schedule an update in the middle of a group booking.
In the following, we will argue that the intuition of booking limits being superior in such a setting need not be true. Instead, the performance of booking limit vs. bid price policies highly depends on the circumstances of the group booking.
In general, our simulations confirm this intuition if such group bookings represent extra unexpected demand. To demonstrate that this is not generally true, however, consider the following setting: assume that high fare demand occurring during the selling process belongs to passengers traveling to a group event. A group organizer might venture to buy tickets for all potential participants early in the booking process. The total expected demand remains unchanged, but the temporal distribution differs from the forecast. We outline an example of this setting in the following:

Example group organizer
Consider a single-leg bus line with a capacity of 16 seats and two fare classes f = 1, 2 with prices P 1 = 20, P 2 = 10 . We divide the booking horizon into two time periods t = 1, 2 and assume that both demand and willingness to pay increase as departure approaches. In particular, demand D t,f is deterministic and equal to D 2,1 = 1, D 2,2 = 6 in period t = 2 , and D 1,1 = 8, D 1,2 = 12 in period t = 1 . All D 1,1 = 8 high fare passengers travel to a group event. The bus departs at the end of period t = 1 . Booking limits b f obtained by BL-CDLP are equal to b 1 = 8, b 2 = 8 . Bid price policy BP-DLP also starts by offering the lower fare class. We assume that a group organizer buys all D 1,1 = 8 tickets at a price of P 2 at the beginning of period t = 2 (before regular demand of this period arrives). Consequently, all high fare demand in period t = 1 is lost.
At the beginning of period t = 2 , the booking limit policy sells 8 tickets to the group organizer at P 2 = 10 and then increases the price to P 1 = 20 . Since D 2,1 = 1 in period 2, one ticket is sold at price P 1 = 20 . During period t = 1 , all high fare demand D 1,1 = 8 is satisfied by the group organizer and no tickets can be sold by the bus company. The total revenue equals 8 ⋅ 10 + 1 ⋅ 20 = 100 . The bid price policy also sells 8 tickets to the group organizer, and another 6 tickets at price P 2 = 10 in period t = 2 . After updating, the price is increased, but all high fare demand at t = 1 is again lost. The total revenue equals 8 ⋅ 10 + 6 ⋅ 10 = 140 . In this example, the bid price policy beats the booking limit policy by 40%.
If an early group booking replaces high fare demand that would normally occur towards the end of the booking horizon, the above example shows that booking limits cannot always prevent corresponding revenue losses. Even worse, booking limits might protect seats for high fare demand which is then lost. We further demonstrate this phenomenon in our numerical experiments with stochastic demand below.
Alternatives to static bid price policies and booking limit policies include: (1) Solving P DLP for a set of given capacity levels, leading to a table of capacity-dependent bid prices (see 'Capacity-and time-dependent bid prices based on static deterministic linear program' for details) and (2) implementing the standard dynamic programming decomposition method (DPD). Since the memory capacity needed for DPD is large, we suggest approximating the decomposed value function piecewise linearly (see 'Dynamic programming decomposition' for details). Naturally, such improvements come at a computational cost. We discuss this tradeoff in the numerical experiments.

Numerical experiments
In this section, we consider a real-life bus line that starts in city 1 and goes to city 6 with 4 stops (at cities 2, 3, 4, and 5). Hence, there are L = 5 legs. The bus has a capacity of C = 46 . Due to legal restrictions only J = 11 origin-destination-pairs of the 15 possible combinations are offered. For each origin-destination-pair, there are F = 8 fare classes.
We first explain our demand data, which we derive from historical sales. Second, we present results of simulations we ran based on these data sets. Third, we discuss these results and try to explain the observed phenomena.

Estimation and simulation of demand
For the 5-leg ride described above, we obtained (1) data of internal demand rate forecasts for 46 departure times of one particular month as well as (2) the corresponding historical selling prices.
F l i x B u s f o r e c a s t s d e m a n d r a t e s t t=1,…,24 = (1, 2, 3, … , 91, 364) days before departure. Constant demand rates ,j ⋅ Pr(f | , j) are assumed within the time interval ( t−1 , t ] . In order to obtain ∑ j D t,j,F ≤ 1 , we divided each of these time intervals into sufficiently small sub-intervals. We refer to demand streams given by a process that first randomly picks one of the departure times and then generates demand according to the given demand rates as "company data".
Since we cannot reveal how the internal forecast was derived, we additionally unconstrained historical sales by fitting a parametric model using regression. We call this data set "parametric data".
Given prices P j,f for origin-destination-pairs j and fare classes f = 1, … , F , the model underlying the data set "parametric data" has parameters.
• and modeling the total exponential arrival rate e ; • g j j with ∑ j g j = 1 providing the probability of incoming demand requesting origin-destination-pair j ; and • the price elasticity coefficient Λ j ( ) , which evolves over time polynomially with exponent j and satisfies Λ j (0) = (0) j and Λ j T = (T) j .
Modeling the willingness to pay via an isoelastic function with elasticity coefficient Λ j ( ) depending on time polynomially, see Schlosser (2015), this yields The parameters were fitted to historical sales of a particular month via a least squares regression. (A Tikhonov-type penalty term was added for stability.) Based on the results, we determined the time grid 1 , … T such that formula (5) yields ∑ j D t,j,F = 1 − p 0 with p 0 = 0.2 . Consistent with the interpretation of the "company data", arrival rates are then assumed to be constant within time intervals ( t−1 , t ] , i.e., Highlighting the time-dependence of price elasticity, note that for origin-destination-pair 3-4, we obtain Λ j T = 4.98 and Λ j (0) = 0.27.
For arrival times earlier than 15 days before departure, arrival rates are very low but do not drop exponentially. This is why we only consider ≤ 15 in our fitted data, shortening the booking horizon and hence lowering expected demand slightly. To decrease the discrepancy between "parametricand company data", we also shorten the booking horizon of the "company data" to 105 days.
For both data sets, we simulated three booking scenarios: single arrivals, group arrivals and the case of a group organizer. These three scenarios use the same forecast and only differ with respect to the simulation. For the single arrivals scenario, we have s = 1 if and only if s = 1 , and s = 0 for s > 1 . This is the assumption used in most academic papers. For the group arrivals scenario, we determined the distribution of s using historical data.
We simulate a group organizer as follows: For one given origin-destination-pair j gr , all demand willing to pay a where certain price P gr is part of the group event. The expected demand of potential participants of the event is 1.5 times the total forecast ∑ t D t,j gr ,f for all f with P j gr ,f ≥ P gr . The group organizer buys tickets for all potential participants in the first time period t = T according to stochastic demand with expectation 1.5 ⋅ ∑ t D t,j gr ,f . At the end of the booking horizon, 1 3 of the participants is expected to cancel ensuring that the total expected demand is unchanged. Accordingly, each ticket bought in the first time period t = T is returned for a fee of 5 Euros with probability 1 3 . In our simulations, we choose j gr to be the origin-destination-pair 3-4, which only uses leg 3. As the estimated willingness to pay differs significantly between the company data and the parametric data, we choose P gr = 19.99 for the company data and P gr = 11.99 for the parametric data.

Pricing policies
We compare the performance of the following policies in the demand scenarios described above.
BL-ED: FlixBus' currently used leg-based booking limit mechanism, which is based directly on expected demand as described in 'Status quo: leg-based booking limits based on expected demand'. BL-CDLP: FlixBus' leg-based booking limit mechanism combined with the booking limits obtained from P CDLP instead of expected demand as described in Choice deterministic linear program'. BL-DLP: FlixBus' leg-based booking limit mechanism combined with the booking limits obtained from P DLP instead of expected demand as described in 'Transformation to revenue management with independent demand'. BL-dCDLP: FlixBus' leg-based booking limit mechanism combined with the booking limits obtained from P d−CDLP as described in 'Dynamic versions of the static DLPs'. BL-dDLP: FlixBus' leg-based booking limit mechanism combined with the booking limits obtained from P d−DLP as described in 'Dynamic versions of the static DLPs.
BP-DLP: Bid price policy based on the dual values of P DLP as described in 'Transformation to revenue management with independent demand'. BP-dDLP: Bid price policy based on the dual values of P d−DLP as described in 'Dynamic versions of the static DLPs'.
Values of all the above-mentioned policies are updated 5,4,3,2 and 1 days before departure. In addition, we consider: BP-levels: Capacity-dependent interpolated bid prices based on the dual values of P DLP with different capacity levels as described in 'Danger of early group bookings' and 'Capacity-and time-dependent bid prices based on static deterministic linear program'. DPD-exact: Standard dynamic programming decomposition based on the bid prices obtained from P DLP as described in 'Danger of early group bookings' and 'Dynamic programming decomposition'. DPD-approx: Piecewise linear approximation of the dynamic programming decomposition as described in 'Danger of early group bookings' and 'Dynamic programming decomposition'.

Results
The average revenues of the different pricing policies, data sets, and scenarios are displayed in Table 1. Relevant computing times are reported in Table 2. The average number of sold seats per leg for both the single arrivals and group organizer scenario are shown in Table 3. The average numbers of sold tickets per fare class on leg l = 3 for the group organizer scenario are displayed in Table 4. The temporal developments of average prices for four important origin-destination-pairs are plotted in Figs. 2 and 3.
For the parametric data, we also report the optimal values of the linear programs P CDLP , P DLP , P d−CDLP , P d−DLP as well as P AL in Table 5.
Overall, simulations using the company data generally produce higher revenues than simulations using the parametric data. This difference is mainly due to the fact that the company data estimates higher willingness to pay than our model. Single arrivals simulations also generally produce higher revenues than group arrivals simulations. This is because in our simulation group bookings, which are not taken into account during the optimization process, occupy more low fare seats than expected.

Upper bounds
Note that a few simulated expected revenues for parametric data and single arrivals in Table 1 exceed the optimal values of P DLP and P CDLP given in Table 5. As mentioned before, P DLP and P CDLP do not offer an upper bound of the maximum expected revenue.

Comparison of pricing policies
Turning to the comparison of the different pricing policies, we first focus on single arrivals and group arrivals. Comparing average revenues in Table 1 (obtained using the parametric or company data), we observe that FlixBus' current pricing policy BL-ED is outperformed by the booking limits obtained from P CDLP , which in turn are outperformed by the booking limits obtained from P d−CDLP . Booking limits obtained from the standard deterministic linear programs P DLP and P d−DLP perform worse than their corresponding choice linear programs P CDLP and P d−CDLP . This is not surprising since booking limits of P DLP and P d−DLP represent optimized booking limits for a capacity control problem with independent demand and hence should not be used directly in a pricing context.
Bid price policies using dual values from P DLP and P d−DLP also beat FlixBus' current policy and work especially well when using the company data. Capacitydependent P DLP -bid prices (policy BP-levels) do not offer a substantial improvement compared to the policies already mentioned. Dynamic programming decomposition Table 1 Average revenues, standard error ≤ 10 outperforms all other policies, and only loses little quality when approximated piecewise linearly. Comparing the booking limit policy BL-CDLP with the bid price policy BP-DLP, our results are in line with De Boer et al. (2002) and Pimentel et al. (2018), confirming that booking limit policies lead to larger expected revenues when our parametric data is used. This, however, is not true when using the company data. Hence, no clear hierarchy can be established.
Comparing the two data sets, it seems like the stark change in willingness to pay in the last hours before departure is the main driver of booking limits outperforming bid prices given our parametric data set. Since bid prices are only updated on a daily basis in the last days before departure, prices cannot increase during the day. Booking limits, however, can lead to increasing prices within a day. The company data, on the other hand, suggests a lower change in willingness to pay. In this setting, price changes during a single day are less important.

Group organizer
The average revenues reported in the group organizer scenario in Table 1 underscore the discussion of 'Danger of early group bookings': Booking limits do not necessarily provide better results than bid price policies. Looking at the columns for leg l = 3 in the group organizer scenario in Table 3, we observe that the performance correlates with the average number of sold seats. Badly performing booking limit policies protect seats for high fare demand, which is then lost to the group organizer, see Table 4. Compared to bid price policies, this results in a small number of seats sold. Finally, dynamic programming decomposition outperforms all other policies also for the group organizer scenario.

Computational efficiency
Taking a look at Table 2, we see that computing bid prices for different capacity levels (policy BP-levels) is the least efficient method, directly followed by dynamic programming decomposition (policy DPD). In our experiments, approximating the decomposed value function piecewise linearly reduces the needed memory capacity by two orders of magnitude, see 'Dynamic programming decomposition'. Considering performance, we conclude that dynamic programming decomposition combined with piecewise linear approximation (policy DPD-approx) tends to yield a better tradeoff than BP-levels.
The trade-off between computational efficiency and performance quality is confirmed by Tables 1 and 2: Efficient policies such as BL-CDLP or BP-DLP are outperformed by dynamic programming decomposition, which is computationally more involved.
Price paths of different pricing policies Concerning price developments, we can observe in Figs. 2 and 3 that most policies increase prices fairly monotone. As expected, booking limit policies produce monotone prices. Capacitydependent price policies, which are not based on booking limits, such as DPD and BP-levels, need not always lead to monotone prices.

Conclusion
In this paper, we considered a real-world discrete pricing problem for FlixBus, a large European bus company.
The company's current pricing policy, which implements booking limits directly based on expected future demand, was improved by an intermediate optimization step using  booking limits from standard deterministic linear programs. Similar improvements could be achieved implementing bid price policies. The fear that bid price policies, in contrast to booking limits, cannot protect resources from the threat of early group bookings turned out to be unsubstantiated if total demand remains unchanged: protecting seats for high fare demand does not necessarily make sense if this demand is replaced by an early group booking.
In all scenarios, dynamic programming decomposition outperformed all other policies. The required memory capacity can be reduced substantially by approximating the decomposed value function piecewise linearly, which, however, still needs much more computing time than solving standard deterministic mathematical programs.
We demonstrated that the standard static choice deterministic linear program only guarantees an upper bound of the maximal expected revenue if price elasticities are constant over time. As soon as a time index is added to the linear program, we obtain a dynamic deterministic linear program that provides an upper bound.
Further research can be done by investigating different early group booking and scalper scenarios. In particular, it would be of interest if, based on scenario characteristics, recommendations concerning the choice of an appropriate policy can be made. Second, concerning the comparison of discrete and continuous pricing problems, the trade-off between computational efficiency and accuracy should be researched in more detail.
Let , be feasible to P AL , and define y t,j,f ∶= d t,j,f t,j,f . The first constraint of P AL implies From A l,j 1,j,f ≤ 1,l , it follows that Therefore, y is feasible to P d−DLP . This proves Z AL ≤ Z d−DLP . ◻

Capacity-and time-dependent bid prices based on static deterministic linear program
To obtain capacity-and time-dependent bid prices, we solve the deterministic linear program P DLP for different capacity levels and different time points. During a booking process, current bid prices can then be obtained by interpolation and be used directly in formula (4) to compute current prices.
We choose time points 0 = t 0 < t 1 < t 2 < ⋯ < t M = T and capacity levels 0 = x 0 < x 1 < x 2 < ⋯ < x N = C . Then, consider the following collection of deterministic linear programs: where d m and p m are the result of the transformation using D t,j = ∑ t m t=1 D t,j,f , see 'Transformation to revenue management with independent demand'. Let m,n l be the dual values of P m,n DLP , m = 1, … M, n = 1, … N. Let t and x l be the current time step and the remaining capacities during a booking process. Based on the values ∑ T t=2 ∑ j,f A l,j y t,j,f + 1,l = c l .

� P m,n
Finally, ∑ l v t,l � x l � is used as an approximation for the exact value function v t � ⃗ x . In order to apply the resulting pricing policy, all values v t,l x l must be stored. The number of these values is LTC . To reduce storage space, we approximate the value function for each leg l piecewise linearly. To do so, let t m and x n l be the same time-and capacity-levels as in 'Capacity-and time-dependent bid prices based on static deterministic linear program'. We define the following piecewise linear basis functions: Then, by construction of these basis functions, the corresponding weights are determined using the slopes of secants connecting points of the value function graph at the predetermined capacity-and time-levels: An approximation of v t,l (x) is then given by The number of values l,n,m that now needs to be stored is reduced to LMN . In our numerical experiments using the parametric data, see 'Estimation and simulation of demand', the numbers are Consequently, the required memory capacity is reduced by a factor of 5⋅170⋅46 5⋅7⋅10 ≈ 112.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.