CLIPS based Decision Support System for Water Distribution Networks

Researchers over the past have applied Artificial Intelligence(AI) based tools to automate decision processes by constructing and encoding heuristic rules.However, instances of application of AI in the field of Water Distribution Network (WDN) management are meager.This paper describes a component of an ongoing research initiative to investigate the potential application of an AI based Expert System shell, CLIPS(C Language Integrated Production System, developed at NASA/Johnson Space Center) in the development of an expert decision support system for management of a water distribution network. The system aims to meet several concerns of modern water utility managers as it attempts to formalize operational and management experiences, and provides a frame work for assisting water utility managers even in the absence of expert personnel. In this work, CLIPS inference engine has been linked directly with Visual Studio.Net environment and indirectly with SQL and MATLAB. This linking facilitates modeling and simulation of a water supply system and the derived conclusions can then be acquired, as facts, by appropriately designed and incorporated component modules of the proposed Expert Decision Support System (DSS). Further processing of these facts is made possible by the inference engine of DSS in conjunction with the prior content of its knowledge and associated rule base. The simulation module endows the proposed DSS with a self learning capability to augment its knowledge base by incorporating self generated, simulation based, knowledge about network’s responses to various trial interventions. For realistic simulations, the DSS is designed with a network calibration module and incorporates prior information such as age of the network and its impact on network performance. The proposed DSS can thus be used to generate daily run and planning scenarios while also acting as a diagnostic module in order to address consumer complaints. Correspondence to: Sandeep Kulshrestha (san1.djb@gmail.com)


Introduction
The day to day operation of a water distribution network is managed by skilled operators who use experience and other heuristics to adjust and control network elements such as pumps and valves in their desire to achieve satisfactory performance of the water supply system.As water use tends to follow a largely repetitive pattern, network managers are expected to understand what is required for normal operation.However, following an unforeseen and an unusual emergency such as a burst water main, prompt and effective measures from the network manager is often taken for granted by the consumers.On their part, the network managers usually have to depend upon scant information that is reported by consumers impacted by these exigencies (Machell et al., 2010).
Managers of water utilities design most of their interventions and other decisions based on intuition, rule of thumb heuristics and trial and error.These operative decisions are often vague and lack objectivity and consistency.They suffer from inefficient network management because of distribution complexities and heavy human intervention.Because of this manual management based on heuristics, there is no guarantee that resources are utilized effectively (Raghvendran et al, 2007).
Difficulties in managing a typical water supply system arise on account of (i) absence of a well defined policy framework; (ii) difficulty in gathering information that is coherent and objective because, as is often the case, information is based on individual perception and experience; (iii) complexity of a typical water supply system on account of a variety of control mechanisms;and (iv) frequent changes in the network kulshrestha,S.: CLIPS based Decision Support System topology (Leon et al, 2000).Collectively, these foregoing issues present great difficulties in efforts to develop mathematical models of such inherently complex systems (Walski, 1993).
Recent developments in AI technology make it possible to encode knowledge and reasoning in a structured computer program that enables it to mimic human thought process and its application, albeit within a narrow, but well defined domain specific framework , during a problem-solving process.Such a tool, generally referred to either as a knowledge-based system (KBS) or an Expert System (ES) (K.Chau., 2004), is designed to assist in solving problems that require the skill and expertise of a knowledgeable human by applying embedded heuristics and other pertinent rules of thumb.
Present study attempts to develop a DSS that incorporates a dynamic knowledge acquisition system driven by simulated runs of a hydraulic model, suitably calibrated and validated for the given water utility.The DSS uses CLIPS as AI tool and integrates computational platforms such as MATLAB, open source GIS and a Relational Database Management System (RDBMS) working under the umbrella of a common User Interface.The User Interface has been designed as a PC based application using Visual Studio.Net programming language.

