A collaborative hierarchal optimization framework for sustainable multi-microgrid systems considering generation and demand-side flexibilities