An autonomic mediation framework for complex physical environments