The paper presents a mathematical model for solving the problem of optimally distributing electric and thermal loads between the power units of thermoelectric power station. The obtained unit is a model of nonlinear mathematical programming. So as to solve the model, interior-point penalty function method is proposed. Hooke’s and Jeeves’ modified algorithm is proposed as optimization method.