ME290M, Spring 1999, Students

ME290M
Expert Systems in Mechanical Engineering

Spring 1999, T-Th 12:30-2:00 pm
1165 Etcheverry Hall, Course Control No. 56369 http://best.me.berkeley.edu/~aagogino/me290m/s99


[ Home | Info | Syllabus | Readings | Students | Homework | Resources | News | Chat]

CLIPS PROBLEM 7.10

Here is a copy of the CLIPS exercise presented by Jiangxin Wang in class on Thurs., Feb. 25.

Problem 7.10

Fires are classified according to the principal burning material. Translate the following information to rules for determining fire class.

The type of extinguisher that should be used on a fire depends on the fire class. Translate the following information to rules.

Describe the facts used in the rules. The input to the program should be made by asserting the type of burning material as a fact. The output should indicate which extinguishers may be used and other actions that should be taken, such as cutting off the power. Show that your program works for one material form each of the fire classes.

CLIPS Program

Programming for Problem 7.10, ME290M
; Jiangxin Wang, 02/99

; Define templates used in rules

(deftemplate fire (slot burning-material))

(deftemplate extinguisher-system (multislot function) (multislot extinguisher))

(deftemplate response (multislot actions))

(deftemplate fire-class (slot class))


; Define rules for determining fire classes

(defrule class-A-fire
(fire (burning-material paper | wood | cloth | other-ordinary-combustibles)) =>
(assert (fire-class (class A))))

(defrule class-B-fire
(fire (burning-material oil | gas | greases | other-flammable-combustible-liquids)) =>
(assert (fire-class (class B))))

(defrule class-C-fire
(fire (burning-material energized-electrical-equipment)) =>
(assert (fire-class (class C))))

(defrule class-D-fire
(fire (burning-material megnesium | sodium | potassium | other-combustible-metals)) =>
(assert (fire-class (class D))))

; Define rules for determining the type of extinguisher that should be used on a fire

(defrule class-A-emergency
(fire-class (class A))
=>
(assert (response (actions activate-extinguisher-A))) (assert (extinguisher-system (function heat-absorbing combustion-retarding) (extinguisher water water-based-liquids dry-chemicals))))

(defrule class-B-emergency
(fire-class (class B))
=>
(assert (response (actions activate-extinguisher-B))) (assert (extinguisher-system (function excluding-air inhibiting-release-of-combustible-vapors interrupting-combustion-chain-reaction) (extinguisher dry-chemicals carbon-dioxide foam bromotrifluoromethane))))

(defrule class-C-emergency
(fire-class (class C))
=>
(assert (response (actions activate-extinguisher-C power-cut))) (assert (extinguisher-system (function nonconducting-agent) (extinguisher dry-chemicals carbon-dioxide bromotrifluoromethoane))))

(defrule class-D-emergency
(fire-class (class D))
=>
(assert (response (actions activate-extinguisher-D))) (assert (extinguisher-system (function smothering-heatabsorbing-chemicals) (extinguisher trimethoxyboroxine screened-graphitized-coke))))


[ Home | Info | Syllabus | Readings | Students | Homework | Resources | News | Chat]

Last updated: 26 February 99
Send Comments to: Alice Agogino, aagogino@me.berkeley.edu
Copyright © 1999 Alice Agogino; All Rights Reserved.