A Simulation Approach for the Optimization of Solar Powered Smart Migro-Grids