Dynamic Pricing in Car Sharing: From a Lookup Table to ML

Alexander Vorontsov11 Apr 2025

Problem

A car sharing service wants cars within walking distance of users even at peak demand, and no car idling for hours. A surge coefficient on the base rental price helps, but a real-time model needs a scoring service, a message broker such as Kafka and a log store. It is also unclear what to predict: coefficient, demand or idle time. One coefficient per zone ignores differences between cars.

Example from the article: Citydrive started with a hand-filled table of coefficients per city hexagon and hour, then added online signals, then moved to a coefficient per car.

Solution in brief

The team went through four stages. A hexagon-and-hour table gave a fast start, and a blend with online zone signals added reactivity. A per-car model then predicts how many minutes a car will stay free, and a percentile mapping turns that prediction into surge. The last stage sets surge so that a chosen share of cars stays free.

Questions this case answers
  • How to set a per-item price coefficient from a predicted time-to-sale when the same item cannot be shown at several prices at once
  • How to evaluate a pricing change when splitting by region distorts behavior and splitting by user is not allowed
  • How to adjust car sharing prices by location and time so that cars stay within walking distance and do not sit idle?
  • How to move from a hand-made price table to an ML model that scores each parked car in real time?

Tools and methods

  • Hex grid with hourly table — baseline coefficient per hexagon and hour
  • Blend of historical and online coefficients — weights set how sharply prices react
  • Time-switching test — old and new model alternate by hour
  • Classifier cascade plus CatBoost — predicts idle time in minutes
  • Elasticity curves and percentile mapping — turn predicted idle time into surge
  • ETNA — time series library, tested and rejected
  • Apache Kafka — carries the "car parked" event to scoring
Continue reading — it's free

Google or a one-time email code. No password.