  This study introduces an optimal mechanism in a dynamic stochastic knapsack
environment. The model features a single seller who has a fixed quantity of a
perfectly divisible item. Impatient buyers with a piece-wise linear utility
function arrive randomly and they report the two-dimensional private
information: marginal value and demanded quantity. We derive a
revenue-maximizing dynamic mechanism in a finite discrete time framework that
satisfies incentive compatibility, individual rationality, and feasibility
conditions. It is achieved by characterizing buyers' utility and deriving the
Bellman equation. Moreover, we propose the essential penalty scheme for
incentive compatibility, as well as the allocation and payment policies.
Lastly, we propose algorithms to approximate the optimal policy, based on the
Monte Carlo simulation-based regression method and reinforcement learning.
