Optimized Energy Management and Reliability Assessment of RES Based Microgrid | Synapse