Review of some Expert Systems
Successful early Expert Systems (ES) include platforms such as DENDRAL and MYCIN.DENDRAL (Buchanan and Feigenbaum., 1978) could analyze mass-spectrogram data of chemical structures and MYCIN (Shortliffe, 1976) could diagnose bacterial infections.
The success of DENDRAL and MYCIN provided a stimulus that triggered global research initiatives towards expert system development.Shu-Hsien Liao (2004) reviewed literature on various expert system methodologies and classified them in terms of the following eleven categories: rulebased systems; knowledge-based systems; neural networks; fuzzy expert systems; object-oriented methodology; casebased reasoning (CBR); system architecture development; intelligent agent(IA)systems; ontology and database methodology.The review shows that these methodologies were developed for a wide range of problems in fields as diverse as medicine,telecommunication engineering, water and waste water engineering, robotics etc.
In the field of water management some important application of Expert System may include EXPLORE (Leon et al, 2000); OASIS (Goforth and Floris, 1991); CRITQUING Expert System (Shepherd and Ortolano, 1996); IITWS-EXP (Khosa et al., 1995); Expert System treated water distribution (Bunn et al., 2001);Network Management System For Water Distribution System (Raghvendran et al, 2007); Intelligent Control System For a Municipal Water Distribution Network (Chan et al., 1999); Some of the ES have been described in brief as follows: -IITWSEXP (Khosa et al., 1995): IITWSEXP was developed for the campus water supply distribution system of Indian Institute of Technology, Delhi.The expert system was built using Level5 Object expert shell for MS Windows and was designed to provide expert diagnostics about reported problems and their troubleshooting, daily run scenarios, and static and dynamic information regarding the physical components of the water supply system of IIT Delhi.The expert system utilized a dedicated database management system and also featured components on duty rosters and staff deployment and some relevant details about supply wells on the campus.
-Intelligent Control System For A Municipal Water Distribution Network (Chan et al., 1999): the implementation model was the system developed with the expert system shell,COMDALE/X.It is a SCADA based system which uses ES for taking decisions based on economic,social and environmental factors.
-EXPLORE (Leon et al, 2000): it employs the water demand forecast to obtain an optimal daily pumping schedule.The system has been applied to the management of the Seville City water-supply system.
-Network Management System For Water Distribution System (Raghvendran et al, 2007): the CygNet has been used to implement the NMS for water distribution networks.CygNet is integrated NMS(Network Management Software)software that is currently being used by VSNL and MTNL for the management of large telecom networks in India.
-ES for Control Treated Water Distribution (Bunn et al., 2001): New Plymouth District Council(NPDC),New Zealand, has implemented an Expert System to optimize the distribution of water from the water treatment plant to five bulk supply reservoirs using linear program.
-OASIS (Goforth and Floris, 1991): Operation Advisory and Simulated Intelligent System(OASIS) was developed as a knowledge base advisory system for water management operations of South Florida Water District.It was implemented on Symbolic workstation using Common LISP and Inferencing ART.
-CRITIQUING Expert-System Approach (Shepherd and Ortolano, 1996): it provides computer based decision support system for water supply system operations of San Francisco Water Department(SFWD).The critiquing system evaluates operating plan and provides feedback which includes suggestions for improvement,warning and alternatives.
Most of these foregoing initiatives included components to transfer knowledge from the heuristic domain to the knowl-kulshrestha,S.: CLIPS based Decision Support System 3 edge base of the expert system while some of the other developments have applied fuzzy logic to process information and suggest 'best practice' guidelines for the network manager.Review of literature further reveals that presently available expert systems have an extremely limited scope and are confined to only those specific tasks that they are designed for and are unable to reason broadly across fields of expertise.These ES employ static knowledge domains without the ability to store newer facts and, therefore, are unable to learn and evolve while in the present study, the concept of a dynamic knowledge domain has been proposed.Such a concept has been implemented in a manner that allows the knowledge base to be self learning as it accommodates newer knowledge for future guidance.

