14
hlicrocompurers in Civil Engineering 7 ( 1992) 15-28 A Knowledge-Based Structural Analysis Based on an Object-Oriented Approach Shoichi Nakai, Hiroshi Katukura, Manabu Ebihara, Katsuyuki Niimi, Keiichi Hirose Ohsaki Research Institute of Shimizu Corporation, 1-2-3, Shibaura, Minato-ku, Tokyo 105-07, japan & Nobuo Fukuwa Department of Architecture, Faculty of Engineering, Nagoya University, Furo-cho, Chikusa-ku, Nagoya 464-01, lapan Abstract: Analysis is one of the key issues in realizing complex large structures. In spite of the tremendous accumulation of methods and theories in the field of structural analysis, there is still a need to include newly developed methodologies into analysis codes for production use. This paper describes the initial development of a platform to accommodate the future needs in this area. The system being developed is a knowledge-based system which first accepts the user’s description of an analysis problem, comes up with a suitable analysis method and a corresponding computational algorithm, then develops a program along with input data to solve the problem, and finally gives a result to the user. Program generation is done by selecting appropriate building-block codes from a program database. To construct a prototype system, a problem solving model called an organizational model’ is introduced, which is developed to imitate the problem solving in a real life. The main part of the system, which functions as described above, is written in CLOS (common LISP Object System), while generated codes are written in either FORTRAN or C+ +. The performance of the prototype system shows that this approach can be effective. 1 INTRODUCTION Due to the rapid progress in the development of computers during the past few decades, it has become possible to design huge and complex structures. For example, there are a number of activities going on to realize large space structures. One example of a large space structure is the space station Freedom (Fig. 1). A major requirement for an effective approach to design and construction of structures in space includes, among others, the verification of the design of light weight, flexible space structures that cannot be tested on the ground due to microgravity operations. The design for minimum weight, low damping and greater flexibility leads to another key issue : developing the capability to control the modes of vibration. This provides the motivation for the integration of structure system design and control system design, in which the main interest is to obtain an optimal total system rather than inde- pendently optimized subsystems. The integrated design for dynamics and control of a large space structure requires solutions to several problems :4 the development of a reasonably accurate structural model ; 0 the quantification of system uncertainties and external (input and measurement) disturbances ; 0 the specification of desired system performance ; 0 the design of the control system. Similar requirements need to be considered when super high rise buildings are designed. When considering the above-mentioned circumstances surrounding the design of complex large structures, it is possible to conclude that analysis is one of the key issues of realizing these structures. Although the field of structural analysis is vast and highly developed, there are several areas still left for future research. For example, general-purpose analysis codes are frequently used by 15 Microcotnputers in Civil Engineering 0885-9507/92/.$05.00 Q 1992 Elsevier Science Publishers Ltd

A Knowledge-Based Structural Analysis Based on an Object-Oriented Approach

Embed Size (px)

Citation preview

hlicrocompurers in Civil Engineering 7 ( 1992) 15-28

A Knowledge-Based Structural Analysis Based on an Object-Oriented Approach

Shoichi Nakai, Hiroshi Katukura, Manabu Ebihara, Katsuyuki Niimi, Keiichi Hirose Ohsaki Research Institute of Shimizu Corporation, 1-2-3, Shibaura, Minato-ku, Tokyo 105-07, japan

& Nobuo Fukuwa

Department of Architecture, Faculty of Engineering, Nagoya University, Furo-cho, Chikusa-ku, Nagoya 464-01, lapan

Abstract: Analysis is one of the key issues in realizing complex large structures. In spite of the tremendous accumulation of methods and theories in the field of structural analysis, there is still a need to include newly developed methodologies into analysis codes for production use. This paper describes the initial development of a platform to accommodate the future needs in this area. The system being developed is a knowledge-based system which first accepts the user’s description of an analysis problem, comes up with a suitable analysis method and a corresponding computational algorithm, then develops a program along with input data to solve the problem, and finally gives a result to the user. Program generation is done by selecting appropriate building-block codes from a program database. To construct a prototype system, a problem solving model called an ’ organizational model’ is introduced, which is developed to imitate the problem solving in a real life. The main part of the system, which functions as described above, is written in CLOS (common LISP Object System), while generated codes are written in either FORTRAN or C+ +. The performance of the prototype system shows that this approach can be effective.

1 INTRODUCTION

Due to the rapid progress in the development of computers during the past few decades, it has become possible to design huge and complex structures. For example, there are a number of activities going on to

realize large space structures. One example of a large space structure is the space station Freedom (Fig. 1). A major requirement for an effective approach to design and construction of structures in space includes, among others, the verification of the design of light weight, flexible space structures that cannot be tested on the ground due to microgravity operations. The design for minimum weight, low damping and greater flexibility leads to another key issue : developing the capability to control the modes of vibration. This provides the motivation for the integration of structure system design and control system design, in which the main interest is to obtain an optimal total system rather than inde- pendently optimized subsystems. The integrated design for dynamics and control of a large space structure requires solutions to several problems :4

