Contamination Isolation Scenarios in Water Distribution Networks
收藏资源简介:
Water Distribution Networks Contamination Isolation Scenarios This dataset contains stochastic contamination scenarios for water distribution networks (WDN). The scenarios were generated with EPANET-MSX through the EPANET-Matlab-Toolkit, and sensor placement was produced with the Sensor Placement Toolkit. The dataset is intended for contamination isolation, source identification, event characterization, and sensor-based water-quality analysis. Each scenario contains hourly sensor readings and ground-truth event metadata for an arsenic injection event. Dataset Contents The dataset is organized by network: Network Scenario files Sensors Additional files L-TOWN 19,500 78 `sensors.txt`, `L-TOWN_with_sensors.pdf` Modena 22,000 27 `sensors.txt`, `modena_with_sensors.pdf` Zhi Jiang 8,500 11 `sensors.txt`, `ZJ_with_sensors.pdf` Each scenario is stored as a MATLAB v7.3 `.mat` file named: scenario_<id>.mat The root dataset contains 50,000 scenario files in total. Scenario Format Each `.mat` file contains a `scenario_data` group with the following fields: Field Description `concentrations` Sensor-level time-series concentration readings. Each sensor is stored as a dataset such as `sensor_103`, with shape `1 x 337`. `time_series` Simulation time vector, with 337 hourly points. `num_time_points` Number of recorded time points (337). `contamination_node` Contamination source node identifier. `contamination_node_index` Numeric index of the contamination source node. `contamination_intensity` Injected arsenic intensity, in mg/L. `sensor_locations` Sensor node identifiers. `sensor_indices` Numeric indices of sensor nodes, in 1-based indexing (MATLAB style). `injection_duration_hour` Injection duration in hours. `simulation_days` Simulation horizon in days. The files are MATLAB v7.3/HDF5 files. In Python, use an HDF5 reader such as `h5py`; `scipy.io.loadmat` does not read MATLAB v7.3 files directly. Simulation Design Data acquisition was performed at 1-hour intervals over a 14-day simulation period. Each sample consists of time-series chlorine concentration readings from all deployed sensors in the WDN, together with ground-truth metadata describing the contamination event. The simulated contamination events use stochastic arsenic injections. Scenario diversity is produced by varying: Injection location: source nodes are randomly selected across the WDN topology. Injection start time: start times are randomized to cover events occurring at different hours of the day. Event duration: injection durations range from 6 to 48 hours. Injection intensity: injected arsenic concentrations range from 1 to 50 mg/L. Demand Modeling To generate realistic and representative hydraulic and water-quality conditions, nodal demands are modeled from real-world historical consumption data. Each demand pattern is decomposed into three signal components: Weekly periodic component: captures short-term cyclical consumption over a one-week period, reflecting consumer routines and socio-economic behavior. Yearly seasonal component: models long-term, low-frequency annual variation, including seasonal effects such as temperature-driven water use. Random component: represents high-frequency variation from unpredictable consumer behavior, minor transients, and localized network activities such as repairs. Each node is assigned a unique demand pattern by varying Fourier coefficients and random noise, ensuring spatial diversity in consumption behavior across the network. The demand patterns are generated based on the LeakDB project. Loading Examples ```python import h5py path = "{your_path}/L-TOWN/scenario_1.mat" def _decode_string_from_mat(data): """Decode string data from MATLAB .mat files""" if hasattr(data, 'flatten'): return ''.join(chr(int(c)) for c in data.flatten()) else: return str(data) def _load_mat_scenario(path): with h5py.File(path, "r") as f: data_group = f["scenario_data"] contamination_node_data = data_group['contamination_node'][:] scenario_data['contamination_node'] = _decode_string_from_mat(contamination_node_data) scenario_data['contamination_intensity'] = float(data_group['contamination_intensity'][0, 0]) scenario_data['sensor_indices'] = data_group['sensor_indices'][:].flatten().astype(int) # 1-based indices sensor_locations_refs = data_group['sensor_locations'] scenario_data['sensor_locations'] = [] concentrations_group = data_group['concentrations'] scenario_data['concentrations'] = {} # Get all sensor fields from concentrations group for field_name in concentrations_group.keys(): if field_name.startswith('sensor_'): # Extract sensor index from field name (0-based) sensor_key = int(field_name.split('_')[1]) concentration_data = concentrations_group[field_name][0, :].flatten() scenario_data['concentrations'][sensor_key] = concentration_data return scenario_data scenario_data = _load_mat_scenario(path) ``` Suggested Tasks This dataset can support research and benchmarking tasks such as: Contamination source isolation. Sensor-based event detection. Estimation of injection start time, duration, and intensity. Robustness analysis under realistic demand variability. Acknowledgments When using this dataset, please provide appropriate attribution and cite the tools used to generate the simulations and sensor placements: EPANET-Matlab-Toolkit Sensor Placement Toolkit LeakDB