Water Distribution System Management
Municipal water distribution systems are (i) spatially extensive; (ii) composed of multiple pipe loops to maintain satisfactory levels of redundancy; (iii) governed by non-linear hydraulic equations; (iv) designed complex hydraulic control devices such as valves and pumps; and (v) complicated by numerous layout, pipe sizing and pumping alternatives.Additionally, with a steady improvement in living standards accompanied by continuously increasing population, aspirations for better reliability in service and periodic inclusion of newer areas within the municipal limits especially in metropolitan cities together make these systems difficult to manage.Further, municipal water distribution networks (WDN) are seldom new.As a result of the natural process of ageing, and with frequent interventions necessitated by perceived need to meet various performance goals, water supply networks undergo physical changes that significantly impinge on their hydraulic responses.Often, these impacts result in performance levels that are well below expectations.Further, WDN are managed by experts, who, over the years of their association and responsibility, acquire an empirical knowledge of the system and, characteristically, this knowledge remains largely confined to their respective personal domains.In the event of any new information and/or emergence of a new problem, these experts apply simple heuristics to design corrective measures and cognitively seek to predict network performance.Understandably, therefore, the assurance of a satisfactory response of the study network to suggested interventions is often based more on hope rather than on a validated belief.With specific reference to issue of availability of domain knowledge, managers of water utilities face numerous difficulties on account of (i) expert scientific knowledge is not readily accessible; (ii) expert scientific knowledge is not available in a user friendly manner; and (iii) the tacit, undocumented expertise required for operation of a water supply system may be lost when experienced personnel leave service for whatever reason.These and similar concerns has seen resurgence in consumer demands that water engineers are suitably trained to apply current, technology based, tools objectively and intelligently, and with the recent advances in artificial-intelligence technology, these personnel can be trained to fulfil this requirement.This indeed follows from the widely held view that there usually are very few specialists who have a thorough understanding of all the issues pertinent to network modeling for flows, pressures and/or water quality.The proposed Knowledge Based Systems have the potential to fill the gaps in knowledge that exist between researchers and practitioners (K.Chau., 2004).
Knowledge of basic network modeling concepts is indeed central to the decision-making process within water utilities not just as an aid to pipe network analysis but also for its efficient planning, design and operation.This allows simulation of the design network and its examination under a variety of current and future operating conditions including possible design interventions.A number of "off the shelf" packages are available that allow tailor made simulation models to be constructed for a water utility's specific requirements.Popular packages include EPANET (US Environmental Protection Agency), AQUIS (7T), Infoworks (Wallingford software), SynerGEE (Advantica) and WaterGEMS(Bentley).
These software packages enable development of mathematical models for a water distribution network that combine the physical configuration of these networks with physics based equations that relate pressure and flow for each operational element (Machell et al., 2010)and for the model to be acceptable as a reasonable representation of the actual system, the results from the model must bear close resemblance to the actual performance of the hydraulic system (ECAC,1999).This, therefore, necessitates a prior model calibration.

The Decision Support System development process
The aim of development of DSS is to codify the heuristic expert knowledge in a form that is easily understood by the computer and also enables a novice to effectively manage a given Water Distribution Network under unforeseen exigencies.Towards this end, possible real world scenarios corresponding to various design interventions are generated and corresponding results are incorporated in the Knowledge Base in order to enhance the scope and reach of the Decision Support System.The development process involves (i) understanding the physical component elements of a typical WDN and their functionality; (ii) study of already existing DSS; (iii) understanding common terminology used by operators and experts; (iv) knowledge of current strategies for management of a water utility.The authors of the present study have had past associations with water distribution network design and management issues.In particular, the first author is holding a position of responsibility with a large metropolitan water utility and planning, operation and maintenance of such a large water distribution network constitutes his core competency.As such, the authors are indeed familiar with these issues, as highlighted in the foregoing discussion, and tapped this accumulated knowledge and experience to design heuristics and rules for the proposed DSS besides consulting numerous other experts and academics related to these specific areas.

System Prototype Development
Since DSS is to be applied on a WDN, it is imperative to have a modal case study of a WDN.Anytown Network (Walski et al., 1988;Kapelan, 2002) as shown in Figure 1 is taken as the model case study.The network consists of 35 pipes assembled in a fashion that they form 19 loops.As the present study deals only with steady state analysis, the tanks at nodes 501 and 502 in the original network have been changed to reservoirs.An important aspect of the system prototype development is the selection of hardware and software used in the system implementation.The proposed DSS is developed as PC based application in Visual Studio.Net environment.Visual Studio.NET is a complete set of development tools for building ASP Web applications, XML Web services, desktop applications, and mobile applications etc. and all use the same integrated development environment(IDE), which allows them to share tools and facilitates in the creation of mixed-language solutions.This framework provides a clear, object-oriented, extensible set of classes that enables you to develop rich Windows applications.Additionally, Windows Forms can act as the local user interface in a multi-tier distributed solution.

Decision Support System Framework
A DSS framework for a system as spatially extensive as a Water Distribution Network has to reflect the underlying complexity of the system for realism and yet be simple to use.Accordingly, the complex functionality of these and similar systems is best dissagregated into a limited number of manageable facets in the form of interconnected modules and linked together in a structured manner to yield the overall DSS.Accordingly, within this modular framework, the proposed Decision Support System has been designed with object modules for Network Calibration, Network Simulation, Daily Run Operation, and Network Information.The complex task of computations, data handling, visualization and decision/inference of each module is handled through MATLAB, SQL server, MapWinGIS and CLIPS.Figure 2 shows the basic framework of the proposed DSS.As shown in Figure 2 platforms such as SQL, MATLAB, CLIPS and MapWinGIS enable exchange/transfer of data between different modules of the DSS under the overall umbrella of Visual Studio.Net platform.In addition to the basic building blocks (or modules), and described in the subsequent discussion, there are additional supporting tools that have been integrated within the Expert Decision Support System.These supporting tools are listed in the following text along with a brief accompanying description.

Relational Data Base Management System
A typical WDN may be characterized in terms of a diverse set of attributes and, importantly, these attributes are complimentary in nature with no attribute capable of acting as a surrogate for one or more of the other identified attributes.While some attributes are static in nature (for example link diameters and elevations of the identified critical elements of the distribution system), many of the other attributes are dynamic in nature and may assume different values through Typically, data pertaining to the components of WDN must be collected from different sources and needs to be processed and stored within a well structured framework in order to ensure its availability to modelers, planners and decision makers on demand and, at the same time, is amenable to easy discrimination by the processing system.This normally requires that the water distribution system first be represented by means of a node-link characterization.Such representation of data is understandably voluminous and requires an efficient data base management system to manage the data intelligently by providing structures for storing data and methods for extracting information from it.In addition, the data base management system is also required to preserve and remember the interrelationships that may exist between various descriptive data elements of the study network.Relational databases allow such interrelationships to be preserved within the overall data base management framework.
In the present study a Relational Data Base Management System (RDBMS) for WDN has been developed using Structured Query Language (SQL).All the necessary tables have been created in SQL and these are linked to each other through a primary key.One such link is shown in Figure 3 where pipe ID (pid) is common in pipe and pump table.

CLIPS Knowledge Base and Inference Engine
CLIPS is a type of computer language designed for writing applications called expert systems.CLIPS (short for C Language Integrated Production System), developed at NASA/Johnson Space Center, has recently shown increasing usage .CLIPS is a forward-chaining rule-based language that resembles OPS5 and ART, other widely known rulebased development environments.Figure 4 shows the basic components of CLIPS, which are essential for an ES and its implementation in ES.User Interface: the mechanism by which the user and the expert system communicate.
Fact-list: a global memory for data.Inserted as pipe-facts, node-facts, valve-fact etc into the memory of clips Knowledge-base: contains all the rules used by the expert system.
Inference engine: makes inferences by deciding which rules are satisfied by facts, prioritizes the satisfied rules, and executes the rule with the highest priority.
Agenda: a prioritized list created by the inference engine of instances of rules whose patterns are satisfied by facts in the fact list.
The CLIPS is a fact driven environment where rules are fired depending upon the pattern matching.CLIPS does not have its own database and facts stay in the memory of the CLIPS during its active state only.As soon as the CLIPS environment is closed all facts are removed from its memory.Therefore, a mechanism was required through which facts are inserted into the memory from the data-base.This was achieved through creation of classes and sub-classes.In CLIPS the deftemplate construct is used to create a template which can then be used to access fields by name.The deftemplate construct is analogous to a record or structure definition in programming languages such as Pascal and C. In the DSS, the main Class has been kept as Fact.For each of the object as Pipe, source node, demand node etc. two child classes of facts were created to capture the slot value of the fact from data-base.For example, as shown in Figure 5, for pipe object, 1st Child class is DRAFPipe which specifies the slots to be used in the fact and 2nd child class DRPipe which is child of DRAFPipe.
Figure 6 shows the deftemplate for pipe details and the same is inserted into the CLIPS environment by first passing slot values from the database into the memory followed by insertion of the corresponding pipe fact.The chaining mechanism of CLIPS is programmed to fire rules if the inserted fact matches any of the already existing facts.Further, for CLIPS to become operational as an ES shell, following two kinds of integration are required.The interface required for such an integration to be possible enable (i) CLIPS to be embedded in other software platforms; and (ii) calling external functions from CLIPS.While CLIPS is indeed designed to allow both these kinds of integration, the flexibility for adaptation in CLIPS is greatly enhanced by the fact that easy addition of external functions allows CLIPS to be extended or customized in almost any way.In the present study, integration of CLIPS within the Visual Studio.Net platform has been accomplished through ClipsNet.dll.