the development of a reasonably accurate structural model ;

0 the quantification of system uncertainties and external (input and measurement) disturbances ;

0 the specification of desired system performance ; 0 the design of the control system.

Similar requirements need to be considered when super high rise buildings are designed.

When considering the above-mentioned circumstances surrounding the design of complex large structures, it is possible to conclude that analysis is one of the key issues of realizing these structures. Although the field of structural analysis is vast and highly developed, there are several areas still left for future research. For example, general-purpose analysis codes are frequently used by

15 Microcotnputers in Civil Engineering 0885-9507/92/.$05.00 Q 1992 Elsevier Science Publishers Ltd

16 Shnichi Nakai et al.

Fig. 1. Complex large structure.

designers of complex structures. However, they often encounter situations in which these codes lack the state- of-the-art functionality. This implies that researchers have to write analysis programs by themselves, since a true all-purpose code is not available. With existing codes, it may also be difficult to come up with an appropriate solution method or a combination of suitable methods since the design requires many different kinds of complicated analyses.

This paper describes the initial development of a platform to accommodate the future needs in this area. The system being developed is a knowledge-based system which first accepts the user's description of an analysis problem, comes up with a suitable analysis method and a corresponding computational algorithm, then develops a program along with input data to solve the problem,- and finally gives a result to the user. This is the description of the system from the viewpoint of the designers of complex large structures. The system has yet another aspect: it allows researchers to implement .the state-of-the-art functionalities based on their own research work. This implementation is expected to be easily done because it does not require detailed knowl- edge of the rest of the system.

The rest of this paper is organized as follows: the following section reviews the general approaches adopted in this work. The section on the organizational model describes a problem solving framework we propose. Following this is a section giving a detailed explanation of a prototype implementation. The final section con- cludes the papers.

2 AN APPROACH TO PROBLEM SOLVING

2.1 Knowledge-based expert system

In the past decade, the potential of artificial intelligence (AI) techniques for providing assistance in the solution of engineering problems has been recognized. Many researchers are developing programs that borrow A1 concepts to automate common engineering . analyses. With SACON' being one of the earliest systems that dealt with the structural modeling problem, there have been a number of attempts to build structural analysis assistants.", la. 23* *' All of these were intended to be used by designers rather than researchers. There are also AI- based approaches to numerical analysis from. the researchers' viewpoint,2. '* l3 but these either cannot accept existing programs without extensive revisions, or were not intended to share existing codes.

The above-mentioned work indicates that a knowl- edge-based approach can be used within engineering software to provide a more natural and flexible method of performing structural analysis than is possible with existing algorithmic approaches.

Programming can be thought of as a special kind of design process which consists of three major steps: formulation, synthesis and evaluation. Among these, it has already been proved that a knowledge-based approach is successfully applied to the synthesis phase of the design process.18 In the present work, the same method is adopted as an approach to program syn- thesis.21*22 This means that either the resulting system or the user (the researcher) chooses appropriate building blocks from a database in order to construct a complete

Structural analysis based on object-oriented approach 17

analysis program. The choice of building blocks is either based on knowledge stored in a knowledge base or on the user’s preference.

2.2 Object-oriented approach

It is easily understood that a computer program that performs the task mentioned above involves elements of great complexity. This complexity seems to be an essential property of all large software systems, or often called industrial-strength software. It is pointed out that this inherent complexity derives from four elements :’

0 the complexity of the problem domain; 0 the difficulty of managing the development process; 0 the flexibility possible through software; 0 the problem of characterizing the behavior of

It is well admitted that when designing a complex software system, it is essential to decompose it into smaller parts, each of which we may then refine independently. The topdown structured design based on algorithmic decomposition has been widely used to achieve this goal. However, there is an emerging alternative, in which we view the world as a set of autonomous agents, or objects, that collaborate to perform some higher level behavior. Since this type of decomposition is based on objects and not algorithms, it is called an object-oriented decomposition. It has been confirmed that the object-oriented approach is well suited to represent knowledge in a knowledge-based system2’* 26 or to perform numerical comp~ta t ion .~

To implement the concept of knowledge-based struc- tural analysis, described in Section 2.1, we adopt this approach.

discrete systems.

3 ORGANIZATIONAL MODEL

To construct a knowledge-based expert system, which functions as described in Section 2, the authors propose a problem solving model called an ‘organizational model’. Figure 2 illustrates how a task is processed in this model. This is to simulate the problem solving in the real world. In the solution of real world problems, it is quite clear

that many very large tasks are beyond the ability of individuals to achieve. Their accomplishment requires many people working together in an organized fashion. For example, consider a research institute. The way a project is processed may vary from institution to institution, but a typical procedure might be as follows:

