A novel method on the optimization problem of energy conservation in public buildings