MATLAB platform
CLIPS and SQL server is not vested with the capability to perform complex mathematical computations.Therefore, in order to empower the DSS with computational capabilities, MATLAB computing engine (for MATrix LABoratory) has been integrated with the DSS in this study.MATLAB engine incorporates the LAPACK and BLAS libraries which provides access to state of the art in software standards for matrix computation.The proposed DSS uses standalone COM components created using the MATLAB compiler.Each of the COM components is used in Visual Studio.Net platform as a class that can perform mathematical operations on data imported from SQL and restore derived results back to the '.Net' environment.

Hydraulic Network Solver (HNS)
The DSS being developed has modules on calibration, simulation and daily run which require repeated solution of mathematical model of pressurized WDN.The possibility of linking public domain network solver, EPANET (Rossman, 1993) through DLL was examined and it was felt that an in-built solver would be economical in terms of computer time.Therefore, based on Todini and Pilati (Todini and Pilati, 1988) improved gradient method, a HNS was developed in MATLAB and incorporated in Visual Studio.Net through COM component.

Open Source GIS Platform
MapWinGIS is an open source geographic information system (GIS) and an application programming interface (API) distributed under the Mozilla Public License (MPL), built upon the Microsoft.Net Framework 2.0.The MapWinGIS components and end user application support manipulation, analysis, and viewing of geo-spatial data in many standard GIS data formats.Hence, MapwinGIS is a mapping tool, a GIS modeling system and a GIS API in a re-distributable open source.To impart the capabilities of visualization of WDN with base map, manipulation and creation of shape files, MapWinGIS platform has been integrated with Visual Studio.Net through ax-Map object.

Network Calibration Module
Various automatic network calibration algorithms have been proposed in literature and include (i) methods based on analytical equations (Walski, 1983); (ii)simulation models (Boulos and Ormsbee, 1991;Gofman and Rodeh, 1982;Ormsbee and Wood, 1986;Rahal et al., 1980); and (iii) optimization methods (Coulbeck and Orr, 1984;Ormsbee, 1989).Techniques based on analytical equations require significant simplification of the network through skeletonizations.As a result, such techniques may only get the user close to the correct results.Conversely, both simulation and optimization approaches take advantage of using a complete model.In the recent past, the focus of the researchers has shifted from traditional analytical techniques to heuristic techniques such as Genetic Algorithm (GA), Simulated Annealing (SA), Shuffled Frog-Leaping Algorithm (SFLA) and Ant Colony Optimization (ACO).Performance of ACOAs, as a class of optimization techniques, has been quite encouraging and these techniques have often been seen to outperform other heuristics based approaches when applied to some benchmark problems (Maier et al., 2003;Zecchin et al., 2005).
Considering that the calibration process involves adjustment of some key system parameters like nodal demands and/or pipe-roughness values, prior knowledge of their rational values can act as a heuristic in stochastic search procedures such as GAs and ACOAs.In this study, the authors have developed an automated calibration algorithm for water distribution networks and has been incorporated in the proposed Expert Decision Support System.The calibration algorithm has been designed using the Ant Colony Optimization approach and searches for optimal hydraulic performance by adjusting internal pipe roughness as a calibration parameter.As an aid, the algorithm has been designed to use age of the network pipes as prior information for guiding the search and this aspect of the study is under peer review elsewhere.
The schematic of the Calibration module is shown in Figure 7. Observations on the state variables of link flows (Q) and nodal heads (H) at different loading conditions are taken as input parameters.The study network is calibrated using ACOA with one set of observed boundary conditions and then validated with another, but independent, set of boundary conditions.The calibrated network is saved in the RDBMS for further use.

