正如标题所示,我有一个“生成酒店”规则,尽管该规则位于正确的模块中,并且具有WM中所需的所有事实,但是该规则不会发生。
(defrule HOTELS::generate-hotels
(hotel (name ?name) (tr ?tr) (stars ?s) (price-per-night ?ppn))
(tourism-resort (name ?tr) (region ?r) (type $? ?t $?) (score ?s))
(tourism-type ?t)
(attribute (name best-region) (value ?r) (certainty ?certainty-1))
(attribute (name best-city) (value ?city&:(eq ?city (sym-cat (str-cat ?r "-") ?tr))) (certainty ?certainty-2))
(attribute (name best-tourism-type) (value ?t) (certainty ?certainty-3))
=>
(assert (attribute (name hotel) (value ?name)
(certainty (min ?certainty-1 ?certainty-2 ?certainty-3)))))