GENESYS framework environment for optimal codesign and simulation of smart microgrids