Modelling and Optimisation of Resource Usage in an IoT Enabled Smart Campus