An approach to achieve thermal comfort and save energy in heritage buildings using different operating patterns