Inference Engine
The Jess is used as inference engine during the
development of this system. Jess is an expert system
development tool which is written out by Sun's Java
language. Jess supports the development of the expert
system based rules [6].And it belongs to the open source
software.
Now, Jess 6.1 can compatible with all versions of
Java language, especially Java1.2 including the Java
Development Kit 1.4. Jess is a program library and the
library itself is written by Java. The languages which are
defined separately by Jess system and CLIPS expert
system are very similar. Both of them are one form of
LISP. There are two main ways to use the Jess. One is
extending Jess by Java; the other is calling the Jess’ class
library by Java.
E. Software designing based on UML
The UML is a visual standard modeling language
which is object-oriented. UML uses graphic symbols to
express the objects and their relations of the system and
describes the developing system from different
perspectives [6]. The modeling process of UML has
main steps as follow:
(1) The establishment of the demand model: That
is setting up use case model from functional
requirements and obtaining the function of the system.
(2) The establishment of the object model: The
object model include the static model and the dynamic
model .Static model uses class diagram, object diagram
and package diagram to describe the system objects and
the static relations between them to obtain the overall
structure of the system. Dynamic model uses state
diagram, activity diagram, sequence diagram and
collaboration diagram to describe the status of the object
and the conversion conditions between them and the
interactive relationship between each object [7]. (3) The
establishment of the system implementation model: The
configuration diagram can define the framework and
communication mechanism of the system and show the
cooperative relationship between software and hardware
system. The component diagram can describe the system
is composed by which components.
(4) Checking the consistency between models.
Usually this process needs to be repeated many times in
order to describe the whole system.
(5) The generation of the code framework of
development language based on component diagram.
The main features of UML can be summarized as
follows: (1) unified standard; (2) object-oriented; (3)
visualization. UML has powerful expression ability; (4)
process-independent; (5) clear concept. The method of
modeling is simple. The graphic structure is clear and it’s
easier to master and use. The following are two typical
UML diagram in the process of system design.
Fig. 2 The class diagram of motor selection expert system
Fig. 3 The sequence diagram of adding facts in motor selection expert
system sv sewing machine
4-1071
The Ninth International Conference on Electronic Measurement & Instruments ICEMI’2009
ConsoleApplet [8] class in Figure 2: It’s user
interface and can be used to identify the action of each
button in system, such as adding a rule, amending rule,
deleting rule and motor selection and so on. The main
function of ConsoleApplet class is identifying the action
which should be performed by system according to
distinguishing different buttons. Controller class: It’s the
main control class in this system. After identifying the
carrying out action by ConsoleApplet class, the system
calls the concrete methods in Controller class. The calls
could be distinguished as operation on the fact or
operation on the rule.
RuleBean and RuleDAO class: They are business
logic layer in the system and are implementing concrete
operation class. The methods in RuleBean class are
called by Controller class, then the methods call
RuleDAO class at the bottom layer. The main methods
of RuleDAO class are both related to database operation.
The SQL statements are executed directly in these
methods and parameters could be obtained from
RuleBean.
RuleValue is entity class. When the rule satisfying
condition is read from the database, the rules and rules
pattern etc. are stored in the object of RuleValue.
The returned value of RuleValue object method is
string which is generated by JessFile class and could be
read by Jess or is generated as .clp temporary files. Then
the value is read by Jess class method, and finally adds
the command of reset, run.Add paragraph text here.