A flexible optimization framework for district systems based on topological graph and hybrid models. (November 2021)