我正在使用CLIPS 6.3开发一个简单的生产管理算法。目前,我有一个缺陷模板的产品订单和另一个产品的细节。
(deftemplate orderSheets
(slot orderID (type INTEGER))
(slot orderDate (type INTEGER))
(slot product (type STRING))
(slot quantity (type INTEGER))
(slot deliverDate (type INTEGER))
)
(deftemplate productInfoSheets
(slot productID (type STRING))
(slot productStock (type INTEGER))
(slot prodTime (type INTEGER))
(slot maximumProduction (type INTEGER))
)我的疑问是,我如何创建一条规则,将产品订单数量(可在orderSheets中获得)与可用库存(可在productInfoSheets中获得)联系起来。
谢谢你的支持,琼
发布于 2021-05-11 23:11:02
下面是一个比较订单数量和可用库存的示例规则:
(defrule not-enough
(orderSheets (quantity ?quantity))
(productInfoSheets (productStock ?stock))
(test (> ?quantity ?stock))
=>)https://stackoverflow.com/questions/67494920
复制相似问题