With 55 % of the world's population residing in urban areas in 2018 and a projected rise up to 68% by 2050 [1], the challenge of integrating sustainable mobility solutions into the existing urban infrastructure is gaining worldwide attention. The new opportunities come with a challenge, which is focused on managing a dynamic combination of generations and loads on an existing infrastructure that is designed based on a set of particular standards and specification to support its static original conditions. Networks reinforcement is one solution, however this solution is expensive and typical usage times are short. An alternative is to integrate smart grid control techniques, avoiding relatively larger investments. For this purpose, an energy management system retrofitted to an existing public street lighting network can provide a more economic and reliable solution. In this work a systematic approach to optimizing the scheduling of loads and power flows in terms of maximizing load acceptance rate and the total delivered energy is presented.