Hybrid make-to-order/make-to-stock production systems are difficult to control. Batch production of make-to-stock products allows for efficient capacity usage, but fixed batch sizes can make the system less responsive to make-to-order customers. Using Markov Decision Process modeling, we show that the optimal policy for such hybrid systems varies the lot size in response to make-to-order backlogs as well as stock levels. We evaluate the performance of this flexible lot sizing policy for a two-product hybrid system. We find that it leads to savings of up to 23% compared to policies that use either completely or partly fixed lot sizes. We also find that flexible lot sizing is especially beneficial for systems with a low load and where make-to...