Modern Optimization Techniques for Smart Grids