Optimization of the planning and operations of electric distribution grids in the context of high renewable energy penetration