Economic-based residential flexible resource allocation in microgrid. (November 2021)