📄 rx7.clp
字号:
" 0.) Return to main menu." crlf
" 1.) Gas seal noise." crlf
" 2.) Knocking noise." crlf
" 3.) Hitting noise." crlf
" 4.) Other." crlf
" Choice: ")
(bind ?response (read))
(assert (possible-cause engine-noise ?response))
(printout t crlf))
;;
;;*************************************************
;; This rule replaces the users numeric input for *
;; the possible cause of insufficient compression *
;; to the textual representation. This rule uses *
;; a variable for the problem field so it is not *
;; tied to any particular problem. *
;; *
;; Variables: *
;; ?ml - used for retracting the menu level. *
;; ?pc - used for retracting the possible cause *
;; fact. *
;; ?problem - the problem selected by the user. *
;;*************************************************
(defrule numeric-to-text-insufficient-compression-1-1
(troubleshoot-mode engine)
?ml <- (menu-level engine possible-causes-1-1)
?pc <- (possible-cause ?problem 1)
=>
(retract ?ml)
(assert (menu-level engine possible-causes-1-1-1))
(retract ?pc)
(assert (possible-cause ?problem insufficient-compression)))
;;
;;**************************************************
;; This rule replaces the users numeric input for *
;; the possible cause of malfunction in combustion *
;; chamber to the textual representation. This *
;; rule is for switching from the ABNORMAL *
;; COMBUSTION menu to the sub menu. *
;; *
;; Variables: *
;; ?ml - used for retracting the menu level. *
;; ?pc - used for retracting the possible cause *
;; fact. *
;; ?problem - the problem selected by the user. *
;;**************************************************
(defrule numeric-to-text-malfunction-in-combustion-chamber-1-2
(troubleshoot-mode engine)
?ml <- (menu-level engine possible-causes-1-2)
?pc <- (possible-cause ?problem 1)
=>
(retract ?ml)
(assert (menu-level engine possible-causes-1-2-1))
(retract ?pc)
(assert (possible-cause ?problem malfunction-in-combustion-chamber)))
;;
;;**************************************************
;; This rule replaces the users numeric input for *
;; the possible cause of leakage into combustion *
;; chamber to the textual representation. This *
;; rule is for switching from the EXCESSIVE OIL *
;; CONSUMPTION menu to the sub menu. *
;; *
;; Variables: *
;; ?ml - used for retracting the menu level. *
;; ?pc - used for retracting the possible cause *
;; fact. *
;; ?problem - the problem selected by the user. *
;;**************************************************
(defrule numeric-to-text-leakage-into-combustion-chamber-1-3
(troubleshoot-mode engine)
?ml <- (menu-level engine possible-causes-1-3)
?pc <- (possible-cause ?problem 1)
=>
(retract ?ml)
(assert (menu-level engine possible-causes-1-3-1))
(retract ?pc)
(assert (possible-cause ?problem leakage-into-combustion-chamber)))
;;
;;**************************************************
;; This rule replaces the users numeric input for *
;; the possible cause of leakage into coolant *
;; passages to the textual representation. This *
;; rule is for switching from the EXCESSIVE OIL *
;; CONSUMPTION menu to the sub menu. *
;; *
;; Variables: *
;; ?ml - used for retracting the menu level. *
;; ?pc - used for retracting the possible cause *
;; fact. *
;; ?problem - the problem selected by the user. *
;;**************************************************
(defrule numeric-to-text-leakage-into-coolant-passages-1-3
(troubleshoot-mode engine)
?ml <- (menu-level engine possible-causes-1-3)
?pc <- (possible-cause ?problem 2)
=>
(retract ?ml)
(assert (menu-level engine possible-causes-1-3-2))
(retract ?pc)
(assert (possible-cause ?problem leakage-into-coolant-passages)))
;;
;;**************************************************
;; This rule replaces the users numeric input for *
;; the possible cause of gas seal noise to the *
;; textual representation. This rule is for *
;; switching from the EXCESSIVE OIL CONSUMPTION *
;; menu to the sub menu. *
;; *
;; Variables: *
;; ?ml - used for retracting the menu level. *
;; ?pc - used for retracting the possible cause *
;; fact. *
;; ?problem - the problem selected by the user. *
;;**************************************************
(defrule numeric-to-text-gas-seal-noise-1-4
(troubleshoot-mode engine)
?ml <- (menu-level engine possible-causes-1-4)
?pc <- (possible-cause ?problem 1)
=>
(retract ?ml)
(assert (menu-level engine possible-causes-1-4-1))
(retract ?pc)
(assert (possible-cause ?problem gas-seal-noise)))
;;
;;**************************************************
;; This rule replaces the users numeric input for *
;; the possible cause of knocking noise to the *
;; textual representation. This rule is for *
;; switching from the EXCESSIVE OIL CONSUMPTION *
;; menu to the sub menu. *
;; *
;; Variables: *
;; ?ml - used for retracting the menu level. *
;; ?pc - used for retracting the possible cause *
;; fact. *
;; ?problem - the problem selected by the user. *
;;**************************************************
(defrule numeric-to-text-knocking-noise-1-4
(troubleshoot-mode engine)
?ml <- (menu-level engine possible-causes-1-4)
?pc <- (possible-cause ?problem 2)
=>
(retract ?ml)
(assert (menu-level engine possible-causes-1-4-2))
(retract ?pc)
(assert (possible-cause ?problem knocking-noise)))
;;
;;**************************************************
;; This rule replaces the users numeric input for *
;; the possible cause of hitting noise to the *
;; textual representation. This rule is for *
;; switching from the EXCESSIVE OIL CONSUMPTION *
;; menu to the sub menu. *
;; *
;; Variables: *
;; ?ml - used for retracting the menu level. *
;; ?pc - used for retracting the possible cause *
;; fact. *
;; ?problem - the problem selected by the user. *
;;**************************************************
(defrule numeric-to-text-hitting-noise-1-4
(troubleshoot-mode engine)
?ml <- (menu-level engine possible-causes-1-4)
?pc <- (possible-cause ?problem 3)
=>
(retract ?ml)
(assert (menu-level engine possible-causes-1-4-3))
(retract ?pc)
(assert (possible-cause ?problem hitting-noise)))
;;
;;**************************************************
;; This rule replaces the users numeric input for *
;; the possible cause of other to the textual *
;; representation. This rule is for switching *
;; from the EXCESSIVE OIL CONSUMPTION menu to the *
;; sub menu. *
;; *
;; Variables: *
;; ?ml - used for retracting the menu level. *
;; ?pc - used for retracting the possible cause *
;; fact. *
;; ?problem - the problem selected by the user. *
;;**************************************************
(defrule numeric-to-text-other-1-4
(troubleshoot-mode engine)
?ml <- (menu-level engine possible-causes-1-4)
?pc <- (possible-cause ?problem 4)
=>
(retract ?ml)
(assert (menu-level engine possible-causes-1-4-4))
(retract ?pc)
(assert (possible-cause ?problem other)))
;;
;;******************************************************
;; If insufficient compression is a possible cause of *
;; some problem, *
;; Then present the possible causes of the problem. *
;; *
;; Variables: *
;; ?pc - used for retracting the possible cause. *
;; ?problem - the problem selected by the user. *
;; ?response - the users response to the menu prompt.*
;;******************************************************
(defrule possible-causes-of-insufficient-compression
(troubleshoot-mode engine)
(menu-level engine possible-causes-1-1-1)
?pc <- (possible-cause ?problem insufficient-compression)
=>
(retract ?pc)
(printout t crlf crlf crlf)
(printout t
" You selected INSUFFICIENT COMPRESSION as a possible cause" crlf
" of the problem " ?problem ". If you change your mind and" crlf
" would like to review the previous choices, press 0 now," crlf
" otherwise select one of the possible causes of INSUFFICIENT" crlf
" COMPRESSION listed below." crlf crlf
" 0.) Return to previous menu." crlf
" 1.) Deformation or abnormal wear of side housing." crlf
" 2.) Deformation of abnormal wear of rotor housing." crlf
" 3.) Wear of rotor grooves." crlf
" 4.) Deformation or poor fastening of gas seals." crlf
" 5.) Worn or weak spring." crlf crlf
" Choice: ")
(bind ?response (read))
(assert (possible-cause ?problem ?response))
(printout t crlf))
;;
;;******************************************************
;; This is the sub menu for malfunction in combustion *
;; chamber under problem of abnormal combustion. *
;; If malfunction in combustion chamber is a possible *
;; cause of some problem, *
;; Then present the possible causes of malfunction in *
;; combustion chamber. *
;; *
;; Variables: *
;; ?pc - used for retracting the possible cause. *
;; ?problem - the problem selected by the user. *
;; ?response - the users response to the menu prompt.*
;;******************************************************
(defrule possible-causes-of-malfunction-in-combustion-chamber
(troubleshoot-mode engine)
(menu-level engine possible-causes-1-2-1)
?pc <- (possible-cause ?problem malfunction-in-combustion-chamber)
=>
(retract ?pc)
(printout t crlf crlf crlf)
(printout t
" You selected MALFUNCTION IN COMBUSTION CHAMBER as a possible" crlf
" cause of the problem " ?problem ". If you change your mind" crlf
" and would like to review the previous choices, press 0 now," crlf
" otherwise select the possible cause of MALFUNCTION IN " crlf
" COMBUSTION CHAMBER listed below." crlf crlf
" 0.) Return to previous menu." crlf
" 1.) Carbon accumulation." crlf crlf
" Choice: ")
(bind ?response (read))
(assert (possible-cause ?problem ?response))
(printout t crlf))
;;
;;******************************************************
;; This is the sub menu for leakage into combustion *
;; chamber under problem of excessive oil consumption. *
;; If leakage into combustion chamber is a possible *
;; cause of some problem, *
;; Then present the possible causes of leakage into *
;; combustion chamber. *
;; *
;; Variables: *
;; ?pc - used for retracting the possible cause. *
;; ?problem - the problem selected by the user. *
;; ?response - the users response to the menu prompt.*
;;******************************************************
(defrule possible-causes-of-leakage-into-combustion-chamber
(troubleshoot-mode engine)
(menu-level engine possible-causes-1-3-1)
?pc <- (possible-cause ?problem leakage-into-combustion-chamber)
=>
(retract ?pc)
(printout t crlf crlf crlf)
(printout t
" You selected LEAKAGE INTO COMBUSTION CHAMBER as a possible" crlf
" cause of the problem " ?problem ". If you" crlf
" change your mind and would like to review the previous" crlf
" choices, press 0 now, otherwise select one of the possible" crlf
" causes of LEAKAGE INTO COMBUSTION CHAMBER listed below." crlf crlf
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -