  We study a real-time bidding problem resulting from a set of contractual
obligations stipulating that a firm win a specified number of heterogeneous
impressions or ad placements over a defined duration in a real-time auction.
The contracts specify item targeting criteria (which may be overlapping), and a
supply requirement. Using the Pontryagin maximum principle, we show that the
resulting continuous time and time inhomogeneous planning problem can be
reduced into a finite dimensional convex optimization problem and solved to
optimality. In addition, we provide algorithms to update the bidding plan over
time via a receding horizon. Finally, we provide numerical results based on
real data and show a connection to production-transportation problems.
