⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rx7.clp

📁 NASA 开发使用的一个专家系统
💻 CLP
📖 第 1 页 / 共 4 页
字号:
;; If the current menu level is possible-causes-1-4-2,      *
;;    and the user selects choice 0,                        *
;; Then re-display the previous menu.                       *
;;                                                          *
;; Variables:                                               *
;;   ?ml - for retracting the menu level fact.              *
;;   ?pc - for retracting the possible cause fact.          *
;;***********************************************************
(defrule ascend-to-previous-menu-1-4-2
  ?ml <- (menu-level engine possible-causes-1-4-2)
  ?pc <- (possible-cause ?problem 0)
=>
  (retract ?ml)
  (retract ?pc)
  (assert (menu-level engine possible-causes-1-4)))
;;
;;***********************************************************
;; If the current menu level is possible-causes-1-4-3,      *
;;    and the user selects choice 0,                        *
;; Then re-display the previous menu.                       *
;;                                                          *
;; Variables:                                               *
;;   ?ml - for retracting the menu level fact.              *
;;   ?pc - for retracting the possible cause fact.          *
;;***********************************************************
(defrule ascend-to-previous-menu-1-4-3
  ?ml <- (menu-level engine possible-causes-1-4-3)
  ?pc <- (possible-cause ?problem 0)
=>
  (retract ?ml)
  (retract ?pc)
  (assert (menu-level engine possible-causes-1-4)))
;;
;;***********************************************************
;; If the current menu level is possible-causes-1-4-4,      *
;;    and the user selects choice 0,                        *
;; Then re-display the previous menu.                       *
;;                                                          *
;; Variables:                                               *
;;   ?ml - for retracting the menu level fact.              *
;;   ?pc - for retracting the possible cause fact.          *
;;***********************************************************
(defrule ascend-to-previous-menu-1-4-4
  ?ml <- (menu-level engine possible-causes-1-4-4)
  ?pc <- (possible-cause ?problem 0)
=>
  (retract ?ml)
  (retract ?pc)
  (assert (menu-level engine possible-causes-1-4)))
;;
;;***********************************************************
;; If the current menu level is possible-causes-1-2,        *
;;    and the user selects choice 0,                        *
;; Then re-display the previous menu.                       *
;;                                                          *
;; Variables:                                               *
;;   ?ml - for retracting the menu level fact.              *
;;   ?pc - for retracting the possible cause fact.          *
;;***********************************************************
(defrule ascend-to-main-menu-2
  ?ml <- (menu-level engine possible-causes-1-2)
  ?pc <- (possible-cause ?problem 0)
=>
  (retract ?ml)
  (retract ?pc)
  (assert (menu-level engine main)))
;;
;;***********************************************************
;; If the current menu level is possible-causes-1-3,        *
;;    and the user selects choice 0,                        *
;; Then re-display the previous menu.                       *
;;                                                          *
;; Variables:                                               *
;;   ?ml - for retracting the menu level fact.              *
;;   ?pc - for retracting the possible cause fact.          *
;;***********************************************************
(defrule ascend-to-main-menu-3
  ?ml <- (menu-level engine possible-causes-1-3)
  ?pc <- (possible-cause ?problem 0)
=>
  (retract ?ml)
  (retract ?pc)
  (assert (menu-level engine main)))
;;
;;***********************************************************
;; If the current menu level is possible-causes-1-4,        *
;;    and the user selects choice 0,                        *
;; Then re-display the previous menu.                       *
;;                                                          *
;; Variables:                                               *
;;   ?ml - for retracting the menu level fact.              *
;;   ?pc - for retracting the possible cause fact.          *
;;***********************************************************
(defrule ascend-to-main-menu-4
  ?ml <- (menu-level engine possible-causes-1-4)
  ?pc <- (possible-cause ?problem 0)
=>
  (retract ?ml)
  (retract ?pc)
  (assert (menu-level engine main)))
;;
;;***********************************************************
;; If the current menu level is possible-causes-1-1-1,      *
;;    and the user selects choice 1,                        *
;; Then list the appropriate instructions.                  *
;;                                                          *
;; Variables:                                               *
;;   ?ml - for retracting the menu level fact.              *
;;   ?pc - for retracting the possible cause fact.          *
;;   ?response - for binding in the users response.         *
;;***********************************************************
(defrule instructions-1-1-1-1
  (troubleshoot-mode engine)
  ?ml <- (menu-level engine possible-causes-1-1-1)
  ?pc <- (possible-cause ?problem 1)
=>
  (retract ?ml)
  (retract ?pc)
  (printout t
  "        Check the side housings (front, intermediate and rear" crlf
  "        housings) for warpage.  Replace if warpage exceeds 0.04 mm." crlf
  "        Refer to section 1-42 in service manual for further" crlf
  "        instructions or illustrations." crlf crlf
  "        Press return to view main menu." crlf)
  (bind ?response (readline))
  (assert (menu-level engine main)))
;;
;;***********************************************************
;; If the current menu level is possible-causes-1-1-1,      *
;;    and the user selects choice 2,                        *
;; Then list the appropriate instructions.                  *
;;                                                          *
;; Variables:                                               *
;;   ?ml - for retracting the menu level fact.              *
;;   ?pc - for retracting the possible cause fact.          *
;;   ?response - for binding in the users response.         *
;;***********************************************************
(defrule instructions-1-1-1-2
  (troubleshoot-mode engine)
  ?ml <- (menu-level engine ?causes)
  ?pc <- (possible-cause ?problem 2)
=>
  (retract ?ml)
  (retract ?pc)
  (printout t
  "      1.) Check the chromium plated surface on the rotor housing for" crlf
  "          scoring, flaking or any other damage.  Replace if necessary." crlf
  "      2.) See section 1-45 in service manual for measuring rotor." crlf
  "          housing width." crlf crlf
  "      Press return to view main menu." crlf)
  (bind ?response (readline))
  (assert (menu-level engine main)))
