Adaptable scheduling of smart building communities with thermal mapping and demand flexibility