A mathematical model of an optimization problem to define a short-term (one month) production plan which implements the best use of the production capacity with the condition of meeting the demand is proposed. Long-term planning of autoclaved production (up to six months) with the account of the dynamics of demand and possible residual products in stock are also considered. The results of computational experiments are presented.