Energy Management of Grid-Connected Microgrids, Incorporating Battery Energy Storage and CHP Systems Using Mixed Integer Linear Programming