Simulation Module
A typical network simulation model is comprised of static asset information such as pipe lengths, diameters, connectivity, and network topography.In addition to the static information, the model is also armed with information about dynamic attributes that are expected to change with time.These include distribution of water demand across the network and, importantly, direct or indirect measures of growth in pipe roughness with age amongst others.Most contemporary modeling packages in current use utilize models that include every pipe down to the level of, but not including, customer service pipes.Standard daily time-varying demand relationships are estimated for different customer types, and these are summed and allocated at pipe junctions (nodes) according to the distribution of customers.Simulation mod- els are normally used to simulate flows and pressures over a fixed 24 h period (Machell et al., 2010) and are usually vested with the capability to generate a great number of reports.The variety of data generated sometimes makes analysis and decision making tedious..
An DSS can aid in the process of information retrieval by accessing the output of the simulation run and, based on the user's objective, chooses and retrieves the relevant data and, at the same time, providing a mechanism for exception reporting.This, especially, is most desirable if the analyst is not a trained professional and, in certain specific situations, is someone who, for example, occasionally uses simulation for analyzing complex situations with the aim to improve services by adding/ deleting or updating one or more components of the study network namely pipes, junctions, valves, pumps etc.
Figure 8 shows the schematic of the simulation module.A suggested change in the network configuration constitutes a scenario that may already exist in the knowledge base generated following a prior query.In such a case, user has the option to either evaluate the scenario details or proceed further.However, in the event the information is not already present in the knowledge base in the absence of any past interest in such a scenario, the network solver is triggered for flows and nodal heads.The values of pipe flows and nodal heads are asserted as facts in inference engine of CLIPS which fires certain rules to issue Advice/Warning to the user.The Advice/Warning along with its corresponding scenario is added to the Knowledge Base of the DSS as an upgrade for future reference thus rendering the DSS as dynamic and amenable to upgradation/augmentation.In order to facilitate transfer of

Planning Module
Planners carefully research all aspects of a water distribution system and try to determine which major capital improvement projects are necessary to ensure the quality of service for the future.This process, called master planning (also referred to as capital improvement planning or comprehensive planning), may be used to project system growth and water usage for the next 5, 10, or 20 years.System growth may occur because of population growth, annexation, acquisition, or wholesale agreements between water supply utilities (Walski et al ., 2001).
where, X = (e 0 + at)/D and D is the diameter of pipe.
The relationship between the annual roughness growth rate, a, and the Langelier saturation index (LI) with the latter controlled by factors such as the pH of water, its alkalinity, and calcium content can be represented as equation 4 Lamont (1981).
Given the age of the pipe and its diameter of old pipe, it is possible to obtain an estimate of the Hazen-Williams Cfactor.Based upon the above theoretical account, as the system under goes ageing process, following things are expected to happen for any WDN: 2. The consequent head loss in the WDN would increase.
3. The total energy requirement in the WDN for the same input parameters would as well increase.
Therefore, from the management perspective, it is important to be forewarned on these changes and, at the same time, know in advance the manner in which its consequences are likely to manifest.As an example, the proposed Planning Module estimates Hazen-Williams C-values expected over various time horizons of 5, 10, 15 and 20 years and, for each such horizon, additionally computes (i) total energy requirement; (ii) total head loss across the network; (iii) head loss in each individual pipe; and (iv) temporal variation of Hazen-Williams C-values and, further, has the capability to present a graphical depiction of the above information populating the data bases of the proposed Expert Decision Support System.The schematic of planning Module is shown in Figure 10.

