Copyright © IFAC Artificial Intelligence in Agriculture. Wageningen. The Netherlands. 1995
INTEGRATING AN EXPERT SYSTEM COMPONENT INTO THE HYDRA IRRIGATION DSS
G. Jacucci, C. Uhrik, G. Bertanzon, P. Yovchev, D. Calza, E. vane, M. Douroukis Laboratorio di Ingegneria Informatica. Dipartimento di Informatica e Studi Aziendali
Universitd degli Studi di Trento. Via F. Zeni 8.1-38086 Rovereto - TN Italy P. Kabat, J. Huygen, B. Van den Broek Winand Staring Centre. 11/22 Marikeweg. Wageningen. 6700 AC The Netherlands L. S. Pereira, J. L. Teixeira, R. Fernando, D. Carreira
Inst. Superior de Agronomia. Univ. of Lisbon. Tapada do Ajuda. 1399 Lisbon Portugal P. Verrier Inst. of Arable Crops Research. Rothamsted Exp. Station. Harpenden-Hertfordshire. UK P. Steduto, M. Todorovic 1st. Agronomico Mediterraneo. Via Ceglie 23. Valenzano - Bari.ltaly G. Giannerini, F. Carboni Consorzio Bonifica Renana. Via S. Stefano 26. Bologna. Italy G. Tzianas, E. Fragaki HITEC SA. 18. Posidonos St .. GR 17674 Kallithea - Athens. Greece G. Toiler 1st. Agrario San Michele. Via Mach 1. San Michele all'Adige - Trento.ltaly J. Vera Muiioz Consejo Superior de Investigaciones Cientificas. Apartado 4195. 30080 Murcia. Spain
Abstract: HYDRA is a DSS to improve irrigation water use efficiency in Mediterranean agriculture. helping consortia or regional authorities determine water requirements and supporting local irrigation decision making. HYDRA, in addition to soil-water and cropgrowth simulation models, database. GIS. and GUI. contains expert systems to control decision scenarios and handle missing or erroneous data. Expert systems coupled to the other components serves as a crisp framework in which to organize intelligent DSS and simulation models for adaptability and portability. alleviating problems arising from sensitivity of the models to assumptions specific to geographic location in which they were developed. HYDRA is portable to multiple platforms (workstation and PC) and operating in many different locations in Europe. Keywords: Databases, Decision Support Systems. Expert Systems, Information Systems. Interactive Approaches, Knowledge Based Systems, Man-Machine Interfaces, Simulation, User Interfaces 91
(Belmans, 1983) which are mechanistic models based on underlying biological and physical causal mechanisms. As the simple models require less data than the complex models, one motivation behind including both simple and complex models is that the presence of both models allows use of whatever data is present in the user's current database (SWACROP werkgroep, 1992). This strategy avoids the questionable practice of inferring data of a finer granularity (for complex models) from data of a larger granularity (for simple models) - or vice versa.
1. INIRODUcrION HYDRA (Jacucci, 1992) is a European Communities project introducing information modeling and Decision Support Systems (DSSes) to farmers and water authorities in European Mediterranean agriculture in order to improve irrigation practices. The end product, the HYDRA DSS, will be a versatile software package that can be employed for both strategic and operational irrigation water management purposes - i.e., help farmers make decisions about irrigation as well as allow regional water planners to assess water requirements and evaluate policies. HYDRA thus aims to make it easier, more efficient and more profitable for farmers and water authorities to operate, using state of the art irrigation modeling and information technology tools . In addition, HYDRA acts as a valuable previsional aid to demonstrate outcomes of irrigation treatments .
1.2 Database and Data Entry System The data entry system is responsible for entering, viewing and modifying the central database of the system. This database also serves as a repository for additional data generated for soil and meteo data.
1.3 Geographical Information System The Geographical Information System (GIS) is used for the input and display of spatial data such as maps showing land use, crops, soil types, irrigation infrastructure, field boundaries, local and regional boundaries and identification aids, such as roads, major buildings and meteorological stations. The GIS is also used for determining crop areas and soil boundaries.
2. COMPONENTS The main components of the HYDRA DSS as shown in Figure 1 are: 1) growth simulation models, 2) database and data entry system, 3) geographical information system, 4) expert system module, 5) graphical user interface (GUI) and DSS scenario controller.
1.4 Expert System Modules In the DSS scenario controller, heuristics are used to establish short or long term water allocation strategies given management objectives and to implement a selected strategy during the current season. Decisions address various levels of the intended HYDRA users for a single farm , a group of farmers (water users association) and the water supplier. The DSS activities are moderated through various user defined scenarios which may be supplemented with expert built-in knowledge.
1.1 Crop Growth Models The crop growth simulations at the heart of the system consist of a simple and a complex crop growth model and a simple and complex soil water balance model which play the effects of weather, soil hydraulics and crop factors against one another to determine water consumption and growth of the crop. The simple models correspond to empirical models based on ISAREG developed at the Univ. of Lisbon (Teixeira, 1991) and the U .N. FAO model (Doorenbos, 1979). The complex models correspond to WOFOST (Van Diepen, 1988) and SW ATRE
In addition, the expert system modules are able to use historical meteo observations and derived climatic normals for the calculation of reference weather and rainfall regimes of various dependability level which is subsequentyly used to fill in missing values. During the current agricultural season the meteo database will supply data sets which are a blend of observed data, forecasted data input by the user and generated data. Analogously , the expert system modules supply the simulation models with appropriate soil hydraulic parameters by matching texture classes or water holding capacity to known soil types already in the database.
lnformalian
Sy"""'" (GIS)
15 GUI and DSS Scenario Controller A graphical user interface (GUI) provides a userfriendly and comfortable environment in which to communicate and work with the HYDRA DSS. It supplies the overall organizing shell for running the DSS models. The GUI presents interactive command menus to retrieve and update input parameters and
Figure 1. Components of HYDRA 92
steering variables, to enter user constraints and preferences and to present relevant DSS information back to the user after simulations have run and knowledge based inferences occurred.
database management system), to manually enter and edit data, as well as to browse data during normal operation from other points in the HYDRA system. Assuming all data has been entered and checked for consistency, the central parcel database used by the model data retrieval code can be created to serve as the HYDRA primary data. From the basic input data and the primary data, the expert system modules subsequently derive secondary data which creates summary weather according to rainfall dependability levels and soil parameter data. That is, the expert system performs conversion, validation and generation (filling or correction of missing values) for weather data and soil parameters.
In the subsequent sections, the data management components (databases+GIS) and DSS scenario components (GUI , DSS controller, expert system modules) are described in more detail. 3. DATA MANAGEMENT HYDRA contains a number of subcomponents concerned with storage, management and processing of required data. They comprise a thematic database (DB) to organize various model inputs and outputs, a geographical information system (GIS), and several utility programs such as the data entry system (DES), an agro-meteorological information subcomponent (HAMIS) and a soil information subcomponent (HASIS) which assist with managing weather and soil parameters respectively.
Map requirements for the GIS arise from the need to obtain a consolidated map in which the smallest bounded area is uniform with respect to the crop planted there, the irrigation system present, soil type and weather. These homogeneous regions are referred to in our terminology as a "basic simulation unit" (BSU). All simulations are executed from the BSU map, while the farm map is used to select a subregion . Initially, the BSU map does not exist, and so it is constructed internally by the GIS from a composition of other maps: soil, farm and fields, topography (for geographic reference), hydrology (carrying channel characteristics) , land use (agricultural land use, surface water, rough lands, ... ).
The thematic database maintains crop data, soil parameters, meteorological data, irrigation records and ground water and salinity measurements used directly by the models. The database also contains general information on farms, owners and more global concerns of the DSS such as economic parameters used in ranking decision alternatives. The GIS is used for the input and display of spatial data such as maps showing land-use, crops, soil types, irrigation infrastructure, field boundaries, local and regional boundaries and identification aids, such as roads , major buildings and meteorological stations. The GIS is also useful for determining crop areas and soil type boundaries as well as generating spatial relations (such as distances between fields and meteo stations, or length of irrigation pipes).
4. DSS SCENARIO COMPONENT A DSS scenario component acts as one part of the buffering between the user and simulation models, moderating the solicitation of user inputs and subsequent display of simulation results. It contains three subcomponents: a) a graphical user interface (GUI) to present menus and control knobs to set up and display scenario options and parameters: b) a scenario generator to translate the user-defmed goals into a simulation scenario which consists of: what to do& how to present outputs to users, which fields or farms or regions to simulate & what period of time to simulate, irrigation scheduling constraints, user preferences and weather/markets estimates: c) a knowledge base containing a set of user-specific tables and heuristics for best use of user provided inputs (some of which may only be circumstantially related to crop-water modeling inputs) and decision-oriented rules for the translation of simulation results into information that the user requires. The end user view reflected by the GUI (and the scenario generator and expert systems module) is shown in Figure 3.
These components are integrated as shown in Figure 2. At the top of the figure, the maps and database input into HYDRA are shown as basic data. Maps in digitized form (e.g., ARCINFO or AUTOCAD DXF format) are read into the system via specialized data entry routines resident in the GIS whereas the thematic data is read in using the HYDRA data entry system. The data entry system serves to read in preexisting data files (e.g., produced by some other
4.1 Scenario Generator Subcomponent The DSS controller utilizes one of two scenarios. The 2 scenarios correspond to specific problem solving behaviors associated with the HYDRA DSS. The controller invokes the GUI and expert system
Figure 2. HYDRA Data Maintenance Structures 93
----
scenario considers rather small uniform areas called parcels (fields), the second scenario considers rather large uniform areas which correspond to aggregations of parcels/fields. At a regional or sector level, the effects of individual fields are not particularly of interest, only the bulk water requirements, (e.g., according to crops cultivated) are of interest. Thus, the second scenario involves specifying an initial crop pattern in terms of percentages of total cultivated area per crop instead of specifying a single crop as in the first scenario. This pattern by default is taken from an aggregation of data in the database, but can be systematically altered as a decision variable across multiple runs of the DSS scenario so as to study the potential effect on total water requirements for a region or sector. The simulations thus set up presume a set of Basic Simulation Units (BSUs) which are constructed making simplifying assumptions intrinsic to the scenario: 1. each BSU is an abstract simulation area corresponding to a total area cultivated with a single crop and soil type, 2. weather is uniform across a BSU (geographically central-most weather station is used), 3. all crops of the same type are assumed to coincide in growing/harvest periods. Subsequent to making simulations, results are aggregated and summarized so as to give both the fractional water demands on a per crop basis and the cumulative water demand.
roeee .'1
,.
I'
I'
"I
"J:
I)
" ..
\/
u-~. ............""-
Figure 3. The User View of the HYDRA DSS modules as needed to collect, process and display model inputs and outputs and independently invokes the models, possibly repeatedly, in accordance with a predefined problem solving strategy for implementing the scenario. Farm and Field Level Initial Scenario. The frrst of the 2 HYDRA scenarios addresses farm and field level. There is the possibility to select one or more parcels (fields) on which simulations are to be made. These locations can correspond to various parcels identified on the HYDRA mapsets or database such as a specific field, parcels of a specific soil type, parcels of a specific crop type, or all parcels on a farm. Subsequently, one asserts assumptions about the crop type (default is the one recorded in the database for the current year), the weather according to being wet, dry, or average year (default =average), and the growth season in terms of emergence and harvest dates (which is optional).
4.2 Knowledge Base Subcomponent HYDRA also incorporates the equivalent of several expert systems based on economic principles anci other heuristics used to establish various decisions within the scenarios (for example, find a better long term water allocation strategy, given certain management objectives, or implement a selected strategy during the current season). Traditionally, an optimization could be carried out for a single farm, a group of farmers (water users association) and the water supplier, but in a DSS the results are more usually represented as ranked and ordered alternative decisions. leaving room for incorporation of any preferences of individual users. Rather than spanning the results from a single consolidated objective function, HYDRA allows executing a multi-step search along a number of input and output dimensions simultaneously, directed at incremental alternative improvements. The primary need of the DSS is not for interference of deep deductive reasoning chains, but rather for the application of superficial expert background knowledge about simulation parameters and the potential for alternative improvements - setting an agenda which extends over no more than a few simulation cycles. Thus, for many input/output related tasks, the expert system reduces the demand on the user by transforming circumstantially available data into model oriented data or agenda oriented data. As well. the expert system module is an ideal place insert regionally specific localizations in a flexible way for instance, to add a correction factor for evapotranspiration in a humid region near the sea.
Within this scenario, there are 2 modes for specifying how much and when irrigation water is to be applied. The one possibility called "evaluation mode" assumes that a schedule of water applications is to be taken from either records in the database associated with the date range specified for the scenario or records which are to be defined by the user. The other possible mode for irrigation is called "scheduling." It allows the user to select a scheduling criteria in terms of when to give the water (e.g., when soil moisture falls below a specified margin, or daily stress reaches a certain point) and what quantity to give when the criteria is met (e.g., a fixed deptll of water in millimeters or enough water to return to field capacity). Subsequently, the simulations are executed and results for each of the simulated parcels (fields) can be viewed. Various graphical results, such as yield or relative yield, evaporation (potential or actual), transpiration (potential or actual), combined evapotranspiration (potential or actual), etc. can be viewed depending on user selected preferences. Each result however is available only on a parcel-by-parcel (field-by-field) basis. Sector and Regional Level Initial Scenario . The second of the two HYDRA scenarios addresses sector and regional level water requirements according to the interests of water consortia. Whereas the first 94
5. EXPERT SYSTEM UTILITY IN THE DSS
backtrack over models (embedded in rules) as well as rules; in a multi-part subsystem scenario. models and rule bases are indistinguishable; the inference engine directly triggers models. g. data-driven control - depending on data available. rules choose between simple or complex models. given that both are available for the same goal; different model ensembles may be available «Fedra. 1991). (Jacucci. 1992». h. data priorities - models often reflect only simplified relationships that are convenient to express as equations. but rules can impose priorities and meaning according to users' expectations. For example. use the most important variables first; all inputs regarding roots should be inquired together. similarly about leaves. etc .. i. additional DSS expertises - since one simulation can address many decision making scenarios. flexible rules can introduce additional DSS scenario-dependent expertise beyond simulation control of the specific technical subfield (such as. irrigation or fungal infection). thus addressing DSS modeling objectives; for example. taking into account economic concerns or global farm management issues. j. adaptability and portability - models sensitive to assumptions that are specific to the geographic location where they were developed can be dynamically modified to recognize and reconfigure their location specific parameters. k. peripheral computational aspects - particularly for economic aspects. there are not simple ways to deal with characteristically different realities. Public institutions that collect economic statistics do so according to different needs. and so it becomes necessary to add openness and flexibility in treating the calculation of costs. (For example. the ways in which subsidies are allotted locally should correspond to the local administration's implementation of higher level governmental decrees; or the breakdowns of costs of local alternative crop treatments can be at a different level. In one place manpower and fuel costs per treatment may be known whereas in another place only a bulk average aggregated cost per treatment may be known.) Also. different crops have economic alternatives which can be quite crop specific (grasses for example can be harvested in multiple cuttings. alternatively converted to hay. and/or taken for seed - all with different economic computational significance). Usually. the base part of the computation is common among all crops. only some add-on parts are crop specific.
As mentioned before. an expert system component connected to the scenario component acts as an added intelligence in the system to serve as a buffer between the user and simulation models. moderating the solicitation of user inputs and subsequent display of simulation results. Expert systems can usefully serve various functions in modeling systems.
For many input/output related tasks. the expert system reduces the demands on the user by transforming circumstantially available data into model-oriented data. Specifically. the following are possible uses for an expert systems in an agronomic modeling context: a. parameter estimation - values required by models. unknown · because of difficulties to obtain or measure. can be obtained from specified rules that infer values from the context of known values of other variables; "reasonable" values can be prescribed when a user lacks enough experience to set a model parameter; decision scenarios may benefit from suggesting different settings of variables - typicaVaverage alternatives. worst/best case using knowledge of how inputs affect outputs. b. enforcing regulations - compliance with legal rules can be checked so that values proposed or values resulting from the propagation of proposed values through models are automatically checked against limits dermed in laws. c. consistency checking - causal connections over values of variables due to mathematical or physical relations can be cross-checked as the value is being entered to determine the plausible settings of one variable given the settings of another. This is a way of introducing background knowledge from the agricultural domain. d. setting an agenda - after executing a particular simulation or model run that corresponds to the present situation. the user may like to compare alternative scenarios with different strategies. attempting to make improvements. Thus. setting the future agenda of simulation inputs based on perturbations and evaluations of the present situation may be somewhat involved. Furthermore. the exact significance of these strategies can be quite location specific. Rules which are flexible and simple are a good solution to this problem. From a modeling view. there are additional uses for expert systems. Generally. agro/enviro-systems consist of multi-part systems - systems of subsystems. which requires integrating the subsystem models. Thus. the above items can also integrate model components by imposing consistency from the outputs of one model to inputs of another. Additional model-oriented roles assigned to the knowledge based components are the following: e. surface modeling - shallow surface models implemented as rules can replace simulations with excessive computational times relative to accuracy
A similar approach can be seen in a number of expert systems supporting DSSes in various environmental domains developed by IIASA (Fedra. 1991). 6. IMPLEMENTATION HYDRA is being developed on a SUN SPARC workstation under the SUN OS operating system and is also ported to IBM PC 386/486 compatible systems under the Linux operating system which is a
needed. f. backtracking - the rule inference engine can 95
the burden of having an overly extensive knowledge of input values, model parameters and appropriate initial conditions, by exploiting circumstantially available data of the user. Likewise, for many output related tasks, the system can aid the user in interpreting results and suggesting decision options according to numerous scenarios.
public domain Unix implementation and may be mounted concurrently with MS-DOS. High resolution (VG A) color monitor, 8 Mbytes of RAM, mouse and about 250 Mbytes of disk are required. HYDRA makes use of a number of public domain software tools which make it easily portable to many platforms. For managing map data, HYDRA employs GRASS Version 4.1, a public domain, image processing, and geographic information system (GIS), written in the C programming language, running under UNIX. For user interface programming, HYDRA makes use of TK{rCL (3.2/6.7), a public domain X Windows based interface builder library/interpreter-language providing a Motif look-and-feel interface. For the expert systems programming, HYDRA also employs TCL which has a set of capabilities very similar to LISP, which has been used extensively in past expert systems. For the database, Metalbase 5.0 is used.
Furthermore, a GIS, a DBMS, a GUI and a DSS serve as a crisp framework in which to organize the simulation models for institutional or consortia-like users who are involved in several different uses of the modeling system and want to maintain a high degree of flexibility in their use. 8. ACKNOWLEDGMENTS The authors deeply thank Dr. Val Reilly, supervisor on behalf of the European Commission, for suggestions, encouragement and support throughout the project.
7. CONCLUSION 9. REFERENCES
The scope of HYDRA is to introduce information modeling and Decision Support Systems (DSSes) to farmers and water authorities in European Mediterranean agriculture in order to improve irrigation practices. The key components of the HYDRA DSS are a set of modular soil water balance and crop growth simulation models, a database management system to organize model inputs and outputs, a geographical information system (GIS), an graphical user interface (GUI), and an expert system which moderates model control for a number of decision oriented scenarios. Depending on the quantity and quality of available input data and the objective of the simulation exercise, the appropriate models are triggered in real time.
Belmans, C. Wesseling, J.G., and Feddes, R.A. 1983. Simulation of the Water Balance of a Cropped Soil: SW ATRE, J. Hydrol., 63:271-286, 1983. Doorenbos, J. and Kassam, A.H. 1979. Yield Response to Water, FAO Irrigation and Drainage Paper, No. 33, FAO Rome. Fedra, Kurt, et.al. 1991. Expert Systems for Environmental Screening, Technical Report RR-9119, Intl. Inst. for Applied System Analysis, Laxenburg, Austria, November 1991. Jacucci, G., et al. 1992. Application of Information Modeling and Decision Support Systems to Irrigation in European Mediterranean Agriculture, In: Proc. of Intl. Conf on Supplementary Irrigation and Drought Water Management, CIHEAM Inst. Agronomico Mediterraneo & Tecnomack di V. Chieco, Bari, Italy.
HYDRA is implemented to serve a variety of users spread across various countries in Europe, with each locale making demands for flexibility: different computer resources, different languages in which text is displayed, different assumptions & data specific to a locality, different levels of precision in the modeling, different decision scenarios involving different objectives, but essentially the same models. Above all, the system must be user-friendly, graphically oriented, and visually appealing to maximize its acceptance by non-modellers.
SWACROP werkgroep. 1992. SWACROP2. an advanced crop growth simulation model. Users manual. The Winand Staring Centre, Wageningen, The Netherlands. Teixeira,.J.L. 1991. ISAREG. programma para simular a rega. Department of Rural Engineering, University of Lisbon, Lisbon, Portugal.
In the area of system development, the open-ended design features of the toolbox approach facilitate a wider geographical dissemination of expertise and context specific knowledge because end users can more easily add their ideas to a system in a way that does not directly fight the developer. Moreover, the ease-of-use aspects and the opportunities to reduce cost and improve efficiency should encourage water consortia and extension services to use the system.
Van Diepen, C.A., Rappoldt, C., Wolf, J., and van Keulen, H. 1988. Crop Growth Simulation Model WOFOST. Documentation Version 4.1, Centre for World Food Studies, Wageningen, The Netherlands.
Knowledge based techniques are quite useful in addressing these issues. For input related tasks, knowledge based methods assist the user by reducing 96