1. A boss finds or receives a job that has to be done. 2. The boss examines the characteristics of the job and

3.

4.

Fig. 2. Organizational model.

identifies a manager or several managers who can best deal with that job. Each manager who is asked to deal with the job organizes a project team consisting of specialists in domains associated with the job. Each specialist, who is a member of a project team, is assigned a part of the job and solves it on the basis of his own knowledge while interacting with his manager and his colleagues and consulting appropriate literature.

There are several noteworthy points in this procedure. First, a complex problem (goal) is decomposed into smaller subproblems (subgoals). Each subproblem may be further decomposed into even smaller ones. This subproblem decomposition continues until a solution to each decomposed problem is obtained without difficulty. Thus, we get a hierarchical representation of the original problem. The second point is that a group of people work to solve one problem in a cooperative manner. Basically, each member in a group is responsible for.an assigned job, but they communicate with each other by sending messages at need so that the solution process of a given job is headed in the right direction. Third, the whole solution process consists of two parts: problem solving and the knowledge base. This corresponds to the inference engine and the knowledge base, which con- stitute usual expert systems. Thus, the problem of the cooperation of a number of

intelligent agents in producing an agreed output is considered in this model. We can assume that the agents are experts in different areas of specialization, but that the final goal can only be achieved by contributions from all agents. This type of problem solving model is studied

2-2

18 Shoichi Nukui et al.

as an abstraction from common situations among human societies and is known as distributed artificial intelligence (DAI).1z*15 Ideas from DAI are becoming important to research in fields such as distributed and parallel computing, human-computer interaction, computer sup- ported cooperative work and computer-aided engin- eering. In this study, the cooperation of specialists with distributed knowledge is examined in the context of knowledge-based structural analysis.

4 KNOWLEDGE-BASED STRUCTURAL ANALYSIS

4.1 Overview

To perform knowledge-based structural analysis, a system which consists of several modules, as shown in Fig. 3, is considered.

The function of the interface module is to accept a problem description from the user and to interact with the rest of the system in order to analyze the problem or augment the capability of the system. An introduction of visual graphics to this module would be ideal, but it is a matter of the computer configuration available. The input information is passed to the expert system module to obtain a solution to the problem.

The main part of the system is a knowledge-based, expert system module. It performs the following func- tions :

parse the input information ; interpret the characteristics of the problem ; determine the type of analysis ; select a solution method; create a solution algorithm or incorporate a user- defined algorithm; . .

Fig. 3. Knowledge-based system.

generate the analysis code; generate input data to the code; augment/enhance the knowledge/databases.

This last step is done by consulting the knowledge base and the database, which contain information on analysis methods in terms of structural design and vibration control. The database also holds a host of procedures prepared for numerical computation. A learning feature can be added to the system so that it constantly enhances the knowledge base.

The generated program code is passed on to the processor module along with the arranged input data. This module can be a combination of an operating system and language compiler, which compiles and executes the program and passes the result on to the rest of the system.

4.2 Representation of knowledge on structural analysis

Each module is based on a vast amount of knowledge. Knowledge-based systems deal with the processing of knowledge. To process knowledge, there must first exist ways to represent this knowledge and methods to control its processing. Before knowledge can be represented in structural analysis, the type of knowledge involved must be identified and classified. Structural analysis knowledge is embodied in many places, for example, mathematics, applied mechanics, standards, and experience from previous tasks. Although a variety of classification schemes can be adopted,8 the authors use the following categorization : ‘static’ and ‘dynamic’ knowledge (Fig. 4).

Static knowledge consists of definitions, axioms and laws. These may be a priori or the result of scientific investigation. The word dynamic refers to heuristics, which-is related to the process of search or to knowledge based on experience. That is, dynamic knowledge is not deducible from any axiom, rather it is generally gained from experience. We can also describe dynamic knowl- edge as ‘shallow’, meaning that it cannot provide us with explanations of why certain decisions should be made. Static knowledge is ‘deep’ in that it is deduced from fundamentals. For example, in our domain,

to perform a dynamic response analysis in the frequency domain, complex-valued stiffness has to be used to model a structure with frequency-dependent properties

a long-spanned structure composed of trusses can be modeled by a single beam f t h e length is suficiently long compared to its depth

can be categorized as dynamic knowledge. To integrate all the knowledge into a computer system,

one needs a way to represent that knowledge so that it

is static knowledge, and

Structural analysis based on object-oriented approach 19

Heuristic Knowlege Shallow Knowlege Production System

Engineering Analysis w Englneering Judgement

ldentkation of Problem and Modelling 1

Knowhe Frame-Based System

Systematlc Prevlous Knowlege

Selection ot Analyrls Method 1

Fig. 4. Static and dynamic knowledge.

can be used in a systematic way. There are several approaches for declarative representation of knowledge that are available in the A1 literature," the following two, among others, being the major ones:'

