
2 PRICING ALGORITHM
A data-driven dynamic pricing strategy needs to suc-
cessfully combine the following two aspects: on the
one hand, it might be computationally expensive to
compute optimal prices for each client, and on the
other, we need to be able to react to the arrival of
new clients in real time. Furthermore, the time-
dependency of the prices makes it impractical to pre-
compute them for all possible situations.
Therefore, our strategy is divided into two phases:
an offline phase in which we precompute information
in a time-independent way, and an online phase in
which we can quickly use this information to serve
the clients. The details of these phases are presented
in the following subsections.
2.1 Input Data
Before we present the details of our pricing algorithm,
let us first discuss the data which is required to run it.
For each aspect below, we give a brief description of
how it is modeled and some intuition behind it. Pro-
viding actual high-quality model of each aspect is an
interesting research problem on its own, but these are
out of the scope of this paper. We do, however (in
Section 3), evaluate the robustness of our algorithm
with respect to the quality of the input data.
Vehicle Occupancy and Cost. Consider a vehicle
traveling along a prescribed route, picking up and
dropping off clients at various towns. It is often possi-
ble to serve a number of clients exceeding the capac-
ity of the vehicle, because some of them may travel
on non-overlapping parts of the route, and thus “share
a seat”. To capture this, we need a way of modeling
the occupancy of the vehicle.
Unfortunately, the number of possible combina-
tions of clients served by the vehicle is usually pro-
hibitively large to model explicitly. Therefore, we
propose a more general model, which may abstract
away some of the details of vehicle occupancy, while
still handling the most profitable “seat sharing” situa-
tions (see also Section 5 for possible extensions).
Let the route be given as a set R of relations (i.e.,
pairs of towns). Each client, though able to specify
their exact pickup and dropoff locations, will be as-
signed to one of these relations. We model vehicle
occupancy by a finite automaton (Σ, T, η), where:
• Σ is a finite set of abstract occupancy states, with
a distinguished initial state s
0
corresponding to
the vehicle serving no clients (as an example, each
state might encode the number of occupied seats
on each of some coarse-grained segments of the
route),
• T is a finite set of client types, with an associ-
ated mapping τ : R → T assigning each relation
to a type (e.g., each type might correspond to a
set of route segments, with τ giving the segments
“touched” by a relation), and
• η: Σ × T → Σ is a partial transition function,
specifying how the occupancy state changes when
a client of a given type is sold a ticket (e.g., in-
crementing the number of occupied seats on each
segment of the client type).
For each state of the automaton, we also need to be
given the cost of operating the vehicle in that state.
Price Acceptance. For each relation r ∈ R and each
price, we need an estimated probability that a client
will accept the offer. It is reasonable to assume that
this probability is a non-increasing function of the
price. We require it to be given as a piecewise lin-
ear function a
r
: R → [0, 1] (with an arbitrary number
of pieces), called the (price) acceptance profile.
Relation Popularity. Individual relations served by
the route might differ in both how they affect the vehi-
cle automaton, and in their price acceptance profiles.
Therefore, we need to know how popular they are,
i.e., what is the probability that a random client will
want to travel between two given locations. Please
note that we assume the relative popularity of re-
lations to be constant over time—this finite (rela-
tion) popularity distribution D : R → [0, 1], with
∑
r
D(r) = 1, is taken as an input.
Client Demand. We model the arrival of new
clients as a variable-rate Poisson process. The algo-
rithm is given the rate of this process, as a function ρ
of the time left until the vehicle departs from its initial
location (this is the latest moment when it is possi-
ble to offer new tickets for all relations served by the
route).
2.2 Offline Phase
The goal of the offline phase is to estimate the ex-
pected profit S(s, k) from serving any given number k
of clients, starting from any given occupancy state s.
Let us take a single price acceptance profile, i.e.,
a piecewise linear function a
r
: R → [0, 1], and con-
sider offering a price x to a client with this profile.
Depending on whether they accept it or not, the ve-
hicle will transition to a new state, and thus the ex-
pected future profit will change by some amount δ.
VEHITS 2024 - 10th International Conference on Vehicle Technology and Intelligent Transport Systems
438