Simulation of thermal behavior in a building-plant heating system