0 rule-based or production system; frames consisting of generic data structures in

A production system is a collection of rules and is believed to be good at describing heuristic (in our terminology, dynamic) knowledge. A frame system, on the other hand, is suitable for a complex and rich representation of knowledge, such as fundamental principles (categorized as static knowledge). Thus, it seems a good idea to utilize both representations to solve general problems.

Here, we must identify what kind of knowledge is involved in structural analysis. Broadly speaking, struc- tural analysis is described as a three-stage process involving :

predefined information categories.

modeling 0 solution

evaluation

Although the components of an analysis problem vary, depending on the nature of the particular domain, the modeling stage usually consists of the following substeps :

0 interpretation of a problem; 0 identification of a problem; 0 selection of a mathematical model.

Once a mathematical model to be used in the analysis is determined, a solution is obtained by applying an appropriate method. This solution stage involves :

0 selection of an analysis method and algorithm; 0 generation of an analysis program code; 0 generation of input data; 0 execution of the program.

After the solution comes the evaluation of the obtained results based on the visualized outputs. Figure 5 summarizes the steps involved in the structural analysis. Only a few steps shown in this figure have been implemented in this work.

Let us look into a little more detail. When performing structural analysis, there must exist a description of the problem. Starting from this description we first try to identify what kind of mathematical problem it implies. This corresponds to a mapping from a description of the problem to a mathematical problem domain. Here, this problem domain is well established in a mathematical or analytical way, but the mapping itself is sometimes based

. on experience. Once the problem description is mapped on to the mathematical problem domain, it becomes

Method and Algorilhm Selection

Analysis Program Generation

Input Data Generation

Problem Interpretation

Problem Identification

Output Visualization

Evaluation of Results Program Execution Model Selection

I I I

Fig. 5. Flow of structural analysis.

20 Shoichi Nakai et al.

Domain

Fig. 6. Object-oriented decomposition of structural analysis.

(linear, nonlinear) (geometrical nonlinear, material nonlinear}

(design, control} (large size, small size)

(time domain, frequency domain} (eigen analysis, filter effect}

Fig. 7. Problem definition.

possible to develop an analysis method and its solution algorithm. A set of analysis methods and algorithms is again a well-established kind of knowledge, while the mapping between these domains includes dynamic knowledge. A similar relationship also holds when considering a mapping from the mathematical problem domain to the modeling space (Fig. 6 ) .

In the present study, the main target is the dynamic analysis of complex large structures. Figure 7 lists the items which constitute the problem domain, while Figs 8 and 9 show the network representations of the analysis methods and algorithms, respectively. As can be seen in Figs 8 and 9, static knowledge is often represented by a network, since this type of knowledge is usually well struct ured.

It is assumed in Fig. 8 that a so-called substructure method forms the basis of all kinds of structural analysis, i.e. each substructure is eventually assembled as a super- element into a main structure. It is interesting to know that most of the existing analysis methods can be included by a relatively simple representation, as shown in Fig. 8. On the other hand, the number of algorithms which implement the analysis methods is enormous. Figure 9 gives only a part of such algorithms. Aug- menting this knowledge leads to the increase in flexibility of the system.

u Fig. 8. Structural analysis methods.

Structural analysis based on object-oriented approach 21

Fig. 9. Algorithms for structural analysis.

4.3 Implementation of the organizational model

As a first step towards the actual system for practical use, a prototype system has been implemented. Targeted here is a structural analysis of complex large structures. The current goals are to derive a set of procedures, on the basis of which an actual analysis is performed, and then to perform a numerical computation by generating a code. In the system, a model object is created in such a way that the whole structure is first decomposed into a number of substructures. These substructures are then combined to complete the solution. The linear finite element method was chosen for the analysis.

As described earlier, the combination of subproblem decomposition, cooperative problem solving, and the separation between knowledge and problem solving forms the organizational model. This model is well supported by the object-oriented programming concept, in which a computer program consists of a number of independent objects that process jobs by exchanging information they need via messages. To apply object- oriented program development, data representations for the organizational model must be specified. There are

three steps in the program :In

Solver 0 development of an object-oriented

1. Selection of classes. 2. Specification of the classes. 3. Implementation of the classes.

Here, the word ’class’ refers to a description of a set of similar objects; one member object in a class is called an ‘ instance’.

According to the organizational model, two fun- damental classes which compose the model are selected : ‘Agent’ and ‘Task’. Class Agent specifies the boss- manager-specialist part of the organizational model, while class task is responsible for storing static knowl- edge.

4.3.1 Class Agent Class Agent represents members of an organization and defines appropriate behavior when asked to solve a problem of its domain. In this class, the following data are defined:

22 Shaichi Nukai c t nl.

Fig. 10. Message se

0 rules consisting of dynamic knowledge to solve

0 a working memory (WM) which holds the current

0 a goal which must be satisfied when the problem is

