Software platform for integrated water quality decision support systems
P. Cianchi*, S. Marsili-Libelli** * AMAT srl, Via Tosca Fiesoli, 89 - 50013 Campi Bisenzio, Italy. Email:
[email protected] ** Dept. of Systems and Computers, University of Florence, via S. Marta, 3, 50139 Florence, Italy. Email:
[email protected] Abstract The management of a river system may involve a large number of entities (river catchment, water treatment plants, etc.) and be decentralised among a number of authorities with different duties. Harmonising these tasks and operators requires advanced information technology , capable of co-ordinating their actions in real-time. This paper describes such an internet-based decision support system, based on intelligent agents. This approach results in a flexible, fully scalable and responsive system which can be accessed through a normal web browser. It is also shown which specific problems had to be solved to produce a river management application: a graphic user interface, implementation of specific river and water treatment models and a data interface among their variables. Keywords Decision Support Systems, Internet computing, Intelligent agents, Visual languages, River basin management.
Introduction The adoption of the Water Framework Directive of the European Community (EC Directive 60/2000) requires integrated tools for catchment management, including Modelling and Decision and Operations Support Systems (DOSS). However, existing DOSS packages fail to address the interconnections among the various parts, which usually are not easily scalable and are often vendor-dependent. Moreover, this broad view requires the inclusion of nontechnical components like socio-economic dynamics, the involvement of stakeholders and so on. As a result, a unifying framework capable of addressing the overall aspects and of using the existing database, is needed. The purpose of this paper is to propose a new approach in the design of such a framework, presenting a possible distributed-computing DOSS architecture based on Internet services. This paper is the sequel to a previous study (Cianchi et al., 2000) and describes the latest advancements in the project, which incorporate the upto-date capabilities of information technology. The architecture described in this paper, based on the "intelligent agents" approach (Norvig and Russell, 1995). The information network are shown in Figure 1, where the role of agents with respect to more conventional components, such as data warehousing, is indicated. Agents are particularly useful in a dynamic environment, where the information system must follow the evolution of a complex environmental system in time and space. This architecture represents a considerable advantage compared to simple data queries performed through SQL languages such as ORACLE, possibly complemented by OWAP (On Web Analytical Processing) modules with limited computing capacity. Defining agents as a self contained software program specialised in obtaining a set of goals by autonomously Hydroinformatics 2002: Proceedings of the Fifth International Conference on Hydroinformatics, Cardiff, UK © IWA Publishing and the authors. ISBN 1 84339 021 3 (set)
Hydroinformatics 2002
1522
performing tasks on behalf of users or other agents, they can be deployed in the datawarehousing system where they serve as proxies of the query system and the modelling task. With this new internet-based information system, these modules can be shared among several users according to their prerogatives in the river management hierarchy. A generic data-warehousing architecture implemented with agent technology is shown in Figure 1, where the side path based on conventional OWAP is shown for comparison. In the agentbased version, the sensor and modelling agents provide the necessary interface towards the user, who can access the system through a simple internet connection. Normally, the query interface will be a Geographical Information System (GIS), which is now a necessity in environmental analysis (Johnston, 1998; Lang, 1998; Marsili-Libelli et al., 2001).
ENVIRONMENT DATA SET #1
DATA SET #2
DATA SET #N Data gathering, normalisation, filtering, validation SQL through metadata
DATA-WAREHOUSING (metadata)
OWAP On Web Analytical Processing = Limited computing capacity, mostly SQL
Probing Agents
Issue special modeloriented queries
Modelling Agents
Perform model simulation (parsing, sorting, integration)
Application Server
Dedicated environment
GIS Figure 1 Architecture of an agent-based information system.
After describing the general features of an internet-based DOSS, the special aspect required to adapt it to river management will be discussed. The organisation of the system will be described in the paper with particular emphasis to: a) catering for the needs of all the possible management levels involved in the process, b) the combined use of internet technology and mathematical models. The system structure of Figure 1, when applied to river management may take the form of Figure 2.
System structure The system has two main environments: the Modelling Environment and the Run-time Environment. The first one provides services for Data Management and Models definition, whereas the latter is in charge for the execution of available models. Models are defined through a visual language based on topology-related block diagrams, connected as shown in Figure 3.
Software platform for integrated water quality decision support system
1523
Supervisory Control Scenarios
Simulator
Goals
Knowledge
Contraints
Base
DATA WAREHOUSING
INTERNET
Plant Control
Plant Information Repository
Plant Control
Weather Forecast
Plant Information Repository
River Information
Repository
WWTP
WWTP
River System
River Quality Sensors
Figure 2 Structure of the river management DOSS.
Data repository
Data Management Wizard
Building Blocks definition Wizard
Models definition Wizard
Modelling Environment
Building Blocks repository
Building Blocks executable code repository
Models repository
Figure 3 Block diagram of the Modelling Environment.
Modelling Environment Several wizards, i.e. helpful software devices are available for each major task involved in modelling: Data Management Wizard: by means of the Data Mark-up Language, an XML dialect, describes data structures (measures, streams, …) and their sources (sensors, databases, …). Newly defined data are made available to other wizards as entry points and block stubs respectively. Building Blocks definition Wizard: by means of the Block Mark-up Language, an XML dialect, describes diagram building blocks. Each block has stubs belonging to defined data structures, parameters, input and output data, and eventually a state vector (only for dynamic
Hydroinformatics 2002
1524
blocks). Each block is associated to an executable code which may be written in C++ or Java libraries or a third party products accepting commands through a script and exchanging data via text files. Models definition Wizard: by means of the Model Mark-up Language, an XML dialect, describes diagrams in semantic terms. In this way the mode is defined in a normalised way, independently of the number of equations or topology. Scenario definition Wizard: either starting from scratch or modifying existing data series, it allows to define the scenario to be used to run the model. Run-time environment This environment is based on an open internetwork computing application architecture implemented with Java 2 EnterpriseTM (SUN Microsystems, San Jose, USA) edition (Thin HTML Client), a dynamic page generator based on Java Server Pages and Business Objects based on Enterprise Java Beans. One part of the Business Object (BO) is specialised in the simulation of models generated by the wizards. In particular such BO reads the Model Mark-up Language and the scenario definitions, initialise themselves by parsing the model structures and perform the simulation tasks by integrating the model dynamical equations. At the end of the simulation, the application control is transferred to Visualisation Beans (VB), which are responsible for generating HTML pages for displaying the results. This high-level architecture is shown in Figure 4.
Application Server Services Manager
Back-End Services Administration HTML Builder
Scheduler
Users Registration Log-In Interactive Interactive Services Services
Middleware
Web Server
Web Client HTML HTML Applets
Information Repository
Services Registration
AIS Application Intelligent Servers
Figure 4 High level architecture of the information system.
DOSS design for river management The characteristic components of this applications are two model classes: rivers and wastewater treatment plants (WWTP). To develop this web-based prototype for river management the following problems had to be solved: • Man-machine interface using block diagrams and GIS through the web;
Software platform for integrated water quality decision support system
1525
•
Model interfacing: matching the variables in the ASM suite models (Henze et al., 2000) with a QUAL2-like river quality variables (Brown and Barnwell, 1987), up to the newly released IWA River Model n. 1, (Shanahan, 2001); • Model parsing and variables sorting for automatic run-time code generation • Development of specific numerical integration algorithms to deal with large systems of stiff equations. Assuming that the system is composed of a WWTP and the downstream river reach, the block diagram of Figure 5 is generated, with the aid of the wizards of Figure 3. Anoxic Tank WWTP
Aerobic Tank Settler
Flow meter WWTP/RIVER interface WWTP Input
Discharge limits River Quality
Upstream river quality
RIVER
Figure 5 A block diagram representation of a river reach with an upstream WWTP.
The agent structure decomposes the model of Figure 5 into the distributed processing configuration of Figure 6, where each task is assigned to the pertinent agent and performed in parallel with the others. Data Warehouse
WWTP/River Model
Data Objects & Messages bus
ODE Solver
Activate Matlab Model “ASM2”
Data-Flow Manager
IS Agent
Activate Matlab Model “Settler” IS Agent
IS Manager
Activate Matlab Model “River” IS Agent
IS =Intelligent Server
Figure 6 Parallel processing of the WWTP/river model of Figure 5 through the agent architecture.
An output of the system defined in Figure 5 is produced as a web page after the simulation run has ended. A typical output of this kind is shown in Figure 7, in the case of the river BOD. Quality indicators are added as coloured planes for reference.
1526
Hydroinformatics 2002
Acceptable
Good
Figure 7 An automatically generated web page shows the time-space evolution of BOD along the reach downstream of a WWTP resulting from a scenario simulation.
Conclusion This paper has described an agent-based Decision Support System which can be operated through the Internet. Its main features are a collection of wizards to set-up the system model and a run-time environment which manages the agents. Their tasks may range from data query to model parsing and system optimisation. The overall result is a flexible system through which both data-warehousing and system control are possible with minimum equipment and expertise from the user.
References Brown L.C. and Barnwell T.O. (1987). The enhanced stream water quality models QUAL2E and QUAL2E-UNCAS: Documentation and user manual. US - EPA Environmental Research Laboratory, EPA/600/3 - 87/007, Athens, GA. Cianchi P., Marsili-Libelli S., Burchi A., Burchielli S. (2000). Integrated river quality management using internet technologies, Proc. WATERMATEX 2000, Gent, Sept. 2000. Henze M., Gujer W., Mino T., and van Loosdrecht M.C.M., (2000). Activated sludge models ASM1, ASM2, ASM2d, and ASM3. IWA Scientific and Technical Report n. 9. Johnston C.A. (1998). Geographic Information System in Ecology. Blackwell Science, Oxford. Lang L. (1998). Managing Natural resources with GIS. Environmental Systems Research Institute Inc., New York, NY. Marsili-Libelli S., Caporali E., Arrighi S., Becattelli C. (2001). A Georeferenced Water Quality Model. Water Sci. Tech. 43 (7): 223 – 230. Norvig P. and Russell S.J. (1995). Artificial intelligence: a modern approach. Englewood Cliffs, Prentice Hall Shanahan P., Borchart D., Henze M., Koncsos L., Rauch W., Reichert P., Somlyody L. and Vanrolleghem P. (2001), River Water Quality Model No.1: Modelling approach. IWA Series of Scientific and Technical Reports n. 11.