Daily Run Module
Many water utilities use human operators whose primary function is to monitor the pulse of the water distribution system and provide system control when needed.Automated control is increasingly becoming the preferred option and uses instrumentation and control equipment to control the  distribution system automatically.Such control can be implemented either locally at the facility or throughout the system.Typically, simple operating rules are used to determine which component is operated and how.Systems that rely on advanced control use optimization algorithms, decision support systems, artificial intelligence, or control logic to control the distribution system.It becomes clear that for this paradigm to be realistic, the actual system operation, in terms of its numerous diagnostic attributes, need to be monitored continuously and logged for prospective reference.The proposed design of the DSS uses a Daily Run Module that logs these operational attributes in order to be able to offer diagnostic inferences from the logged daily runs.Figure 11 and Figure 12 depicts the Daily Diagnostic Module (DDM) of the DSS and a selected screen shot respectively.This module has subordinate component sub-modules for the following tasks: (i) retrieve status of the study network on some previous date and time ( Sub-Module-I); (ii) generate daily run scenario for a given set of input conditions (Sub-Module-II); and (iii) diagnose specific consumer complaints (Sub-Module-III).A brief note on each of these sub-modules follows: -Sub-Module-I : Each daily run history, for a given set of input conditions, is stored in the knowledge base of the DSS.The status of the WDN corresponding to any given date and time can be retrieved with the help of the Graphical User Interface and runs independent of CLIPS inference engine.
-Sub-Module-II: This sub-module assists a network  manager in ascertaining status of the network corresponding to operator specified inputs on source node levels, pump and electricity status.There is also an option available that allows comparison between observations on link flows and nodal heads, provided to the sub-module as prior specified data, and corresponding computed values as output from the network solver.The comparison is made by the Inference Engine of CLIPS, shown in Figure 13, and is followed by generation of appropriate caution and/or advice.The Inference Engine fires rules at each decision stage, identifies cause and also proposes action using the backward chaining mechanism.
-Sub-Module-III: This is the Daily Diagnostic Module and is designed to manage consumer complaints.The module uses backward chaining process for inferencing and starts by first identifying the consumer in terms of the network segment that he/she belongs to.Rules for this module are similar to those shown in Figure 13.Using backward chaining mechanism, CLIPS is designed to identify possible cause of the complaint and, as a logical follow up, also suggests appropriate measures to be adopted to manage the situation.

Results and Discussions
The DSS has been developed to facilitate management of WDN specially in Indian conditions where water supply is head driven and intermittent as against continuous and demand driven.An important feature of the proposed DSS is that the capability to simulate hydraulic response of the study network constitutes its core concept.Apart from the usual capability to store externally derived information as rules for future action, the proposed system, additionally, is able to learn from results of self triggered simulation runs of the hydraulic model for any desired exigency that may have arisen in the past or is indeed likely in foreseeable future.Efficient and reliable network calibration, therefore, becomes imperative for the successful implementation of the proposed ES and is indeed a novel feature of the designed system.The DSS adopts an Optimization based approach for calibration and is enabled by the state of the art Ant Colony Optimization Algorithm.As an added novelty, the calibration algorithm is also designed to accommodate prior information on age of the network components as a guide leading the search process towards the desired optimality.As shown in Figure 14, calibration is initiated by prompting the user to provide requisite information such as observed link flows and junction heads (these will form the basis for comparison between these values and model derived outputs).Water utilities in metropolitan cities in India are facing severe overloading on account of an ever increasing population and migration of rural population to urban metros.These issues, and coupled with problems associated with an ever ageing networks, make it imperative for network managers to be able to predict hydraulic performance of these distribution systems corresponding to various possible development scenarios.These issues underscore the value of simulation capabilities that the proposed DSS has been vested with.
The CLIPS engine has been designed to be an ideal foil for the simulation module and allows the DSS to exploit the full potential of the latter module.Each simulation outcome is checked for precedence and only those scenarios that are not already available in the Knowledge Base are imbibed into it with a new, unique ID for possible future use.It is understood that the design of the proposed DSS has distinctive features such as (i) the Knowledge Base(KB) is continuously upgraded; and (ii) the Knowledge Base is dynamic.Figure 15 presents a screen shot of the results propagated by Simulation Module in terms of link flows and nodal heads with the latter being displayed in comparison with residual head.Also, the left part of the figure displays changes in pipes, demand nodes and source nodes that make up a particular scenario.
The screen shot of planning module of DSS is shown in Figure 16.The module is designed to help network managers take guidance on decision for replacement of pipes and upgradation of pumping stations.In this regard, the module -Variation of Pipe flows and junction heads over different planning Horizon(Figure 17).
-Variation of Hazen-William C-values for different groups of Pipes over the different planning Horizon(Figure 18).
-Variation of Total Energy requirement in KW and total head loss in the system over the different planning Horizon(Figure 19).
The DSS is built with a Daily Run Module and as already explained, this module consists of three sub-modules I, II and III.Sub-Module-I prompts user to select date and supply time (for intermittent supply) for information on link flows and junction heads.For this, already existing, scenario, the module presents information as depicted in Figure 11.The Sub-Modules II and III are tailored to invoke CLIPS inference engine to asserts facts, derived as a solution from the hydraulic network solver, in its memory and, importantly, follows up with Advice/Suggestion/Warning as deemed appropriate as illustrated in Figure 20 19.

