SPARTA II Further Development in An Expert System For Advising On Stocks of Spare Parts.

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

~nternationa~~#~rnu[of Production Economics, 24 ( 1992) 29 l-300 291

Elsevier

SPARTA II: Further development in an expert system


for advising on stocks of spare parts

D. PetroviC and R. PetroviC


Mihajlo Pupin Institute, Belgrade, Yugoslavia

Abstract
This paper is part of a continuous story of SPARTA - an expert system for advising on spare stocks for maintenance
purposes. Using an item approach, SPARTA II suggests the assortment and quantities of both repairable and consumable
parts of electronic systems. The domain of expertise is restricted to the parts for which the exponential distribution of the
times between failures can be assumed. The output of SPARTA II includes: ( 1) the list of recommended stocks of spares,
(2) the calcuiated reliability with and without the spares recommended, (3) suggestions concerning further investment in
spare parts.

1. Introduction

This paper describes new results in the development and application of a logistic expert system for
advising on the stocks of spare parts for maintenance of electronic products and systems. The expert
system, referred to as SPARTA II (standing for Spare Parts Adviser, second prototype), is a rule-based
system consisting of rules which produce stock recommendations for a single stocking point inventory.
SPARTA II is a simple and efficient personal computer application software which uses a standard
programming environment and ARITY/PROLOG. SPARTA II is an improved prototype which has
replaced an incomplete predecessor. It carries the process of advising on the stocks of spares one step
further.
Two main reasons to undertake SPARTA project were: ( 1) the determination of spare parts stock
levels is the task which requires much more than just common sense, (2) there is a large discrimination
between good performance and poor performance in spare stock policy. SPARTA II is conceived and
developed as an expert system of equal importance to manufacturers who keep spares for the purpose
of maintaining their products during warranty period and to organizations which have their own main-
tenance service and therefore allocate budgets for the procurement of spares in addition to repair
facilities.
This paper is organized in the following way. The next section establishes the background which led
to the development of SPARTA model. It discusses the needs to use knowledge and facts, and not only
data, then to combine algorithms and heuristics and to introduce inference processes and symbolic
reasoning in solving the problem of determining the stocks of spares. In the following section the do-
main specific knowledge of SPARTA II, its logical composition and architecture are described. Han-
dling un~e~ainty is the subject of a separate section, which is followed by the implementation part. The
Iearning part of SPARTA II is presented in the Appendix. It is based on the use of Bayes theorem and
formulae derived from it.

2. Genesis

