Logic programming in groundwater resources ... - Semantic Scholar

2 downloads 0 Views 695KB Size Report
Jan 11, 1990 - on a personal computer under MS-DOS. The knowledge base has ... programmation logique Prolog avec MS-DOS. La base des.
Hydroloffcal Sciences - Journal - des Sciences Hydrologiques, 36,1, 2/1991

Logic programming in groundwater resources management

F. TANGORRA University ofBari, Institute di Scienze dell'Informazione, via Amendola, 173, 70126 Bari, Italy

M. VURRO National Research Council, Water Research Institute, Experimental Laboratory ofBari, via F. De Blasio, 5, 70123 Bari, Italy

Abstract Artificial intelligence techniques can be used to solve problems using a heuristic approach. This paper deals with a model able to verify whether there is groundwater in a given place, the quantity available and its quality. The system has been implemented in the logic programming language Prolog and runs on a personal computer under MS-DOS. The knowledge base has been constructed using degrees of certainty and other factors. The model has been applied to a region in Southern Italy, where data are available. The first results are encouraging and further questions about groundwater quantity and quality are being examined. La gestion des ressources en eau souterraine par l'approche heuristique Résumé On peut résoudre avec l'utilisation des techniques d'intelligence artificielle les problèmes utilisant une approche heuristique. Cet article décrit un modèle capable de vérifier la présence de l'eau dans un site donnée, la quantité utilisable et sa qualité. Le modèle a été réalisé en utilisant un langage de programmation logique Prolog avec MS-DOS. La base des connaissances a été établie en utilisant un degré de certitude et d'autres facteurs. Le modèle a été appliqué dans une zone située dans l'Italie du Sud, où il y avait suffisamment de données. Les premiers résultats nous encouragent à continuer à analyser les sujets relatifs à la quantité et à la qualité d'eau souterraine. INTRODUCTION In groundwater resources management, numerous algorithms and mathematical procedures allow optimal utilization criteria to be determined (Fleming, 1975). Artificial intelligence (AI) techniques have demonstrated a high potential to bring inexpensive processing power to tasks once thought beyond computer capability (Williams, 1986). This topic is being studied by the artificial intelligence community with work devoted to both theoretical and Open for discussion until 1 August 1991

1

F. Tangorra & M. Vurro

2

application areas (Eliot & Scacchi, 1986; Myers, 1986). Successful commercial applications, such as XCON and BEYOND by Digital Equipment Corporation (Barker & O'Connor, 1989), have created major interest in AI applications. A list of application areas made by Watermann (1986) indicates that applications to water resources management systems are lacking. Applications have been made in different topics, such as environmental topics (Hushon, 1987), geotechnical data domains (Kahn & McDermott, 1986), etc. In the water resources area, few applications have been carried out for resolving problems where a heuristic approach is required: Chidley et al. (1987) dealt with the land evaluation phase in the design of irrigation schemes; Detay & Poyet (1989) examined a model for village water supply schemes using groundwater; Macgilchrist (1987) developed a diagnostic for the state of repair of sewerage and for aiding the planning of sewer rehabilitation; and Cousin et al. (1987) studied methods for operating waste water treatment plants. The following applications have, in addition, been identified: (a) water prospecting based on geological data; (b) aid in the choice of suitable simulation or optimization models; and (c) aid in the choice of artificial recharge plant design. The initial interest in this study has been the first application, where the required knowledge comes from different disciplines: soil science, geology, economics, social science and engineering. For the development of the process, all the items required are not always available at each decisionmaking stage (Sirangelo & Troisi, 1980). The increase in water demand has revealed the importance of the correct management of water resources, particularly in developing agricultural and industrial areas. It is therefore necessary to seek utilization criteria based on all available resources and satisfying all economic, social and legal aspects (Benedini & Troisi, 1977). This subject is very relevant in arid and semiarid zones (Detay & Poyet, 1989), where scanty rainfall is combined with limited availability of surface water resources. The Apulia Region (Southern Italy) has climate characteristics typical of semiarid zones: yearly rainfall is about 600 mm and there are comparatively few streams. Both private bodies and public agencies lavish a lot of energy on obviating these shortcomings, which are obstacles to social and economic development. In this situation, groundwater assumes a considerable importance as it is the only kind of water available in the Apulia Region (Troisi & Vurro, 1988). From this point of view, the quality of the groundwater is of decisive significance in choosing the final use (urban, agricultural or industrial). The figure of the hydrogeologist has emerged as that of an expert in prospecting for water bodies through the study of surface geological data, the stratigraphie data in nearby zones and on-the-job experience gained over the years. The hydrogeologist provides support for water management agencies in making an appropriate choice of the sites where wells are to be drilled. This paper deals with a model for investigating aquifers using logic programming. It is useful for the agencies in singling out the best distribution of wells, for the hydrogeologist for making a heuristic check of a considerable amount of information (sometimes contradictory), and it is instructive for the

3

Logic programming in groundwater resources management

would-be hydrogeologist in view of the methodology it involves. THE SUBJECT DOMAIN Different methods have been used for investigating water resources in a given area. Knowledge of the superficial geological characteristics and some stratigraphic sections of the zone under observation represent priority information for the evaluation and location of aquifers. Geophysical methods may be used to identify the presence of groundwater and, on the basis of these analyses, the expert can interpret and evaluate the quantity of groundwater. The model has to answer the following questions: is there any water in a given place? If so, is it available? what is the quantity of the water available? and what is the quality of the water? Therefore, the main parameters to be taken into consideration are: (a) the characteristics of the surface geology (a factor of certainty has been used based on the sample data available); (b) the well density in each geological zone (a certainty factor has also been used as a basis for the wells/area ratio); (c) the stratigraphy of the wells concerned (a numerical scale has been specified based on the number of occurrences); (d) the thickness of each stratigraphy starting from the water table (a numerical scale has been specified); (e) pumping tests (a numerical scale has been specified for the amount of water being pumped); (f) the hydraulic conductivity for each well under observation; and (g) the values of the principal chemical parameters in accordance with the requirements for water use (BOD5, COD, TOC, N-org, N0 2 , N0 3 , K, dry residue at 110°C). So far, only the first question can be answered by the model. Therefore, for the time being, the model considers only the parameters (a)-(d). IMPLEMENTATION The system has been implemented in the logic programming language Prolog (Turbo Prolog, 1986) and runs on a personal computer under MS-DOS. Logic programming structures a program in terms of a set of logical propositions (Horn clauses) describing data and relations between data (Clocksin & Mellish, 1981). Prolog manages a database containing facts and rules which are used to respond to the user's questions. An interpreter attempts to respond to the user's query (goal) by means of a non-deterministic research process. Prolog uses an inference procedure which is independent of the application. By coupling this inference procedure with the application, it is possible for the computer to draw conclusions even if the answers are not explicitly stated in the description.

F. Tangorra & M. Vurro

4

The main features of this language are: incremental development: as new information is found in a given application area, it is possible to add that information to the knowledge base in the same program. It is not necessary to develop or re-examine the algorithms; (b) facts and rules: in Prolog, the facts and rules are represented by means of predicates and propositions that follow first order predicate calculus. The facts are logic assertions, consisting of a predicate followed by its arguments, which are normally constants. A rule or proposition can be regarded as a conditional phrase associated with a logic term, called goal, which can assume the Boolean values of true or false; and (c) matching algorithm: the inference rule used by the interpreter Prolog for trying out a goal is based on a unification or matching algorithm. (a)

THE MODEL The knowledge base The knowledge base is designed using the symbols of a semantic net. A semantic net is a particular structure of data storage that represents logical relationships. Starting from this it is possible to build inferences. The water-seeking knowledge base is shown in Fig. 1 using a semantic net. The nodes represent things, concepts or situations (entities) present in the domain; the lines link two nodes and represent a relationship between two entities. The arrow shows the direction of the relationship. Each entity (node) and relation has a name. The knowledge base has been designed as follows: each zone has an "area" in which there is a "number of wells": using these two parameters the "well density in the zone" is obtained. With the use of AND the two items of information well density in the zone and the number of wells, and also using a few heuristic rules for the relationship "produce", one gets the entity called "degree of superficial certainty", which gives a first indication about the presence of water in the zone under observation. Each well belonging to a zone has a known stratigraphy. It is thus possible to define a "degree of stratigraphie certainty" by applying a few rules (the relation "allow"). It is well known that each material, e.g. rock, soil, has a different behaviour vis-à-vis water (yield capacity, hydraulic conductivity). From this point of view, each material and the different relations among them can be linked up to give a factor called "water presence index" (IP) which is computed as the difference between the occurrences of water presence and the non-occurrences of water presence divided by the total occurrences. The range is from - 1 to 1 and can have the following meanings: -1 water never present; 0 no information; and 1 water always present. The final degree of certainty is made up of the sum of the degrees of

5

Logic programming in groundwater resources management

DEGREE OF STRATIGRAPHIC CERTAINTY

©

©^.

'

KNOWN STRATIGRAPHY

WELLS

SURROUNDED ' BY

©DEGREE OF 1 • FINAL CERTAINTY

NEW© WELL THERE ARE TAKE7 TO

O DEGREE OF VsUPERFICIAL \ CERTAINTY

©ZONE PRODUCE

THERE ARE WELL © ^ DENSITY IN A ZONE PRODUCE

Fig. 1

NUMBER OF WELLS

The knowledge base using a semantic net.

superficial and stratigraphie certainties with different weights. When a new well is to be drilled in a given area, the computation of the degree of superficial certainty is obtained in the same way as before. The computation of the degree of stratigraphie certainty is quite different. There are actually only a few other wells in the neighbourhood; the distances between the new well and the others are known, as are their stratigraphies. Using the relationship "produce" the model is processed with an estimated stratigraphy that has a coefficient of confidence: the relation using statistical methods is obtained by combining the estimated stratigraphy and the coefficient of confidence with rules inside the inference procedure. APPLICATION The model has been applied to a part of the Apulia Region (Southern Italy),

F. Tangorra & M. Vurro

6

Fig. 2, where a lot of data are available and groundwater is very important, especially for agricultural uses. The aquifer generally lies on a body of intruding seawater. Its thickness gradually tends to zero close to the coast, where, due to the permeability of the outcropping rocks, a free seaward outflow of groundwater occurs naturally (Cotecchia, 1977). On the basis of a considerable amount of field studies (Cotecchia, 1977) an underground watershed may be said to exist upstream in the middle of the Penisola Salentina, which separates the groundwater flowing towards the Ionian Sea from that flowing towards the Adriatic Sea and which coincides with the phreatic contour 2.5 m a.m.s.L The neighbouring area to the northwest is the Murge hydrogeological system and the connection between these two systems is characterized by rapid variations in a number of significant characteristics such as piezometric head, seepage velocity, etc. (Benedini et al, 1983). The sample is made up of more than 80 drilled wells, and water has been found in about 70. The entire zone was divided into four sub-zones according to the geology, (Fig. 2): (a) silt and sand with levels of silty clay and calcarenite (zone (a)): deposits stored up by sea water transportation and sedimentation, often on infrapleistocenic blue clay; thickness about 10 m; there are small aquifers with saline water;

Fig. 2

The studied zone and its geology (by Cotecchia, 1971).

7

Logic programming in groundwater resources management

(b)

calcarenite with sand dune and organic limestone (zone (b)): upper pleistocene and lower pliocene rocky sediments laid on cretaceous-miocene limestone or infra-pleistocenic blue clay; thickness very variable; not generally stratified and fissured; possibility of finding artificial caves; (c) a particular calcarenite called "Pietra Leccese" (zone (c)): miocène rock; excellent soil for foundations; possible to find some lenses of a particular clay called "terra rossa"; (d) limestone, dolomite and dolomitic limestone (zone (d)): oligocène and Jurassic rock; thickness very variable from centimetres to a few metres; generally fractured and fissured; big aquifers; every now and then the possibility of finding some lenses of "terra rossa". The wells under observation were assigned to these sub-zones and the first factor of certainty for finding water was computed as a function of the well/area ratio and the number of wells in the same zone. The second factor of certainty was computed by analysing the stratigraphy of the sample, because the sequences of the different geological properties are known: by correlating these characteristics with the discovery of water this second factor was also computed. A weighting factor was also assigned on the basis of the thickness of each rock. These parameters were used to answer the first question in the Subject Domain section.

An example of a user session According to the knowledge base, the hydrogeologist may define the parameters of a new zone or also may update an existing one, using a user-friendly dialogue. The same kind of dialogue allows the user to interrogate the system and to know at a given time the path of the reasoning carried out. For a better understanding, an example of a working session is shown in Fig. 3. Turbo-Prolog has a windowed environment, in which one window is reserved for the dialogue with the operator. The system prompt is "Goal:" user questions are in lower-case letters, system answers in upper-case letters. Figure 3 lists one path among the choices allowing the user to get results (the words in brackets point out the predicate to start). Following the path previously indicated, Fig. 4 shows the results of a real case study; the probability of success of a well drilled in a zone selected by user is wanted. Figure 4 starts from the last screen window of Fig. 3, showing successive choices. The values of the two degrees of certainty are influenced by the presence of dry wells in zone (c). Moreover, the stratigraphie degree of certainty is greater than that of the other zones, because the value is found considering the neighbouring wells. The last information encourages the hydrogeologist to drill the new well.

DISCUSSION For the time being, the model is being run in limited areas called "reference

F. Tangorra & M. Vurro Dialog Goal : start SELECT ONE OF: 1. PARAMETERS OF A WELL (we!1) 2. PARAMETERS OF A ZONE (zone) 3. SUCCESS PROBABILITY OF A NEW WELL (newel 1) 4. UPDATING DATABASE (updating) 5. EXIT (exit) True Goal : Dialog True Goal : newel 1 SELECT ONE OF: (zone code) 1. ZONE CODE (coord) 2. GEO. COORDINATES 3, NEIGHBOURING WELL CODES (well code) (exit) 4. EXIT True Dialog Goal : True Goal : zone code SELECT ONE OF: (za) ZONE A (zb) ZONE B (zc) ZONE C (zd) ZONE D (exit) EXIT Dialog True True Goal : zc SELECT ONE OF: DESCRIPTION OF THE ZONE (description) COMPUTING OF SUPERFICIAL DEGREE OF CERTAINTY (degree_of_certainty) STRATIGRAPHIC DEGREE OF CERTAINTY (strat i graph i c_certa i nty) DRY WELL (no_water) EXIT (exit) True Goal

Fig. 3 An example of the menu dialogue of the system. models". These are parts of a region with similar characteristics. Each model reflects the peculiarities of the site and affords this knowledge to the general system. One has to combine a few models in order to have a general system. An expert system is more useful and powerful the higher the level of specialist knowledge. Such an expert system has to be designed in cooperation with a geologist who knows the zone, the area and the region. The model requires the implementation of a user interface that allows queries to be addressed to the knowledge base. This user interface has to allow one of the designing and implementing models to be consulted and new models to be built if necessary. The system library can be increased in this way. The development of such new models should be supported by their own rules, stored in the inference component. The rules will ask the user about the principal characteristics of the new zone. Another release of the model using a specific tool for designing an expert system, i.e. a "shell", is under development. A shell is an expert

9

Logic programming in groundwater resources management Dialog

Goal : description THE GEOLOGY IS MADE BY SAND AND SILT, NOW AND THEN WITH SILTY CLAY AND SOFT CALCARENITE LEVELS True Goal : degree_of_certainty THE DEGREE OF CERTAINTY TO A SURFACE LEVEL IN THIS ZONE IS 0.65 True Goal : True Dialog Goal : stratigraphic_certainty SELECT ONE OF: 1. COMPUTING OF STRATIGRAPHIC DEGREE OF CERTAINTY (computing) 2. DISPLAY OF PRESUMED STRATIGRAPHY (stratigraphy) 3. EXIT (exit) True Goal : Dialog Goal : computing IN THE ZONE C WE HAVE FRACTURED DOLOMI TE LIMESTONE AND SOFT DOLOMITIC CALCAR ENITE, THE DEGREE OF STRATIGRAPHIC CER TAINTY IS 0.867 True Goal :

Fig. 4 An example of a real case study. system without a knowledge base, i.e., the shell gives the logical structure: the inference component and the structure to store the knowledge. A shell has an interface through which a dialogue with the user can be built up and a language to produce rules with which it is possible to formalize the knowledge. These structures simplify the implementation aspects and allow the direction of efforts towards designing the knowledge base. The user interface of a shell is able to show, at any moment, the logical process followed to reach the conclusions obtained. This kind of dialogue allows the user (the expert) to verify the decision-making process used by the system. The possibility of answering queries about the quantity and quality of groundwater is now being developed and will involve the use of geostatistics. Acknowledgement Thanks are due to Mr Palmisano, IRSA CNR, for his help with the computer work, and to Mr Speziale and Mrs Vecchio for their discussions on this topic. REFERENCES Barker, V. E. & O'Connor, D. E. (1989) Expert systems for configuration at Digital: Xcon and beyond. Communications of the ACMMarch, 298-318. Benedini, M., Sirangelo, B., Troisi, S. & Vurro, M. (1983) Mathematical model of a coastal

F. Tangorra & M. Vurro

10

aquifer subject to seawater intrusion: the Nardol aquifer (Italy) as an example. Geol. Appl. Idrog. 18, 183-195. Benedini, M. & Troisi, S. (1977) New processes for groundwater resources management. Geol. Appl. Idrog. 12, 79-103. (In Italian). Chidley, T. R. E., Elgy, J., Marinari, S. & Pooley, M. (1987) An expert system for irrigation engineers. In Knowledge Based Expert Systems for Engineering: Classification, Education and Control (ed. D. Sriram & R. A. Adey) 247-253, CMP Boston, USA. Clocksin, W. F. & Meilish, C. S. (1981) Programming in Prolog. Springer-Verlag, New York, USA. Cotecchia, V. (1971) About some geoteehnical aspects related to soil in Apulia Region. Riv. Italiana di Geotecnica 1-2, 1-33 (in Italian). Cotecchia, V. (1977) Study and research on Apulian groundwater and seawater intrusion (Salentina Peninsula). Quaderni IRSA 20, Rome (in Italian). Cousin, F., Jestin, J. M., Lannuzel, P. & Meymy, H. (1987) Biosurveyor, a knowledge based system for operators conducting waste water treatment plants. In: XXUIAHR Seminar System Expert, September, Lausanne. Detay, M. & Poyet, P. (1989) Development and evaluation of a field prototype expert system for village water supply programs. In: Groundwater Management: Quantity and Quality (Proc. Benidorm Symp., October 1989) IAHS Publ. no. 188, 80-100. Eliot, L. B. & Scacchi, W. (1986) Towards a knowledge based system factory: issues and implementations. IEEE Expert Winter, 51-57. Fleming, G. (1975) Computer Simulation Techniques in Hydrology Elsevier, New York, USA. Hushon, J. M. (1987) Expert system for environmental problems. Environ. Sci. Technol. 21 (9), 838-841. Kahn, G. & McDermott, J. (1986) The mud system. IEEE Expert Spring, 23-32. Macgilchrist, R. S. (1987) Apogee: a sewerage rehabilitation planning expert system. In: XXII IAHR Seminar System Expert, September, Lausanne. Myers, W. (1986) Introduction to expert systems. IEEE Expert Spring, 100-109. Sirangelo, B. & Troisi, S. (1980) Methodological study of a hydrodynamic model: IDROSIM. Quaderni IRSA 50, Rome (in Italian). Troisi, S. & Vurro, M. (1988) Hydrological balance for the evaluation of natural recharge: an application to a part of Ofanto River catchment (Southern Italy). In: Interaction Between Groundwater and Surface Water (Proc. Int. Symp., May, Sweden), 5-14. Turbo Prolog (1986) Owner's Handbook Borland International Inc. Waterman, D. (1986) A Guide to Expert Systems. Addison Wesley, Reading, Massachussetts, USA. Williams, C. (1986) Expert systems, knowledge engineering, and AI tools: an overview. IEEE Expert Winter, 66-70. Received 11 January 1990; accepted 5 July 1990