[BRF+] 测试ruleset
發送日期:2014-08-26 11:43:17
使用昨天report 創建的ruleset,里面包含了兩個ruleset variable, 這兩個rule variable的初始化分別由calc. cust. discount和calc. pro. discount這兩個decision table來完成。
Decision table的rule 維護如下:
如果customer是“sap”,item是“ballpen”,則customer discount值為0.15
如果customer是“sap”,item是“pencil”,則customer discount值為0.12
如果不滿足以上兩個條件,則無discount
這里的column customer, item和Customer Discount都是function的context里定義的變量。
點擊Simulation button:
選擇Interpretation Mode:
點Execute button.
因為customer=sap, item=pencil, 滿足decision table里的entry,因此customer_discount為0.12
promotion=sun, item = pencil, 不滿足decision table里的任何一條entry,因此promotion_discount為0.
所以rule里的if 條件不滿足,因此price將按照customer discount進行計算: final price = 10 / ( 1 + 0.12 ) = 8.93
如果使用"Execute and Display Processing Steps", 能夠看到BRF+ 每一步具體的執行步驟:
總結
以上是生活随笔為你收集整理的[BRF+] 测试ruleset的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 模糊数学基础_模糊数学及其应用(win1
- 下一篇: 吃鸡符号怎么打(长期吃轻食的人都怎么样了