WSRC-MS-90-246 AN EXPERT SAMPLE ANALYSIS PLANNER (U) WSRC-MS--90-246 by DEgl 005124 W. A. SpencerandW. S.Parks Westinghouse Savannah River Company Savmmah River Site Aiken, SC 29808 A paper proposed for presentation at Department of Energy Complex Conference "AI irt the DOE Complex" Idaho National Engineering Laboratory Idaho Falls, ID October 9-11, 1990 and for publication in the proceedings of the meeting !..itI',! / iggI:i DISCLAIMER This report was prepared as an account of work sponsored b? an agency of the United States Government. Neither the United States Government nor any agency thereof, nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsi- bility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Refer- ence herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recom- mendation, or favoring by the United States Government or an_ agency thereof. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or any agency thereof. This article was prepared in connection with work done under Contract No. DE-AC09-89SR18035 with the U. S. Department of Energy. By acceptance of this article, the publisher and/or recipient acknowledges the U. S. Government's right to retain a nonexclusive, royalty-free license in and to any copyright covering this article, along with the right to reproduce and to authorize others to reproduce all or part of the copyrighted article. DISTRIBUTION OF THllS _.X_,,-',UMIE:A!'F_SUNI.IMITEID I WSRC.MS-90.246 AN EXPERT SAMPLE ANALYSES PLANNER (U) by W. A. Spencer and W. S. Parks Westinghouse Savannah River Company Savannah River Site Aiken, SC 29808 AI_TRACT Analytical chemists are faced with the problem of choosing an appropriate analytical technique for a particular sample and weiglfing the options as they affect precision, time, and cost. This paper describes a computer technique to assist managers in reviewing the alternatives and to match needs with the resources available. This paper proposes an expert system, knowledgeable of analytical chemistry techniques, to create sample plans. Sample planning is an appropriate topic for expert systems because scarce human expertise is required to complete sample plans. A sample plan is the description of how samples received at the Savannah River Laboratory are handled, controlled, megua_'ed, and dispositioned. Sample planning is difficult because multiple experts are needed, planning is not a static function, and planning is time consuming. An Expert Sample Analyses Planner (XSAP) is proposed to create sample plans for laboratory managers. XSAP supplements the scarce knowledge of analytical techniques creating sample plans based on analysis constraints, methods available, and time requirements. XSAP interacts with the chemist to suggest sample plans. XSAP considers equipment available locally, at other Savannah River laboratories, at other Department of Energy facilities, and at other commercial laboratories. XSAP allows options on scheduling: best solution, cheapest solution, best local solution, and fastest solution. i INTRODUCTION The task of The Analytical SerJices Group (ASG) personnel is to develop consistent plans to assure quality-analyses/cost-savings to the customer. Assurance of quality analyses requires attention to analysis scheduling and methods. Assurance of cost-savings depends on the development of unambiguous sample plans for the technicians of ASG. A sample plan must be established before any analysis can be conducted by ASG. The sample plan is the description of how samples received at the ASG laboratory are handled, controlled, measured, and dispositioned. The development of sample plans is not a static function; periodic reviews are conducted for established customers because analytical methods change. ASG assigns a chemist or "planner" to create sample plans. The planner is familiar with the routine analytical methods and instruments offered by ASG. And the planner is familiar with offsite laboratories to supplement ASG services. The planner programs the ASG Laboratory Information Management System (LIMS) to support the customer. The planner sets default instructions for ASG to safely handle samples and notes instructions for assigned methods. Samples logged into the LIMS data base become permanent records to identify the sample, determine the hazards, perform the analyses, and dispose of the sample. The planner must know the Customer, the Study, the Material, the Profile, and the Parameters to create the LIMS record. The info_mation required for LIMS: CUS2DMER (e.g., Actinide Tech, DWPT TNX, REACTORS, M AREA, etc.) STUDY (e.g., Pu Scrap, IDMS, J. Bibler) MATERIAL (Glass, Sludge, Pu Scrap, etc.) PROFILE (lists of analytical methods, e.g., SEM]XRD) PARAMETERS ASG (Receiver Initials) ......................... used to activate ASG Description ................................................ brief description Radioactivity ........................................ how much and what Fissionable ............................. no or yes, what and how much Chemical Hazards ............................... warn ASG personnel Submitter ............................................. who gets the results Disposal ..................................... return or dispose of sample Sample Size ........................................ helps identify sample Heterogeneous ........................ if multiphase give instruction Requester .................................... technician or other contact Analyses ....... specific instructions (e.g., IC: chloride, nitrate) Comments ...................................... special message to ASG Planners are expert in one or two areas of analysis but cannot be expert in all analy_es. The planner relies on existing plans and other analytical experts to create customer sample plans. Relying or_existing plans requires that the plans be accurate. Relying on other experts requires the customer to wait until experts are available. Overlap of analysis techniques requires multiple experts to convene to develop a sample plan. New computing techniques are required to assist sample planners _4. The Environmental Protection Agency (EPA) is studying new computing strategies to assist ls boratory managers 8. Knowledge base techniques to automate portions of the analysis process have been created3,4,1°,_l,l_,_8,195°. These computing techniques are known as expert systems. The dynamic nature of analysis, the growing number of work orders, and the lack of comprehensive planning expertise dictates that ASG consider other methods for accurate sample planning. The EPA has developed expert systems in the areas of quality assurance, sampling techniques, selection of laboratories, selection of methods, review of data, diagnosis of sampling techniques, and the evaluation of laboratory analyses. DISCUSSION The ASG requires an Expert Sample Analyses Planner (XSAP). The best solution method for this problem is an intelligent reasoning system. This type of system is referred to as an expert system. Problems appropriate for this solution can be identified using seven criteria15: 1) The need for the solution justifies the cost and effort of building an expert system, 2) Human expertise is not available in all situations where it is needed, 3) The problem may be solved using symbolic reasoning techniques, 4) The problem domain is well structured, 5) The problem may not be solved using traditional computing methods, 6) Cooperative and articulate experts exist, 7) The problem is of sufficient size and scope. The need for the solution justifies the cost and effort of building an expert system 24. The cost savings is in excess of the development costs. A feasibility study for XSAP shows that the system will take 2-4 man-years to develop, and should pay for itself in 1-3 years. Human expertise is not available in all situations when needed. ASG requires a tool that will allow the customers access to expert advise when the expert is not available. The customer can select sample plans that best suit their specific requirements25, 26. The problem may be solved using symbolic reasoning techniques. This problem is solved algorithmically using tables, empiricals, and "rules-of-thumb". User queries may be required, but real-time device inputs are not required 26. The problem domain is well structured. Sample plans are derived from "first-principles" or rules from experts. These decisions can be represented in logical sequences, tables of values, or heuristic measures. Cooperative and articulate experts exist. We have the planners that are currently performing the function and experts at other DOE laboratories. These individuals will be used for the acquisition of information to program this system. This system will not displace experts - but will be a tool to enhance their productivity. Because most sample plans are taken from existing plans or created from empiricals, the size of the XSAP problem is well constrained. This program is proposed for the purpose of sample plan production and table displays. Constraints The planner may constrain the sample plan and XSAP must allow the planner to override the suggested plan. Planning with XSAP is interactive and iterative. The selections by XSAP cannot bearbitrary, so XSAP must be able to describe its rationale for plan development. XSAP describes criterion for plan development, and displays tables, charts, graphs and other empiricals available to the planner for inspection. XSAP includes detailed descriptions for the reasoning process. XSAP optimizes solutions on best, best local, cheapest, and fastest. XSAP weights sample plans based on cost, time, and quality. These constraints require XSAP to optimize resource allocation. Equipment availability/proximity/cost are factors. XSAP considers equipment available at Savannah River Laboratory, at other SRS labs, at other DOE facilities, and at other commercial labs. LIMS users/planners can access XSAP for online analytical reference. Charts, graphs, tables, or other depictions of empiricals are available to LI1VS users and planners. The r:_r interface is a critical design componentS, _°. Presenting data in a format that is familiar to the user is important for the success of the expert system. The interface must be simple so that users will not be required to learn extensive commands and routines, and the data/display must be presented in a manner that is meaningful. Access to XSAP is partitioned. Initially customers will only have access to features of the online documentation. Customer access to all the features of XSAP will be a future endeavor and must be accounted for in the design. LIMS compatibility is maintained. XSAP will be developed on the VAX platform so that it can be distributed over the local area network. Other platforms may be considered a_ technology and markets develop for XSAI_,I$4. S_pe i XSAP architecture will have four functional parts: 1) the knowledge base or rules; 2) the user interface; 3) the ORACLE data base; 4) the tables and analytical data. i XSAP Architecture QQO ? - I__ Knowledge Base 1 Proto_,t_ H_lr, o_ The hardware for the prototype is a MICROVAX II/GPX. The prototype is developed on a stand-alone system running VMS version 5.3. VAX/LISP version 3.0 is the executive controlling the inference engine and frame structure in KEE. KEE (Knowledge Engineering Environment) version 3.1, from Intellicorp, maintains the inference engine and the object system. The LIMS data base is written in ORACLE version 5.0. Knowledge base The knowledge base (KB) is the executive that directs program function 2o. The KB contains the rules to combine empirical evidence from the analytical tables, customer information from the ORACLE data base, and user input from the interface to create sample plans. The KB is divided into control and data/knowledge. Knowledge can be i represented as procedural, qualitative, and semantic 1_. Procedural knowledge is maintained in the KEE TELL/ASK facility. TELL/ASK is the inference mechanism for the system. Qualitative/Semantic knowledge is maintained in the KEE frames. The KB control is modeled in the ACTOR paradigm1, 6,15. Each of the functions of the XSAP system is provided by an ACTOR in KEE. The ACTORS are members of the ACTOR knowledge base. Each ACTOR is modeled as a KEE object called a unit. The behavior of the ACTOR is modeled as methods for the KEE objects. The ACTOR methods are written in LISP. The functional description of the code has produced the following ACTORS: Interface Manager, Resource Manager, ORACLE Manager, Table Manager, Knowledge Manager, Executive Manager. The data/knowledge is maintained in KEE. Static and dynamic entities are modeled in the system. The active entity in the system is called a "request". Each request is modeled as a dynamic object in KEE. Each request has behaviors which are modeled as methods in the dynamic unit. Static knowledge is modeled in KEE objects. Static information includes methods/machines available, and customer information. IIIII IIII I IIII II I i II ..... Control Rules Data , _, ACTORS TELL/ASK UNITS I IIIH KEE KNOWLEDGEBASE IIII I • Interface The user interface is based on interactive graphics. The interface is iconic and mouseable. The user will direct sample plan constructionwith mouse and keyboard instructions. The interface is the most visible part of _he software, and it must be robust and easy to use6,1s,24. The interS'ace is controlled by the Interface Manager. The Interface Manager is an ACTOR in the KEE system. The behavior of the interface is controlled by the ACTOR methods. The methods are written iri LISP code and DECWindows graphics. The Interface Manager has the responsibility for user control of XSAP. The Interface Manager reads mouse clicks that dictate program execution. The interface is menu/mouse driven, but may require user data input. The Interface Manager must read data/character input from the keyboard. The Interface Manager assimilates the direction from the user and displays information to the terminal. ORACLE Data Base The ORACLE data base is ACCESS*LIMS. ACCESS*LIMS is proprietary software developed by PE NELSON. The LIMS system resides on a Digital Equipment Corporation VAX 3800 running VMS 21. Access to LIMS is distributed over local area nodes and access to data is controlled. Access to LIMS is controlled by the VAX System Manager and the ORACLE Data Base Administrator 22. Figure2-1. TypicalACCESS*LIMShardwareconfiguration. ,i ACCESS*LIMS is an object-oriented :implementation. A template of the required information is created at installation. The planner fills in the template to create an instance. Each instance is called a submission. XSAP will assist the planner in filling in the template object by supplying the required information. IEMPLATE INSTANf:_._E.E J i -,L I 1 , Fromlemplaleto Instance. Analytical tables The analytical tables must be developed. These tables contain empirical data. No protocols exist for compilation of these tables. AMES laboratory will assist in the creation of these tables 4. Process The first step in creation of XSAP is completion of Knowledge Acquisition (KA) 15. Knowledge systems differ from traditional coding regimes in the type of information modeled. KA is the procedure used in the development of knowledge based systems that generates the actual functions of the code. We have stated the general requirement of the system: to be an automated assistant to produce sample plans for the ASG "planner'25. The KA function explicitly ferrets out the information that is required by the system. Once planning information has been identified it can then be codified. A prototype of the system will be created after KA. The prototype is used for proof-of-correctness._, 17. This assures both the veracity of the software and the logic processing. Experts will be consulted for the procedures that must be emulated in XSAP. Each planner has an individual planning process; differences will be encountered in the procedures used by the various experts. The prototype is used to identify/rectify the differences before implementation of the system. The prototype is primitive and is intended for incremental development. Software/hardware is designated for the project. Software/hardware is selected to assure compatibility with the existing LIMS system 6. XSAP will be developed on a Microvax II/GPX 21, manufactured by Digital Equipment Corporation (DEC). The development platform will be a stand-alone system. Once development, testing and configuration are complete, the code will be ported to the VAX running the PE NELSON LIMS system. VAX/LISP implements the software executive _1. VAX LISP is the DEC implementation of Common LISP (the ANSI standard) and is compatible with any ANSI standarc LISP implementation 23. The XSAP executive will be written in LISP and connect to KEE (Knowledge Engineering Environment) from Intellicorp. KEE and VAX/LISP are compatible with the ORACLE software. VAX/LISP can interface to ORACLE with a programmed interface 2. VAX/LISP interfaces with existing software. KEE implements the knowledge base. KEE is a powerfultool for developing large expert systems2_. Three major components of KEE are utilized: the inference engine, the truth maintenance system, and the object system. These components comprise most of the software required by an expert system. i CONCLUSION The ASG is implementing XSAP to create sample plans. XSAP is an iategrated system that interfaces with graphics, ORACLE, and analytical tables. XSAP will take 2 to 4 man-years to develop. The system will provide a considerable cost/benefit savings to ASG. Knowledge acquisition for XSAP is in progress and a prototype is in development. The prototype will be completed in the first quarter of FY91. ACKNOWI_DGMENT The information contained in this article was developed during the course of work done under Contract No. DE-AC09-89SR18035 with the U. S. Department of Energy. R_'ERENCES 1. G.A. Agha. ACTORS: A Model of Concurrent Computation in Distributed Systems. MIT Press, Cambridge MA, (1986). 2. ICP. Berkbigler, G.J. Papcun, N.L. Marusak, J.E. Hutson. _Applying Expertise to Data in the Geologist's Expert System ". Proceedings of the. Conference on Artificial Intelligence in the Department of Energy Complex, '89, Los Alamos, NM, p5-95. 3. T2. Bridge and M.H. Williams. _Expert Systems Design in High-performance Liquid Chromatography". Analytical Proceedings, February 1988, Vol.25, p43-44. 4. S.D. Brown, T,Q. Barker, R_I. Larivee, S.L. Monfre, H.R. Wilk. _Chemometrics". Analytical Chemistry, 60, p252 (1988). 5. W.G. De Ruig, G. Dijkstra, R.W. Stephany. "Chemometric Criteria for Assessing the Certainty of Qualitative Analytical Methods _. Analytica Chimica Acta, 223, p277-282 (1989). 6. G.A. Finn. "Rules of Thumb for Implementing Expert Systems in Engineering _. InTech, Vol. 4, No. 4 (1987). 7. I. Grief, C. Hewitt. "Actor Semantics of PLANNER-73". _ Conference Record of the Second ACM Symposium on Principles of Programming Languages, Palo Alto CA, p67-86, (1975). 8. J.M. Hushon. _Expert Systems in the Environmental Lab _. Environmental Lab, Feb/Mar, pl6, (1990). 9. T.A.H.M. Janse, G. Kateman. _Enhancement of Performance of Analytical Laboratories". Analytica Chimica Aeta, 150, p219 (1983). 10. S.R. Jordan, L.E. Hopper, R.C. Driver, L.F. Arrowood. "Bringing Knowledge-based Systems to a Large Computing Organization _. Proceedings of the Conference on Artificial Intelligence in the Department of Energy Complex, Alken SC, (1988). 11. J. K]aessens, G. Kateman, _Problem Solving by Expert Systems in Analytical Chemistry". Atmlyticsche Chemie, Vol. 326, No. 3 (1987). 12. tCJ. Lindsay. '_Expert Systems in the CIM Environment _. Manufacturing Technology International, (1987). 13. C. Liteanu, I.Rica. _LTtilization of the Amount of Information in Evaluation of Analytical Methods". Analytical Chemistry, Vol. 51, No. 12 (1979). 14. C. Loehle, R.E. Osteen. "IMPACT: An Expert System for Environmental Impact Assessment", Proceedings of the Conference on Artificial Intelligence in the Department of Energy Complex,, Aiken SC, (1988). 15. G.F. Luger, W.A. Stubblefield. Artificial Intelligence and the Design of Expert Systems. The Benjamin/Cummings Publishing Co., Redwood City CA, (1989). 16. M.J. Manthey. "An Operator Semantics for the Actor Model". University of New Mexico Technical Report, CSS85-9, (1985). 17. J. Melaragno, M.IL Allen. "A Plan for the Application of Artificial Intelligence to DoD Logistics _. Report PL816R1, (1989). 18. F.A. Settle. _he Application of Expert Systems in the General Chemistry Laboratory". Journal of Chemical Education, Vol. 64, No. 4 (1987). 19. FA. Settle, M_ Pleva. _rhe Expert System: A teel for the Analytical Chemist". American Laboratory, 20, p64-78 (1988). 20. F_A.Settle, M. Pleva, C. Booker, H. Iams, D. McClintock, T. Moore. "An Information System for Selecting Methods of Chemical Analysis". American Laboratory, Vol. 19, No. 4, (1987). 21. A. Sherwood. _Workstations The Emerging Alternative for AF. PCA/, July/August, (1990). 22. D.M. Smith. _Work Load Model _. Prodeedings of the Conference on Artificial Intelligence in the Department of Energy Complex, Los Alamos NM, p4-17, (1989). 23. G.L. Steele. Common LISP The Language. 2hd Edition, Digital Press, Bedford MA, 1990. 24. /LP. Wade, S.R. Crouch, D. Betteridge. _Development of Microcomputer.based Expert Systems for Analytical Chemists _. Trends in Analytical Chemistry, Vol. 7, No. 10, (1988). 25. A.P. Wade, S.R. Crouch. "Intelligent Automation: Looking toward the 1990's". Spectroscopy, Vol. 3, No. 10, (1984). 26. C.M Wong, S. Lanning. "Artificial intelligence in Chemical Analysis". Energy and Technology Review, Lawrence Livermore National Laboratory, (1984). { l,,,ll : = l_fltl -_,-_ tliii ,-- z Illlilll T < ' (dj_j VS " ,.,.-,'_ ,y. Iii -= liq _" fulfill .T. ° 'li'") _ -¢j _- II II I I ,,,,,, Z _ 00Lh i ___ II I _ III _ , , II ___ II _ tPllltll r_ 7- IlUl III I 'ld_ "_ | 6 \ fUlfil I "r.C ! i • i