Neither middleware nor events really play a role in this (otherwise interesting) iterative simulation-based localization software applied to identifying--as fast and exactly as possible--the geographical position of faults (here: contamination sources) in water infrastructures (that is, pipes).
Based on a model of the water grid--pipes, time-of-day dependent flow velocities, and locations of sensors able to detect the anomalies--the software uses a standard hidden Markov model (HMM) forward-backward algorithm extended with a particle filter approach to improve the speed of estimation.
Unfortunately (for the quality of the initial HMM prediction), water sensors able to detect contamination are very expensive. Therefore, only a few of these sensors are actually deployed in the field (around 10 percent of all sensors). This leads to a situation where the HMM yields a lot of potential sources of contamination, all compatible with the data measured at those few locations. In order to overcome this (intrinsic) imprecision, additional water samples are needed.
Recognizing this, the authors now invoke a reinforcement learning-based algorithm to determine the optimal place for taking additional water samples (a task typically completed by humans).
Finally, using data and topologies from three real water infrastructure systems, the new algorithm is shown to outperform two other (statistical) algorithms with regards to convergence speed and positional accuracy.
The presentation features the most important mathematical formulas used and the crucial algorithms (shown as pseudocode). So, anyone interested in this stimulating combination of machine learning and statistical methods (HMM) should be able to follow, if not reimplement, the concepts.