Recent years have seen an increase of interest in the field of spare parts inventories [ 11. This is
attributable to two main factors:

1992 Elsevier Science Publishers B.V.


292

( 1) Even though today’s manufacturers have clearly managed the production and marketing of high-
quality and reliable products and systems, reliability is not an absolute. Failures occur in the most up-
to-date electronic consumer products such as TV sets, recorders, tuners, PCs, in superreliable avio-
electronics, in military electronics systems intended to be perfect, etc. There is no doubt that a good
selection of spare parts located on-site is of importance for proper operation and high availability of
electronic systems.
(2) Data indicating that investment in spares reaches enormous sums can be found in the literature
[ 2 1. The total investment in spare parts sometimes amounts to no more than a few percent of the value
of products and systems to be maintained, but may reach the order of tens of percent. Very large amounts
of money are in question in many cases.
This was an important motive for developing new techniques for determining inventory require-
ments, in order to increase equipment availability or mission readiness goals.
Scanning the spare parts inventory literature one can conclude that there exist long lists of references
covering the theoretical and applied aspects of stock control [ 3 1. A large number of papers are devoted
to optimization of stocks [ 41. Very diverse models are employed in optimization problems treated by
many writers and authorities in the field [ 5 1. All these models lead to conventional software based on
the manipulation of data, algorithms and repetitive processes. The incompleteness, inconsistency, im-
precise terms and uncertainty of data or relations, we always face in real spare parts problems are hard
or impossible to handle by conventional models. To illustrate this, let us say, for example, that the stock
of spares should, of course, be influenced by the possibilities for providing additional spares on the
market, or by the estimate as to whether or not a failed part is easy to repair. Consequently, instead of
using strict algorithms and mathematically attractive optimization methods for determination of stocks,
one should start getting accustomed to heuristics. It seems to us that a combination of strict algorithms
and heuristics, mixed conventional data processing and manipulation of knowledge have particularly
sound perspectives in this regard. Expert system approach does not replace optimization.
For SPARTA, as for expert systems in general, the task itself was at the beginning ill-understood. In
fact, there was so much ill-definition and uncertainty, that the specification could almost be said to
emerge from the project. We started with initial requirement analysis, knowledge elicitation and built
an incomplete, but representative prototype (SPARTA I). Since the computer was modelling the
knowledge, instead of carrying out a procedure, it was by no means certain how useful that model would
be until it was applied in practice. You cannot predict precisely how a particular model of reasoning
will behave, until you have actually tried it out. We ran the prototype and got comments from experts
and users and made further knowledge elicitation because of comments and amended the prototype.
An acceptable SPARTA II system has evolved, unlikely to be finished. It will mature and change by on-
going maintenance and amendment.

3. Domain of expertise

SPARTA II has limited expertise to predict demands for spares using item approach. It can recom-
mend stock of spares for both repairable and consumable items, in two specific cases:
( 1) for a mission specified by the fixed time of duration T,
(2 ) for an infinite time horizon, see Fig. 1.
It is assumed in SPARTA II that the demand for spares of type j, u= 1, . ... J), is a result of random
failures of part j in the systems in operation. The assumption is made that failures are statistically
independent events, exponentially distributed. Failure intensity rate ;1, of part j is obtained from the
reliability handbooks or data bases like PREDICTOR. Catalog data can be changed, i.e., corrected on
the basis of data about actual failures, if these data exist. This is done by applying an algorithmic,
Bayesian type procedure, which is implemented as a special module of SPARTA II, described in
Appendix.
293

Mission - Consumabb & Repairables


(firneT)

Systems
Consumables
replenishment pxiod (Ill

In//i,’
horizon
e

f - Repalrables
repair process starts
instantly alter a lallure

Fig. I. Domain of expertise of SPARTA II.

TABLE 1

Reliability classes

very unreliable 1Oe3 1/hours


unreliable 5*10-4 l/hours
small reliability lO-4 l/hours
medium reliability & unknown 5.10-’ l/hours
reliable 1O-’ 1/hours
very reliable 5. 10e6 1/hours
very, very reliable 10e6 1/hours

Logical composition

SPARTA II is logically composed of 3 parts.


In the first part, the equivalent failure rate ~j for an item j under consideration is determined. The
following formula is used:
Aj=M*t?-Tlj~lj,
(1)

where:
M is the number of systems which have to be maintained,
e is the operation intensity rate of system,
nj is the number of identical parts of typej in each system,
J.j is catalog or estimated failure rate of partj.
The user enters input data for the computation Of /il through the dialog with SPARTA II. If the failure
rate for part j is not available from the catalog, the user classifies the part into one of the following
classes: very very reliable, very reliable, reliable, medium reliability, small reliability, unreliable, very
unreliable, unknown. The SPARTA II automatically gives a numerical value to the failure rate of such
a part, according to Table 1.
Assumptions concerning repair processes are the following:
la repairable part j is described by pj - mean time to repair,
lrepair process starts either instantly after a failure occurs or waits till the beginning of the new period
KC
From an expert system point of view, assumptions about the failures and repairs give a chance to
build a sort of deep reliability and queuing knowledge into the expert system. The knowledge sources
are:
( 1) the Poisson functions which express that probabilities that the number (s) of random events will
be less than a given number (n ), for given expected number of events (/i* 7’) :
294

and will be used for mission,


(2) the queuing formula expressing the probability that an arrival has to wait for service, in n server
system:

where:
/f =n*e,e=[l/(l -exp(/i~17) ) ] - [ l/ (.4*n)] for consumables with replenishment period 17,
jl =l&&+,f or repairablej with p, mean time to repair, repair process starts at the end of period
17,
p = ~j for repairable j, repair process starts instantly,
which will be used for infinite time horizon tasks.
The functions (2 ) and (3 ) form the kernel of SPARTA II knowledge base.
In the second part of SPARTA II, heuristic rules are used to select the probability to satisfy demand
at T, in the case of a mission, or the probability that a random request will be served, in the case of an
infinite time horizon task. Generally, the nearer the value of the probability to satisfy demand to unity,
the larger the stock of spares. The decision regarding this probability is rule based and depends on:
( 1) the required system availability/readiness,
(2) the essentiality of part for proper system operation,
(3) the price of part,
(4) the weight of part (for a mission),
( 5 ) the volume of part (for a mission ),
(6) the availability of spares-consumables on the market during maintenance,
(7 ) the efficiency of repair.
All these features are viewed as fuzzy variables of non-nume~cal type. The first of them, the required
avaiiability/readiness, describes the status of the system which has to be maintained, and the rest de-
scribe the status of each part. The term sets of qualifiers are developed for each feature. They are:
- required system availability/readiness: high, medium, low,
- essentiality of part: high, medium, low,
- price of part: high, moderate, low,
- weight of part: heavy, medium, light,
- volume of part: large, medium, small,
- availability of the spares on the market: available, unavailable,
- efficiency of repair: easy and fast, with di~culties, no organized way.
The descriptors for adjusting the probability to satisfy demand for spares, which play the role of deci-
sion variable, are set up in a similar manner. They are: increase probability, leave probability alone,
decrease probability.
After introducing status and decision variables, the set of rules is defined. There is one rule for each
of the descriptors in the term set of each status variable. For example, for the status variable Essentiality
of part, the rules are:
El. IF Essentiality is high THEN increase the probability
E2. IF Essentiality is medium THEN leave probability alone
E3. IF Essentiality is low THEN decrease the probability
The rules are applied in sequence, passing through all status variables. The sequence starts from the
295

system status variable required Availabi!it;&eadiness, which selects the initial probability to satisfy
demand. When the decision regarding the probability to satisfy demand is generated, the corresponding
stock level is directly derived from eqn. (2 ) and eqn. ( 3 ) , for mission and infinite time horizon task,
respectively.
In the third part of SPARTA II, when the stock for each item has been suggested, a system approach
is used to see the system consequences of the complete spare parts shopping list. Then, SPARTA II
recommends the items in the list for which it is reasonable to increase (decrease) the stocks of spares,
depending on the budget available for spares. This is achieved by ranking the items algorithmically,
according to the increment (decrement) of performance per pound of constraint. For example, in the
case of mission, the following rules are implemented:
RI. IF the budget available is less than the total price of spares recommended
THEN findj* for which the minimum of vu) is achieved and the stock of spares satisfies NUM-
BER-SO’*) > 0 where:
uO’)=[R(NUMBER_SO’))-R(NUMBER_SO’)-l)]/dO’),
R (NUMBER-SO’) ) = exp ( -A TO’) / (NUMBER-SO’) + 1) ), is the reliability of part j with
spares,
d(j) =cu)/ i co’), co’) is the unit price of partj
j=l
AND recommend unit stock decrease of partj*
R2. IF the budget available is greater than the total price of recommended spares
THEN fmdj** for which maximum ~0’) is achieved where
wO’)=[R(NUMBER_SO’)+l)-R(NUMBER_SO’))]/dO’)
AND recommend unit stock increase of part j**

