This study proposed a data-driven improved optimizationsimulation open-source tool based on the fuzzy logic theory and geneticalgorithm, aimed to optimize fuzzy control efficiency and to reducedownstream flooding volume at a real-world urban drainage systems(UDSs). The results show that traditional UDSs can be controlled byfuzzy logic control (FLC) to take advantage of their functionalities tohandle downstream urban flooding issues. The major advantage ofthis tool lies in the noticeable improvement in controller optimal performance (COP) and flooding volume reduction. This open-sourcesimulation-optimization tool is supposed to be implemented with different metaheuristic algorithms to promote applicability and helpdecision-makers and researchers to find effective solutions for mitigating urban flooding. The main contributions of this work are summarizedas four parts below:1) A real-time control simulation-optimization tool called SWMM_FLCwas developed for incorporating FLC into rainfall-runoff simulationsin UDSs. This tool was distributed at https://github.com/Jiadalee/SWMM_FLC for public access. More information about how to runand modify this tool for personal usage can be found in the ‘SoftwareAvailability’ section below.2) Long-term water depth and flow rate measurements were used totrain the fuzzy relationship between inputs and outputs in FIS(fuzzy inference system). Compared with manually building suchrelations, this data-driven method noticeably enhances the efficiency of FIS training process;3) GA (Genetic algorithm) was used to tune the CMFPs (ControllerMembership Function Parameters) before implementing FIS intoSWMM MATLAB wrapper. The error metric COP decreasing from0.22 in non-optimal FIS to 0.07 in optimal FIS scenario indicatesthat GA can improve FIS performance by reducing the deviations between predictions and expectations.4) The SWMM_FLC performance testing finds that SWMM_FLC can reduce total urban flooding volume by up to 4.55% under varying rainfall scenarios, which illustrates the possibility that urban floodingseverity can be alleviated by implementing FLC into UDSs.