problems of a particular domain;

context of a given problem;

solved.

Methods associated with Class Agent are

0 Get-Solution for initiating the solution process

0 Store-Rules and Initialize-WM for setting up. inside the agent;

Syntax of the interface to an agent's rules is:

(rulename conditioo-1 condition-2 ...

* consequence- 1 consequence-2 ...

1 in which condition-n is a condition clause to be met, and consequence-n is a resulting element, which is placed in a working memory as a result of rule firing. These rules stored in the objects of class agent serve as dynamic knowledge to guide the search of solutions to assigned goals. Thus, Class Agent is an object in which a rule interpreter is embodied.

Each agent has problem-solving knowledge specific only to a particular area. It gives requests for solving part of its problem to other agents, or sends messages to tasks, which are described later, to collect static

inding among objects.

knowledge. In the prototype system, specialists are implemented as instances of class agent, while a boss is implemented by using OPS5." A working memory of OPSS serves as a blackboard of a blackboard model.' Figure 10 shows the message sending among these objects. In this sense, the prototype system can be thought of as a primitive implementation of cooperative problem

4.3.2 Class Task Class Task represents a goal tree and is used to implement a static knowledge base represented as trees. Normally, a goal tree describes a situation in which a goal can be satisfied by solving smaller subgoals. The process of performing-a task has a goal which can represent a functional selection or can be further decomposed into a set of subgoals. This process forms a goal hierarchy. A synthesis of feasible solutions is implemented as a search for solutions to all of the relevant goals. Class Task consists of three subclasses : Decomposition Task, Selec- tion Task and Computation Task.

Class Decomposition Task represents a subgoal de- composition and defines a group of subgoals. Performing a decomposition task means that a goal is satisfied by solving those subgoals. The syntax for defining an instance of a Class Decomposition Task is:

task taskname decomposition subtask 1 subtask2

end- task ...

Structural analysis based on object-oriented approach 23

Class Selection Task represents value assignment and defines a collection of possible choices. An instance can be created by specifying :

task taskname selection alternative 1 alterna tive2 ...

end- task

A node represented by this class is basically an 'and' node. Rules can be placed in a decomposition task so that it represents an 'or' node.

Class Computation Task represents a task which involves some computations and defines a function which is called to assign a value. A name of the external function is given when an instance is created:

task taskname computation

end- task

To extract necessary information from the knowledge base built with a pile of tasks, a message is passed to one of those tasks, which then passes messages to other tasks to complete the solution. Message passing propagates until all the relevant information is gathered. This results in a task tree, and this kind of information tree is formed dynamically whenever a message is passed to a task, as shown in Fig. 11.

Task-based problem solving is basically a search in a problem space. The search space can be minimized if constraints and preconditions are given. Incompatible conditions are provided as constraints so that the system does not choose these combinations as solutions. Requirements for the particular problem at hand can also be specified as an initial condition (precondition). These two concepts are also supported in the system.

The functionality and behavior of Class Task are fundamentally based on a program called EDESYN,lS

functionname

Task message

which helps engineering design by synthesizing the problem into manageable subproblems, and was used in the previous work.21

The static knowledge, which consists of the fun- damental principles of applied mechanics, is collected and rearranged so as to fit the task's hierarchical representation. What is aimed to be implemented in a prototype system covers:

0 time-integration and frequency response methods ; 0 finite element methods; 0 transfer matrix methods with finite elements or

substructure methods based on dynamic conden-

0 eigenanalysis methods; linear equation solvers;

0 iterative schemes; FFT (Fast Fourier Transform) techniques.

analytical solution elements ;

sation;

4.4 Program generation

Once the system chooses an appropriate analysis method and algorithm, then the next task is to generate a complete numerical computation program which imple- ments them. This is done by selecting subroutines which best fit the problem under consideration. These building block subroutines are stored in a program database beforehand. Figure 12 illustrates the way a program is generated.

One of the key issues to be addressed is the way how building block codes for program generation are organ- ized into a well formed database so that i t is easy to maintain. To this end, the concept of object-oriented programming is utilized again.

In the prototype system, two languages are used to

Fig. 11. Task tree.

O b j d o d u l c

Fig. 12. Program generation.

24

COND (PRECONDITION/DIMENSION 3D) AND COND (DATA-PARSING/PROBLEM-TYPE DYNAMIC-LINEAR) THEN

double complex ELSTIF (N, N)

COND ELSE

double precision ELSTIF(N,N)

COND END

Slioichi Nukui et al.

4 Subroutine Cluster a subroutine CLSXXX

dimension ARRAY1 ( S I Z E 1 ) , . . . integer I N T 1 , I N T 2 , ... real REALl, REAL2, . . . entry PROCl (some operation on internal data) return

entry P-2 (another operation on internal data) return

I ...

end

Fig. 13. Subroutine cluster.

implement numerical computation : FORTRAN and C+ +. FORTRAN has been chosen because there is a tremendous amount of existing engineering codes and also because it is the only language fully supported on supercomputers. However, to take full advantage of object-oriented programming and since FORTRAN does not support the concept of it, C+ + has also been selected as an alternative.

4.4.1 FORTRAN program generation Historically, FORTRAN has been used extensively for numerical computations. This situation is unlikely to change drastically since so much work has accumulated

around this language. Unfortunately, however, FORTRAN does not support such powerful features as data abstraction, class hierarchy and inheritance, which current object-oriented languages provide.

Yet FORTRAN does have a data hiding capability to some extent. To take advantage of this feature, FORTRAN ENTRY statements are used extensively. A collection of data of the same class is stored in a single subroutine which has all the functions needed to manipulate those data by partitioning it with different ENTRY statements, as shown in Fig. 13. Here, we call this a subroutine 'cluster'. A similar idea is given by Ref. 20. By using subroutine clusters, data encapsulation is achieved to some extent.

Analysis programs are divided into subroutine clusters and stored in a number of files. The system selects appropriate subroutine clusters and makes modifications to them on the basis of the characteristics of the problem being solved. In order to do this, directives are embedded in the source code files. The directive interpreter is implemented in the program generator. Figure 14 illustrates how these directives are used. The detailed explanation of the directives and their interpreter can be found elsewhere.8*

4.4.2 C+ + program generation As mentioned earlier, i t is widely believed that reusability of a code is the key for program development and that object-oriented programming is one of the fields in which reusability can participate effectively in utilizing pro- grams as well as in producing new programs that can be reused in future developments. In Section 4.4. I , one approach has been pursued so that a numerical compu-

Program Generator (Directive Interpreter) 0 v - double complex ELSTIF(N,N)

Fig. 14. Directives for program generator.

Structural analysis based on object-oriented approach 2s

'STRUCTURE'

I initial State ] I Transition State 1 [ Goal State ]

