An integrated platform for electrical modeling of microgrids