CONCLUSION
The aim of the development of DSS was to design a comprehensive operation and management aid for a water utility.The study has demonstrated the potential application of CLIPS as a core component around which such a mangement aid could be built.Present work suggest that CLIPS is indeed a powerful platform for development of an Expert System.
Supporting platforms like MATLAB, SQL, and Map-WinGIS have also been integrated together under a common umbrella of Visual Studio.Net environment.In this work the CLIPS inference engine has been linked directly with Visual Studio.Net environment and indirectly with SQL and MAT-LAB.Such interlinking of these seemingly diverse set of computing platforms has resulted in a multiplier effect and, together, the study has been able to unlock the combined potential of such an application.In particular, the proposed framework acquires a totally dynamic flavor where a water supply system can be modeled, calibrated and validated and its hydraulic performance simulated for a diverse set of operating requirements.The modules of DSS, as designed, can then acquire facts that emerge from such an exercise for further analysis and post processing by the inference engine and its resident and equally dynamic and flexible knowledge base.
Furthermore, the proposed DSS has been designed to perform other routine tasks such as directed simulation runs in response to any real or hypothetical intervention and to assess the given study network for consequent impacts.This helps in a priori generation of knowledge regarding network performance following such interventions.
CLIPS platform does not have permanent memory and an important contribution of the study has been the development of an external dynamic knowledge base with the mechanism for transferring newer facts into the knowledge base for subsequent use by the inference engine of CLIPS.The dynamic knowledge domain is designed to be self learning as it autogenerates newer knowledge for the DSS for future guidance.
The DSS, with its Simulation and Planning Modules is able to estimate, in advance, the expected Hazen Williams Cvalues for planning horizons of 5, 10, 15 and 20 years and, importantly, the proposed DSS avoids excessive dependence on interventions by highly trained expert personnel and with the help of a highly user friendly interface, even relatively novice operators are now vested with necessary tools for effective management.
The developed DSS is being implemented on a real world water distribution network.Further work is required to implement the system on SCADA based management of water distribution system.

Fig. 2 .
Fig. 2. Basic Framework of Decision Support System

Fig. 4 .
Fig. 4. Components of CLIPS and its implementation in ES

Fig. 5 .Fig. 6 .
Fig. 5. Class and child Class for fact of Pipe object

Fig. 14 .
Fig. 14.Screen Shot of the Calibration Module

Fig. 17 .
Fig. 17.Variation of flows and heads over PH
kulshrestha,S.: CLIPS based Decision Support System Condition Message/ Warning/ Advice CLIPS working for Sub-Module II If all Link Flows and Junction Heads normal If Link Flows and Junction Heads not normal then Check Reservoir Levels.If Reservoir Levels not OK If Reservoir Levels Ok, check Pump Status.If there is any Pump failure If Pump status Ok, check Electricity status.