A MESSAGE

I 'Deform( Load

Fig. 15. Transition of internal states.

Fig. 16. Dependencies among objects.

tation program database is constructed in a flexible manner while using FORTRAN. However, since FORTRAN does not support the concept of object- oriented programming, it is not possible to achieve this goal completely. Thus, C+ + has been chosen as an alternative. The reason why this language was selected is because it is becoming widely accepted among a variety of user communities and it is believed that C+ + generates reasonably fast codes.

Everything is represented by an object in the object- oriented approach. In the process of problem solving, an object receives a message from other objects. The object changes its internal state from an initial to a goal one as a result of message interpretation, as shown in Fig. 15.

Structure a / Element Stiffness"

----- + Returnvalue 4- Message

Fig. 17. Message sending for computing element stiffnesses.

Shoichi Nukui et al.

'NODE -- Copy ended SHAPE -- Copy ended Type SELECTION

*+ Solution N I L Task -- Nme. COWILL-ANU-LINX

-- Coapilation s t a r t e d

I listener - 1

Ustener - 1

;Eq(-)@(-)

-- Execution r t a r t e d

*+ Solution N I L Taok -- N U 0 PO-OLN Type SELECTIl

** Allarnatxvss (END) ** AltsmatlVes-SelaCted (EM))

Lxscution ended Type SnLCTION

ru le .<RULE filSb4, f i r e d ( C A L L TASK MIA

rule rn t a rp r s t a r ha l t ed g o d (PO-GZN . END) achieved D O M

irmry

Imr CONDECEDMZRIX i s renovad due t o cons t r a in t t121 ** Alternatives-Selectad (STA?4DE~OUTPUT)

Ta$k -- N a n e AO-ELLYLNT-TYPE we SELECTION ** i d t a rna t ives

Item TRUSS 13 reroved due t o cons t r a in t U128 I t e r ROO is renoved due t o c o n s t r a n t U128 I t d i PLATE 1 5 reroved due t o cons t r a in t r128 Itcr )aWRANCE 11 cerovad due t o cons t r a in t U128 I t e n SHELL 13 removed due t o cons t r a in t r128 I t cn JOINT 1 3 removed due t o conr t r a in t X1ZB Iten KkSS 13 rsnoved due t o cons t r a in t a128

+* Altsrnatives-Selected (BEMI CABLE soLm)n)l

(%n muss ROD PLATE IKEUNCE CABLE SHELL SOLID JOINT WI SS)

Id nterrn cc -c -0 materl.cc C t -c -0 s ~ t r . c c CC -c -0 sr~msys.cc CC -c -0 u e c t o r . c c CC -c -0 -DBERM bcm-elem.cc m ake: Warnrns: loo many r u l e r dcfrned For tarBet tes t .0 CC -c -0 test.cc CC -0 t a r t c1m.o nodc-o rhape.0 s t r u c t . 0 w t x . 0 1itts.o mater1.0 aymmtx.0 t y r y t . 0 v e c t o r . 0 beame1em.o tert.0 -1m

