Energy management is one of the greatest challenges in smart cities.
Moreover, the presence of autonomous vehicles makes this task even more
complex. In this paper, we propose a data-driven smart grid framework which
aims to make smart cities energy-efficient focusing on two aspects: energy
trading and autonomous vehicle charging. The framework leverages deep
learning, linear optimization, semantic technology, domain-specific
modelling notation, simulation and elements of relay protection. The
evaluation of deep learning module together with code generation time and
energy distribution cost reduction performed within the simulation
environment also presented in this paper are given. According to the
results, the achieved energy distribution cost reduction varies and depends
from case to case. [Projects of the Serbian Ministry of Education, Science and Technological Development, Grant no. III44006 and Gran no. III47003]