This is the official code repository for the paper "Unlocking Household Water End-Use Patterns from Low Time-Resolution Smart Meter Data via Stochastic Discrete Event Modeling and Bayesian Inference" under review.
Sample data is provided to apply Approximate Bayesian Computation (ABC) to calibrate an stochastic household water end-use model (SThWT) using only hourly water meter data
This project includes and modifies source code from the open-source project pysimdeum, which is licensed under the European Union Public Licence v.1.2 (EUPL-1.2).
The following files were originally part of pysimdeum and have been modified in this project:
pysimdeum/core/house.pypysimdeum/core/end_use.pypysimdeum/core/statistics.py
pyABC uses system timestamp as seed by default
Adaptive P-Norm Distance with Median Absolute Deviation (MAD) scaling
distance = AdaptivePNormDistance(p=1, #L1 norm (Manhattan distance), scale_function=mad #Median Absolute Deviation for normalization)
- Initial epsilon: Before the first generation, ABC randomly sampled a set of parameters from the prior distributions and generated simulations. The initial MADs are then calculated across all these simulations for each summary statistic.
- Reduction strategy: Adaptive quantile-based
- No minimum epsilon specified
- Terminates by number of generation (max_nr_populations) or maximun total inference time (max_walltime)
Transition or perturbation strategies to propose new parameters based on the current population (using PyABC default setting)