;;
;;***********************************************************
;; If the current menu level is possible-causes-1-1-1,      *
;;    and the user selects choice 3,                        *
;; Then list the appropriate instructions.                  *
;;                                                          *
;; Variables:                                               *
;;   ?ml - for retracting the menu level fact.              *
;;   ?pc - for retracting the possible cause fact.          *
;;   ?response - for binding in the users response.         *
;;***********************************************************
(defrule instructions-1-1-1-3
  (troubleshoot-mode engine)
  ?ml <- (menu-level engine ?causes)
  ?pc <- (possible-cause ?problem 3)
=>
  (retract ?ml)
  (retract ?pc)
  (printout t
  "      1.) Carefully inspect the rotor and replace it if it is" crlf
  "          severely worn or damaged." crlf
  "      2.) Check the internal gear for cracked, scored, worn or" crlf
  "          chipped teeth." crlf
  "      3.) Check the clearance between the side housing and rotor." crlf
  "          See section 1-45 in repair manual for illustration." crlf crlf
  "      Press return to view main menu." crlf)
  (bind ?response (readline))
  (assert (menu-level engine main)))
;;
;;***********************************************************
;; If the current menu level is possible-causes-1-1-1,      *
;;    and the user selects choice 4,                        *
;; Then list the appropriate instructions.                  *
;;                                                          *
;; Variables:                                               *
;;   ?ml - for retracting the menu level fact.              *
;;   ?pc - for retracting the possible cause fact.          *
;;   ?response - for binding in the users response.         *
;;***********************************************************
(defrule instructions-1-1-1-4
  (troubleshoot-mode engine)
  ?ml <- (menu-level engine ?causes)
  ?pc <- (possible-cause ?problem 4)
=>
  (retract ?ml)
  (retract ?pc)
  (printout t
  "      1.) Inspect the oil seal for wear or damage." crlf
  "          Replace if necessary." crlf
  "      2.) Check the oil seal lip width." crlf
  "          Lip width should not exceed 0.5 mm." crlf
  "      3.) Check the oil seals for free vertical movement." crlf
  "          See section 1-47 in repair manual for illustration." crlf crlf
  "      Press return to view main menu." crlf)
  (bind ?response (readline))
  (assert (menu-level engine main)))
;;
;;***********************************************************
;; If the current menu level is possible-causes-1-1-1,      *
;;    and the user selects choice 5,                        *
;; Then list the appropriate instructions.                  *
;;                                                          *
;; Variables:                                               *
;;   ?ml - for retracting the menu level fact.              *
;;   ?pc - for retracting the possible cause fact.          *
;;   ?response - for binding in the users response.         *
;;***********************************************************
(defrule instructions-1-1-1-5
  (troubleshoot-mode engine)
  ?ml <- (menu-level engine ?causes)
  ?pc <- (possible-cause ?problem 5)
=>
  (retract ?ml)
  (retract ?pc)
  (printout t
  "          Inspect the oil seal springs to see that they are properly" crlf
  "          seated in their respective grooves." crlf
  "          See section 1-47 in repair manual for illustration." crlf crlf
  "      Press return to view main menu." crlf)
  (bind ?response (readline))
  (assert (menu-level engine main)))
;;
;;***********************************************************
;; If the current menu level is possible-causes-1-2-1,      *
;;    and the user selects choice 1,                        *
;; Then list the appropriate instructions.                  *
;;                                                          *
;; Variables:                                               *
;;   ?ml - for retracting the menu level fact.              *
;;   ?pc - for retracting the possible cause fact.          *
;;   ?response - for binding in the users response.         *
;;***********************************************************
(defrule instructions-1-2-1-1
  (troubleshoot-mode engine)
  ?ml <- (menu-level engine possible-causes-1-2-1)
  ?pc <- (possible-cause ?problem 1)
=>
  (retract ?ml)
  (retract ?pc)
  (printout t
  "          Side Housings (front, intermediate and rear housings)" crlf
  "          1.) Remove the sealing agent from the housing surface" crlf
  "              with a cloth or a brush soaked in solvent or thinner." crlf
  "          2.) Remove all carbon on the rotor chamber surface with" crlf
  "              extra-fine emery paper." crlf crlf
  "          Rotor Housing" crlf
  "          Note" crlf
  "          Before cleaning, check for traces of gas or water leakage" crlf
  "          along the inner margin of the rotor housings." crlf crlf
  "          1.) Remove all carbon from the inner surface of the rotor" crlf
  "              housing by wiping with a cloth soaked in solvent or" crlf
  "              thinner." crlf
  "          2.) Remove all deposits and rust from the cooling water" crlf
  "              passages on the housing." crlf
  "          3.) Remove the sealing agent from the housing with a cloth" crlf
  "              or brush soaked in solvent or thinner." crlf crlf
  "          Press return to continue printing instructions." crlf)
  (bind ?key (readline))
  (printout t
  "          Rotor" crlf
  "          1.) Remove the carbon from the rotor with a carbon remover" crlf
  "              or emery paper." crlf crlf
  "          Caution" crlf
  "          a) Do not use emery paper on the groove of the apex seal" crlf
  "             or the side seal." crlf
  "          b) Take care not to damage the soft material coating on the" crlf
  "             side surfaces." crlf crlf
  "          2.) Remove the carbon in each groove." crlf
  "          3.) Wash the rotor with a cleaning solution." crlf crlf
  "      Press return to view main menu." crlf)
  (bind ?response (readline))
  (assert (menu-level engine main)))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -