Skip to main content
. 2020 Feb 7;20(3):897. doi: 10.3390/s20030897
Listing 2: Specification of QoS (Bandwidth) Property via Drools
rule "Sequence Bandwidth Verification"
when
Placeholder(pA:=placeholderid)
PR1: Property (pA:=subject, category=="qosbandwidth", prvalue1:=value, satisfied==true)
Placeholder(pB:=placeholderid)
PR2: Property (pB:=subject, category=="qosbandwidth", prvalue2:=value, satisfied==true)
Link (rId:=recipeID, orchLink:=linkid)
PR3: Property (rId:=recipeID, orchLink:=subject, category=="qosbandwidth", prvalue3:=value,
     satisfied==true)
SEQ: Sequence(rId:=recipeID, sId:=placeholderid, pA:=placeholdera, pB:=placeholderb,
     orchLink:=orchlink)
PR4: Property (rId:=recipeID, sId:=subject, category=="qosbandwidth", prvalue4:=value,
     prvalue4<=prvalue1, prvalue4<=prvalue2, prvalue4<=prvalue3, satisfied==false)
then
modify(PR4){satisfied=true};
end