Impact of adaptive comfort criteria and heat waves on optimal building thermal mass control