Rule class
Represents a rule that contains a list of premises and a list of actions. A rule always contains a list of premises and a list of findings, it is of the form:
If premise 1 AND. premise 2... AND premise n THEN conclusion 1, conclusion 2,..., m conclusion.
Namespace : ielib
Assembly : ielib.dll
C#
public class Rule
ConstructorsRule() : Initializes a new instance of the Rule class.
Rule(Rule r) : Initializes a new instance of the Rule class from another object of the same class.
PropertiesConclusionCount : Gets the number of conclusions of this rule.
Id : Gets the ID of this object.
IsDeductible : Gets a value indicating whether this rule is deductible.
IsSatisfied : Gets a value indicating whether this rule is satisfied.
PremiseCount : Gets the number of premises of this rule.
Tag : Gets or sets an object associated with this object.
Methods Premises controlAddPremise(int FactId, KnowledgePredicate.Predicates ePredicate, Object aValue) : Adds a premise by specifying to ID a fact, the predicate, and the value of this premise.
AddPremise(string aFactName, KnowledgePredicate.Predicates ePredicate, Object aValue) : Adds a premise by specifying the name of a fact, the predicate and the value of this premise.
AddPremise(Fact f, KnowledgePredicate.Predicates ePredicate, Object aValue) : Adds a premise with an object of the class Fact, the predicate, and the value of this premise.
FirstPremise() : Gets the first object of the class Premise of this rule.
GetPremisAt(int i) : Gets an object of the class Premise to index specified.
GetPremiseById(int Id) : Gets an object of the class Premise by the ID which it contains.
GetPremiseByName(string aFactName) : Gets an object of the Premise class with the name of a fact that it contains.
NextPremise() : Gets the next object of the class Premise of this rule.
RemovePremise(string aFactName) : Removes a premise containing a fact that has the specified name.
RemovePremis(int Id) : Removes a premise containing a fact which has the ID specified.
RemovePremise(Fact f) : Removes a premise containing a specified class Fact object.
RemoveAllPremises() : Removes all the premises of this rule.
Conclusions controlAddConclusion(int FactId, object aValue) : Adds a finding specifying ID it a fact and a value to conclude.
AddConclusion(string aFactName, object aValue) : Adds a conclusion by specifying the name of a fact and a value to conclude.
AddConclusion(Fact f, object aValue) : Adds a conclusion with an object of the class Fact and a value to conclude.
FirstConclusion() : Gets the first object of the class Conclusion of this rule.
GetConclusionAt(int i) : Gets an object of the class Conclusion to index specified.
GetConclusionById(int Id) : Gets an object of the class Conclusion by the ID which it contains.
GetConclusionByName(string aFactName) : Gets an object of the Conclusion class with the name of a fact that it contains.
NextConclusion() : Gets the next object of the class Conclusion of this rule.
RemoveConclusion(string aFactName) : Removes a finding of fact that has the specified name.
RemoveConclusion(int FactId) : Removes a finding of fact which has the ID specified.
RemoveConclusion(Fact f) : Removes a conclusion of a specified the Fact class object.
RemoveAllConclusions() : Removes all the conclusions of this rule.