Advanced Optimization And Data-Driven Control In Smart Grid