Optimal Control Of Energy Efficient Buildings