Similar rules are implemented for the infinite time horizon case..

4. Handling uncertainty

It has been said in the preceding section that instead of assigning numeric values to the system and
all the parts status variables, we assign linguistic values [ 61. Thus, for example a required system avail-
ability and an essentiality of the part may be considered “high”, a unit price of part j may be “high”,
efficiency of repair of failed part j may be “easy and fast” and so on.
We defined the fuzzy sets [ 71 to represent each of the above-mentioned qualifiers. The scale and the
extent of the domain for each qualifier are subjective in nature. They are derived by the reliability
engineering and maintenance experts.
We shall illustrate fuzzy sets definitions by an example: essentiality of the part. A set of definitions
for the three qualifiers which describe the essentiality of the part for system operation is given in Fig.
2. A subjective scale is shown, ranging from 0 to 100, where 0 on the scale should be taken to mean
“system operates perfectly without such part” and 100 corresponds to the maximum importance of the
part.
There is a corresponding numeric table for three membership functions defined in colloquial rather
than scientific sense, see Table 2. Similarly, the fuzzy decision variable (increase probability, leave
probability alone, decrease probability) is parameterized by probability values (see Fig. 3 ).
We generated rules for each term set independently and apply them in sequence. Use of the rules will
be explained by the example of the status variable Essentiality of part. This fuzzy variable is described
verbally, using one of the existing qualifiers, such as high, medium, low. However, it could also be an
intermediate between two of the qualifiers, for example, not too essential. This phrase can be repre-
sented by a point on the X axis in the status domain (O-100 scale). Let, for example, the value 70
corresponds to the phrase used above. Then, it is necessary to look at all three rules E 1, E2, E3 defined
296

VALUES OF
MEMBERSHIP FUNCTIONS

ESSENTIALITY
” OF PART
25 50

Fig. 2. Fuzzy sets for Essentiality of part.

TABLE 2

Fuzzy sets definitions for Essentiality of part

X axis Membership functions of fuzzy sets

high medium low

0 0 0 1
10 0 0.04 0.50
20 0 0.26 0
30 0 0.62 0
40 0 0.90 0
50 0 1 0
60 0.08 0.90 0
70 0.32 0.62 0
80 0.68 0.26 0
90 0.92 0.04 0
100 1 0 0

in the previous section and test the truth of the IF parts of rules with respect to the value of the variable
Essentiality of part. Let a summary of the antecedent parts of three rules have the following truth values:

E 1. Essentiality of part is high truth 0.32


E2. Essentiality of part is medium truth 0.62
E3. Essentiality of part is low truth zero

Thus only El and E2 will make a contribution to probability adjustment. Since the consequent part of
a rule could be no more true than its antecedent component, the fuzzy sets covering the domain of the
decision variable are truncated. The resultant truncated fuzzy sets increase probability and leave prob-
ability alone are shown in Fig. 4.
The union of these two fuzzy sets fully describes the decision to be taken [ 8 1. The translation of the
consequent fuzzy set into an executable decision regarding the probability is performed by applying
297

VALUES OF
MEMBERSHIP FUNCTIONS

PROBABILITY
VALUES
- 05 0

Fig. 3. Fuzzy sets for probability adjustment.

VALUES OF
MEMBERSHIP FUNCTIONS

\
I ALONE
\
\
\_ INCREMENT/DECREMENl
,;S OF PROBABILITY
- 05 0

Fig. 4. Consequent fuzzy sets for Essentiality of part equal 70.

arithmetic defuzzifkation. In SPARTA II the maximum method is implemented. Accordingly, in the


example given in Fig. 4 no change of probability to satisfy demand is prescribed.

5. Implementation

SPARTA II is implemented in ARITY/PROLOG programming language and runs under MS-DOS,


on standard personal computers (SPARTA I used Personal Consultant Plus Expert System Shell).
The choice of Prolog gives many advantages for Expert System application [ 91. It encourages a high
level declarative style of programming, and reduces the semantic gap between Prolog code and the
logical specifications of a problem. Prolog demonstrated expressiveness in creating rule-based expert
systems, such as SPARTA II. The procedural parts of expert system written in C language are called
from the main Prolog code. These features of Prolog offer rapid prototyping, simple maintenance and
consequently robustness of code.
298

The predicates of SPARTA II code can be classified into three modules: knowledge base, inference
engine and user interface.
The major predicates of knowledge base are:
l solve-mission - which determines spares for a mission,
l solve-inf-time-horizon - which determines spares for infinite time horizon. It invokes one of the fol-
lowing three predicates:
- solve-consumable - in case of consumable spares,
- solve-repairable-instantly - in case of repairable spares and instant starts of repair process,
- solve-repairable-period - in case of repairable spares and periodic starts of repair process.
If no uncertainties are involved then the standard depth-first strategy inherent in Prolog is employed.
The use of uncertainty, however, changes the inference strategy. This means that we had to create an
inference mechanism to represent and reason with uncertainty.
Heuristic rules, used to choose an adequate probability to satisfy demands for spares, are represented
in a quite natural way. For example, the set of heuristic rules for the status variable Essentiality (El,
E2, E3) is represented through the following Prolog clauses:

if status-variable (essentiality, low)


then action (decrease-probability)
if status-variable (essentiality, medium)
then action (leave-probability)
if status-variable (essentiality, high)
then action (increase-probability )

A status-variable and the associated linguistic value are represented as a fuzzy set in the following way:

name-of_ status-variable (linguistic_ value list )

The elements of the list have the form:

element of the linguistic value domain: value of membership function

The created inference mechanism embodies two different calculi for reasoning under uncertainty. To
allow reasoning with heuristic rules and status variables described above, we had to make extensions of
the standard unification algorithm of pure Prolog to include a form of semantic unification. First, the
inference mechanism calculates the degree of matching between the value of a particular status variable
of part under consideration and the fuzzy set in the if part of appropriate heuristic rule. The result of
invoking the heuristic rule is an action represented as truncated fuzzy sets. In general, there will be
more than one rule which contributes to the decision in determining the probability to satisfy demands
for spares. After matching all the heuristic rules associated to a particular status variable, the created
inference engine combines all results into a single action (conclusion).
One very important feature of SPARTA II is the possibility to generate useful explanations of its own
reasoning process. SPARTA II provides answers to user questions of the following types:
l why the system needs a piece of information. The user can ask this kind of question during the con-
sultation session with SPARTA II. The system responds with a deep explanation annotated to the rule
being currently considered.
. how the system generates recommendations. The user can ask this kind of question after the consul-
tation session with SPARTA II. The system shows a chain of rules that were used for the generation
of recommendation.
To provide a user friendly expert system, we developed a window interface. Three types of windows
are created and used:
299

display window - an output only window,


menu - a pop vertical menu,
prompt - one line input window.
Welcome to SPARTA II.

6. Conclusion

An efficient and simple personal computer expert system, SPARTA II, for advising on spare stocks
for maintenance of electronic equipment has been developed. By combining causal knowledge from
reliability and queuing theories and surface knowledge from practitioners, a condensed design of a
knowledge base has been achieved. All assumptions about the knowledge base, inference strategies and
other characteristics of the system have been successfully tested and approved.
SPARTA II runs on a standard personal computer under MS-DOS and is implemented using AR-
ITY/PROLOG. This makes SPARTA II an effective software product for decision support in a wide
range of sparing applications.

Appendix

In this appendix we shall explain the algorithm for modifying the assumed or catalog failure rate on
the basis of failures in time.
Assume that our knowledge about failures of part type j in the past is recorded by a number of se-
quences of unit spare requests. Suppose that there exist a total of K records about item j and that a
record k covers a period Lk, (k= 1,K). The period Lk is considered to be a sequence of sk+ & subinter-
vals equal in length. In each subinterval, unit demand for a spare may occur: Sk, nk are the numbers of
subintervals in which demand has and has not occurred, respectively. The probability p of unit demand
in a subinterval before considering record k is a random variable with a priori distribution hk(p). It
will be modified into hk+ 1(p,sk,nk). According to Bayes the following holds:

where
PtSk,nk IP) =PSk. ( 1 -PY” (AZ)
iS the conditional probability Of obtaining Skrealizations in Sk+ nk subintervals.
Let hk(p) be the Beta distribution:

hk(P) =[Bta;,bkl]*Pu”l. (1 -P)bk-l, o<P< 1, (A3)

where B is the Beta function. Then,

.p”k-I.(l_p)bk-l

h/c+, (p,Sk,nk)=
1
p"".(l _p)"". $ .p+l.(l _p)b' dp
s0 0
(A4)
LZk+l-‘. (1 _p)bk+l-l
P
= B(Q+,,&+,) ’
300

where &+, , bk+ , are given by recurrence relations:


ak+l =ak+nk, bk+,=bk+nk, (A51

k= I,...$- 1,
The posterior distribution is also a Beta type with corrected parameters.
Having determined the posterior distribution hk+ , one can find the absolute probability of s realiza-
tions in Sk+ nk subinterval, i.e., the corrected failure rate.

Pfs)=j, ~(~I~)*~~+,(~) dp
(A61
(S+ak;i -l).r-5++;1- 1)

= , s=O,l,....
Lkfak+l +&+I -1
( Lk )
With the improved failure rate obtained by using all K records in this way, one enters the second part
of SPARTA II.

References

Petrovic, R., Senborn, A. and VujoSeviC, M., 1986. Hierarchical Spare Parts Inventory Systems, Elsevier, Amsterdam.
Demmy, W.S. and Pressutti, V.J., 198 1. Multi-echelon inventory theory in the Air Force logistics command. In: Schwarz, ed.,
Studies in Management Science. Vol. 16. North-Holland, Amsterdam, pp 279-297.
Tersine, R.J., 1988. Principles of Inventory and Materials Management. North-Holland, Amsterdam.
Mohodet, J. and Jensen, F., 1986. Reliability Technology: Theory and Applications. North-Holland, Amsterdam.
Tillman, F.A., Hwang, C. and Kou, W., 1980. Optimization of Systems Reliability. Marcel Dekker, New York.
Graham, I. and Jones, P.L., 1988. Expert Systems, Uncertainty and Decisions. Chapman & Hall, London.
Zimme~ann, H.J., 1984. Fuzzy Set Theory and Its Applications. Kluwer Nijhoff, Boston.
Zadeh, L.A. and Bellman, R.E., 1970. Decision-making in a fuzzy environment. Manage. Sci. 17: 141- 164.
Merritt, D., 1989. Building Expert System in Prolog. Springer, New York.

You might also like