EPANET-RTX  1.1
real-time extension for the EPANET toolkit
EPANET-RTX Library

Table of Contents

RTX Introduction

EPANET-RTX is the real-time extension to the EPANET Hydraulic Toolkit. It provides an interoperable framework for moving data between a SCADA database, various time series analysis methods, and a hydraulic solver.

This project is being developed and maintained by a multidisciplinary team with various affiliations (members listed in alphabetical order):

Intended Audience

The intended audience for this software can be divided roughly into two groups:

The key here is an orientation towards folks who are comfortable with code. The RTX library is not a program per se, but a set of building blocks for constructing your own real-time simulation environment. If you've ever hacked EPANET or built a Matlab script for running hydraulic simulations, this library might be for you.

How to Participate

This is an open-source effort, so we invite all interested and capable parties to engage. There are various ways to do this - depending on your background and interests, these avenues for interaction are available:

Getting Started

What Is RTX?

The real-time extension is a library of classes and wrappers that extend the base EPANET hydraulic & water quality simulation functionality to include data acquisition and predictive forecasting. The typical use of this toolkit would comprise building an application that would load a water utility's model and run an extended-period simulation driven by sensor measurements recorded in a SCADA historian. The goal of the RTX library is to make this complex task more accessible to programmers and engineers. The user of this library may incorporate as little or much of the functionality as desired. For instance, RTX could be used only to connect to a SCADA system, clean certain data streams, and provide a predictive forecast of sensor data. Or RTX could be used just as an object abstraction layer for EPANET (e.g., for GUI development or other purposes).

Prerequisites

Prerequisites for EPANET-RTX:

Concept Demonstration

Take a look at the demo timeseries application - you will find a brief demonstration of some of the important time series related classes of RTX, and this could act as a testing environment to make sure your database is set up correctly.

You may also be interested in the sample configuration file – which is just a full explanation of the configuration options available in this version.

Model Validation Example

Try making the example application! The Model Validator is included here as an example of what we can do with this library – the application first causes a simple forward simulation of a "sample town" hydraulic network to be run. The results from the simulation are stored in a MySQL database that you specify. Then the application runs a "real-time" simulation using the same model - but instead of relying on model-based controls and demand patterns, the simulation proceeds by drawing information from the prior simulation. The first simulation is the "truth" – and acts as a synthetic SCADA historian (albeit with pervasive instrumentation). The second simulation is driven by a subset of the truth data. After running the application, the two databases can be compared as a means of validating the real-time simulation against the truth simulation.

First, have a look at the code to familiarize yourself with the conventions and names of some of the more important classes. Open up sampletown_synthetic.cfg – this file is all RTX needs to load an EPANET model file and connect its hydraulic states to a MySQL database. You'll need to set the database credentials for this to work, obviously, so don't forget to do that.

In the example validator application, you'll notice that the executable is exceedingly short. Most of the magic is in the difference between the two configuration files. Look at both of them together to see the differences.

We hope these few examples are enough to get going on something, and act as the seed of future example applications and documentation. Please post on the project site if you have questions or would like to get involved.