The actual problem of synthesizing the optimal control law for the intermittent heating mode of office buildings is considered, which consists in the programmed reduction of the room temperature during off-hours. The analysis of information sources showed the absence of sufficiently justified methods for solving the problem of optimizing the thermal processes of buildings, which provide comfortable conditions for the functioning of personnel, on the one hand, and save costs for buildings maintenance, on the other hand. The statement of the building thermal state optimal control problem is formulated, which contains a mathematical model of the process, a control goal, constraints on control actions and an integral quadratic quality criterion, including deviations of the room temperature from a given program and heat consumption. The limitation on the control action is taken into account by the method of penalty functions. As a mathematical model of the optimized thermal process, a two-dimensional controlled system of differential equations with constant coefficients is applied. The values of these coefficients are determined on the basis of building similarity criteria, which allows solving the optimization problem in a dimensionless form. The model includes a control action - the supplied heat flux, and a disturbing action - the ambient temperature, changing according to a given harmonious law. The numerical solution of the optimal control problem is implemented by the Chernous'ko method of successive approximations. A description of the user interface is given, as well as examples of the implementation of the thermal state optimal control. The proposed software allows on the stage of designing the heating system to obtain express assessments of various thermal modes of the building, and can also be used as computer support for automated individual heating points.
 Keywords: intermittent heating mode, optimal control, mathematical model, control quality criterion, control constraints, penalty function, successive approximations, program interface, automated individual heating point.