Renewable energy, thermal comfort of open spaces, and environmental quality. Management of a dynamic equilibrium