A smart city adaptive lighting system