< STRUCTURE > ( NODE C31 1

Selection (Task: MD-AO-ELEMENT-TYPE)

CABLE SOLID

(a)

-- Coapilation ended me SELECTION ** Solution T

Fig. 18. Sample screens :

No. 0 0.000 0.000 -1 -2 -3 1 10.000 0.000 1 2 3 2 10.000 -5.000 4 5 6

( MRTERL C l l ) NO.

( SHRPE Ell ) No.

( ELrn c21 ) No.

0.000000 0.000000 0.000000

-1.372422 -1080.924143 -216.184829

0 beam e l e m e n t e = 12.345000

0 bean c l e m e n t a a l.iB0460 I = 0.03;

0 b a r n r l n e n t E l l - C21 1 hem e l e m e n t CZI - C31

.oooooo 143 -270.231036

'470

0.000000

-1080.92

I

(b)

selection from alternative list; (b) execution of generated C+ + code.

Structural analysis based on object-oriented approach 27

To develop an object-oriented program for structural analysis, several objects are identified and these are abstracted as fundamental classes. These include ‘ Load ’ and ‘Structure’. A structure object, which is an instance of ‘Class Structure’, receives a message ‘Deform’ with a load object as an argument. In the prototype system, the system deals with the finite element method, and a number of objects are developed to implement the method. The basic classes for the finite element method include Element, Node and Global Stiffness. Features which constitute a node include coordinate, displacement and internal nodal forces, while an element consists of such features as shape, material, stress and element stiffness. These features are also defined as classes. Figure 16 shows the dependency relationship among these classes. In this figure, one-directional arrows indicate the so-called ‘ has-a’ relationship. Each class has a number of methods which are executed upon request by sending messages. For example, a message to compute element stiffness propagates as shown in Fig. 17.

The program generation is done in the case of C + + by defining subclasses of Class Structure corresponding to the specific cases for all of the basic classes mentioned above and by selecting an appropriate one on the compilation time. Inheritance mechanism of C + + helps efficient implementation. For example, ‘Class Dynamic Nonlinear Structure ’, which performs dynamic nonlinear analysis, is defined by inheriting from ‘Static Nonlinear Structure’ and ‘Dynamic Linear Structure’, both of which are based on ‘Static Linear Structure’. This inheritance mechanism enables us to extend the system’s capability very easily.

0 Researchers are freed from programming to some extent and can instead concentrate on creating physical models and interpreting results. Researchers can easily update the system to keep up with the latest technology by modifying or adding to the knowledge/databases.

5 CONCLUDING REMARKS

A study has been made on a system which performs knowledge-based structural analysis by the use of the object-oriented knowledge representation. A problem solving model called ‘organizational model ’ was intro- duced to implement the system, in which two principal classes of objects play important roles. ‘Class Agent’ is responsible for heuristic dynamic knowledge, while ‘Class Task’ is used to construct a well-structured static knowledge base. Based on this framework, some of the knowledge on the dynamic structural analysis has been organized.

The present system generates a complete numerical analysis program every time a user gives a problem to the system. This is done by selecting building block codes from the program database, which best fit the problem under consideration. These codes are written in either FORTRAN or C + + and are implemented from the viewpoint of object-oriented programming.

It is concluded from the study on the performance of the prototype system that this approach can be effective. Augmentation of the knowledge base and the program database will be the future work.

4.5 Sample run and discussion ACKNOWLEDGEMENTS

The current prototype system runs on a UNIX work- station. Figure 18 shows a sample run of the system. In this example, a truss structure composed of a number of beams, which is a substructure of the space station shown in Fig. 1, is analyzed for external forces. The solution process begins with an inquiry about the characteristics of the structure. Figure 18(a) shows the user’s selection from an alternative list. It then proceeds to the development of the analysis method by asking the user’s preference among analysis procedures available. Once the system comes up with a combination of an analysis method and its algorithm, it generates an analysis program written in either FORTRAN or C + + , which is then executed to obtain numerical results. Figure 18(b) shows numerical results given by a generated C + + code.

There are several advantages of the approach de- scribed in this paper over the conventional program development and analysis :

The authors wish to thank Professor Steven J. Fenves of Carnegie Mellon University, Dr Mary Lou Maher of the University of Sydney and Professor Takeru Igusa of Northwestern University for their instructive comments and suggestions. The authors would also like to thank Professors K. C. Park and Charbel Farhat of the University of Colorado for their valuable data on the space station Freedom.

REFERENCES

1.

2.

Adeli, H. (ed.), Expert Systems in Construction and Structural Engineering, Chapman and Hall, New York, 1988, p. 14. Baugh, J. W., Jr. & Rehak, D. R., FOOBAR: an artificial intelligence based finite element system. In Knowledge Based Expert Systems for Engineering : Classification, Education, and Control, eds D. Sriram & R. A. Adey, 1987.

Shoichi Nakai et al. 28

3. Baugh, J. W., Jr. & Rehak, D. R., Computational Ab- stractions for Finite Element Programming. Technical report R-89- 182, Carnegie Mellon University, Pittsburgh, USA, 1989.

4. Beneroya, H. & Nagurka, M. L. Space structures: issues in dynamics and control. J. Aerospace Eng., ASCE, 3 (4)

5. Bennet. J. et al., SACON: A Knowledge-based Consultant for Structural Analysis. Technical report STAN-CS-78- 699, Stanford Heuristic Programming Project, Stanford, USA, 1978.

6. Booch, G., Object-Oriented Design with Applications, Benjamin/Cummings, Redwood City, USA, 1991, pp. 4-6.

7. Cloarec, J.-F., Cudelou, J.-F. & Collet, J. , A configurer for switching system software based on the knowledge about the assembling of program modules. In Knowledge Engin- eering in Computer-Aided Design, ed. J. S . Gero, Elsevier, Amsterdam, Netherlands, 1985, pp. 375-88.

8. Coyne, R. D., Roserman, M. A., Radford, A. D., Barachandran, M. & Gero, J. S., Knowledge-Based Design Systems, Addison Wesley, London, 1990, pp. 136-46.

9. Engelmore, R. & Morgan, T. (eds), Blackboard Systems. Addison Wesley, London, 1988, p. 1.

10. Fenves, G. L., Object-oriented programming for engin- eering software development. Engineering with Computers,

11. Fenves, S. J., A framework for cooperative development of a finite element modeling assistant. In Reliability of Methods for Engineering Analysis, eds K. J. Bathe & D. R. J. Owen, Pineridge Press, Swansea, UK, 1986,

12. Filman, R. E. & Friedman, D. P., Coordinated Processing, McGraw-Hill, New York, 1984, p. 1.

13. Forde, B. W. R. & Stiemer, S. F., Knowledge-based con- trol for finite element analysis. Engineering with Computers, 5 (3/4) (1989) 195-204.

14. Forgy, C. L., OPSJ User’s Manual, CMU-CS-81-135, Carnegie Mellon University, Pittsburgh, USA, 198 I .

15. Gasser, L. & Huhns, M. N., Distributed Artificial In- telligence, Vol. 11, Pitman, London, UK, 1989, p. vii.

16. Gregory, B. L. & Shephard, M. S., Design of a Knowledge

( I 990) 25 1-70.

6 (1990) 1-15.

475-86.

based system to convert airframe geometric models to structural models. In E.rpert Systems in Civil Engineering, eds C. N. Kostem & M. L. Maher, ASCE. New York, USA, 1986.

17. Hayes-Roth, F., Waterman, D. R. & Lerat, D. B., (eds), Building Expert Systems, Addison Wesley. London, 1983,

18. Maher, M. L., HI-RISE: A Knowledge-Based Expert System for the Preliminary Structural Design of High Rise Buildings. PhD Thesis, Department of Civil Engineering, Carnegie Mellon University, Pittsburgh, USA, 1984.

19, Maher, M. L., Engineering design synthesis: a domain independent representation. Artificial Intelligence for Engineering Design, Analysis and Manufacturing (A1

20. Meyer, B., Object-orientedSoftware Construction, Prentice- Hall, Englewood Cliffs, NJ, 1988.

21. Nakai, S.. A Knowledge-Based Approach to Engineering Program Synthesis. Research report R-89- 183, Depart- ment of Civil Engineering, Carnegie Mellon University, Pittsburgh, USA, 1989.

22. Nakai, S. et al., A knowledge-based approach to the structural analysis of large space structures. Proc. 32nd Structures. Structural Dynamics and Materials ( S D M) ConJ, Part I , 1991, pp. 627-35.

23. Reynier, M., Interactions between structural analysis, knowhow and chain of reasoning used by the CARTER expert system for dimensioning. In Reliability oJ Methods for Engineering Analysis, eds K. J. Bathe & D. R. J. Owen, Pineridge Press, Swansea, UK, 1986.

24. Taig, I. C., Expert aids to finite element system application. In Applications of Artificial Intelligence to Engineering Problems, eds D . Sriram & R. Adey, Springer-Verlag. Berlin, 1986, pp. 759-70.

25. Yokoyama, T. & Sazuka, H., A constraint-based object- oriented knowledge representation system. Trans. InJor- mation Processing Society of Japan, (IPSJ), 31 ( I ) (1990) 68-75 (in Japanese).

26. Zanconato, R., BLOBS-an object-oriented blackboard system. In Blackboard Systems, eds R. Engelmore & T. Morgan, Addison Wesley, London, 1988, pp. 335-45.

pp. 3-29.

EDAM). 1 (3) (1987) 207-13.