In this work, we study the optimization of a production system comprising a multi‐itemsingle machine with piecewise deterministic demands. We present a theoretical characterizationof the solution of the problem as the limit of penalized problems. We prove thatthe solution of the penalized problem is a Lipschitz continuous function that satisfies ageneralized quasi‐variational inequality with boundary conditions. We describe a numericalprocedure to compute this penalized optimal cost function.