INVESTIGATING THE RELIABILITY AND OPTIMAL CAPACITY OF MICROGRID