【发布时间】:2015-03-28 16:08:44
【问题描述】:
当我尝试调用已使用的defrule 时,剪辑停止..
有些defrule需要多次使用,有什么办法吗
这是一个例子
(
defrule choice-in-powerPlant2
(powerPlant2-question)
=>
(printout t "Are Filter and Carburetor Air working fine(y/n)?" crlf)
(bind ?response (check-YNoptions-input)); Get user input on type of questions
(if (eq ?response y)
then
(assert (powerPlant1-question)
)
)
(if (or(eq ?response q) (eq ?response Q))
then
(output-exitmessage)
)
(if (eq ?response n)
then
(printout t "Have you fixed this(y/n)?" crlf)
(bind ?response (check-YNoptions-input)); Get user input on type of questions
(if (eq ?response y)
then
(assert (powerPlant1-question)
)
)
(if (eq ?response n)
then
(printout req "Please replace Filter and Carburetor Air " crlf)
(assert (powerPlant3-question))
)
)
)
在规则 2 中 当我输入 "y"=yes 时,我想回到规则 1
" 输入 "y" 后停止运行"
【问题讨论】:
标签: clips expert-system