Optimization of energy consumption for lighting residential buildings