Package jadex.rules.rulesystem
Class RuleSystem
- java.lang.Object
- 
- jadex.rules.rulesystem.RuleSystem
 
- 
 public class RuleSystem extends java.lang.ObjectRule system is a container for state, rule base, and pattern matcher with agenda.
- 
- 
Field SummaryFields Modifier and Type Field Description protected booleaninitedFlag to check if the rule system was already initialized.protected IPatternMatcherFunctionalitymatcherfuncThe pattern matcher functionality for evaluating rules.protected IPatternMatcherStatematcherstateThe matcher state.protected IRulebaserulebaseThe rule base containing all the rules.protected IOAVStatestateThe working memory containing all facts.
 - 
Constructor SummaryConstructors Constructor Description RuleSystem(IOAVState state, IRulebase rulebase, IPatternMatcherFunctionality matcherfunc)Create a new rule system.RuleSystem(IOAVState state, IRulebase rulebase, IPatternMatcherFunctionality matcherfunc, AbstractAgenda agenda)Create a new rule system.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfireAllRules()Fire all rules until quiescence.IAgendagetAgenda()Get the agenda.IPatternMatcherFunctionalitygetMatcherFunctionality()Get the matcher functionality.IPatternMatcherStategetMatcherState()Get the matcher state.IRulebasegetRulebase()Get the rulebase.IOAVStategetState()Get the memory.voidinit()Initialize the rule system.booleanisInited()Get the inited.
 
- 
- 
- 
Field Detail- 
stateprotected IOAVState state The working memory containing all facts.
 - 
rulebaseprotected IRulebase rulebase The rule base containing all the rules.
 - 
matcherfuncprotected IPatternMatcherFunctionality matcherfunc The pattern matcher functionality for evaluating rules.
 - 
matcherstateprotected IPatternMatcherState matcherstate The matcher state.
 - 
initedprotected boolean inited Flag to check if the rule system was already initialized.
 
- 
 - 
Constructor Detail- 
RuleSystempublic RuleSystem(IOAVState state, IRulebase rulebase, IPatternMatcherFunctionality matcherfunc) Create a new rule system.
 - 
RuleSystempublic RuleSystem(IOAVState state, IRulebase rulebase, IPatternMatcherFunctionality matcherfunc, AbstractAgenda agenda) Create a new rule system.
 
- 
 - 
Method Detail- 
initpublic void init() Initialize the rule system. The rule system needs to be initialized once, before rules can be fired. When trying to initialize the rule system twice, an exception is thrown. Exceptions are also thrown, when trying to fire rules of a not yet initialized rule system
 - 
isInitedpublic boolean isInited() Get the inited.- Returns:
- the inited.
 
 - 
getStatepublic IOAVState getState() Get the memory.- Returns:
- The memory.
 
 - 
getRulebasepublic IRulebase getRulebase() Get the rulebase.- Returns:
- The rulebase.
 
 - 
getAgendapublic IAgenda getAgenda() Get the agenda. The agenda can only be accessed, after the rule system has been initialized withinit().- Returns:
- The agenda.
 
 - 
fireAllRulespublic void fireAllRules() Fire all rules until quiescence.
 - 
getMatcherFunctionalitypublic IPatternMatcherFunctionality getMatcherFunctionality() Get the matcher functionality.- Returns:
- The matcher functionality.
 
 - 
getMatcherStatepublic IPatternMatcherState getMatcherState() Get the matcher state.- Returns:
- The matcher state.
 
 
- 
 
-