Characterization of flexibility resources and distribution networks