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