This study investigates the dynamic lot-sizing problem integrated with Condition-based maintenance (CBM) for a stochastically deteriorating production system. The main difference of this work and the previous literature on the joint optimization of lot-sizing and CBM is the relaxation of the constant demand assumption. In addition, the influence of the lot-size quantity on the evolution of the equipment degradation is considered. To optimally integrate production and maintenance, a stochastic dynamic programming model is developed that optimizes the total expected production and maintenance cost including production setup cost, inventory holding cost, lost sales cost, preventive maintenance cost and corrective maintenance cost. The algorith...