|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.able.rules.AbleInferenceEngine
com.ibm.able.rules.AblePlanningEngine
This class provides the control code and inferencing algorithms for processing a set of planning rules in a ruleblock.
The AblePlanningEngine processes AbleAssertionRules and AblePlanningRules and ignores all others.
The control parameters ARL.InitialState and ARL.GoalState can be used to specify the initial and final states respectively. The control parameter ARL.Domain can be used to specify the planning domain.
The control parameter ARL.Requirements can be used to specify requirements on the planning engine for the specified domain.
The major processing method is infer() which is called by the AbleRuleSet bean as part of the normal bean process() method.
Instances of this class are not directly constructed by the user but are dynamically created by the AbleRuleBlock init() method.
AbleRuleSet,
AbleRuleBlock,
AbleAssertionRule,
AblePlanningRule,
Serialized Form| Field Summary | |
|---|---|
protected boolean |
myDebugFlag
|
protected java.lang.String |
myDomain
|
protected java.lang.Class |
myDomainActionsClass
|
protected java.lang.String |
myDomainFile
|
protected com.ibm.able.planner4J.planners.IDomain |
myDomainObj
|
protected java.util.ArrayList |
myExecutablePlan
|
protected AbleExpression |
myGoalState
|
protected boolean |
myHTNProblemFlag
|
protected AbleExpression[] |
myInitialState
|
protected java.util.HashMap |
myParams
|
protected com.ibm.able.planner4J.planners.IPlanner |
myPlanner
|
protected java.lang.String |
myProblemFile
|
protected AbleExpression[] |
myProblemInitObjects
|
protected boolean |
myProblemInitObjectsExplicitFlag
|
protected com.ibm.able.planner4J.planners.IProblem |
myProblemObj
|
protected java.lang.Object[] |
myRequirements
|
protected com.ibm.able.planner4J.planners.IPlanSolution |
myResult
|
| Fields inherited from class com.ibm.able.rules.AbleInferenceEngine |
|---|
myDebugLevel, myRuleBlock, myRuleSet, myRulesFiredCount, myTracer, myWorkingMemory |
| Constructor Summary | |
|---|---|
AblePlanningEngine(AbleRuleSet theRuleSet,
AbleLogger theTracer,
AbleRuleBlock theRuleBlock)
Create a new planning inference engine. |
|
| Method Summary | |
|---|---|
com.ibm.able.planner4J.planners.classicalPlannerImpl.PredicateImpl |
convertAblePredicateToGroundP4JPredicate(AblePredicate theAblePredicate)
Take an AblePredicate as input and convert it into a ground planner4J predicate. |
java.util.Vector |
convertExprToPredicateList(AbleExpression theExpr)
Takes an AbleExpression representing the preconditions of a planning rule and converts it to a list of AblePredicates. |
void |
convertPlanToExecutableForm()
|
void |
convertPlanToStringForm()
|
java.lang.Object |
getControlParameter(java.lang.String theControlParameter)
Returns the specified control parameter on the associated inference engine. |
java.lang.String |
getDomain()
Retrieve the domain control parameter |
java.lang.Class |
getDomainActionsClass()
Gets the class that contains the planning actions. |
java.lang.String |
getDomainActionsClassName()
Gets the name of the class that contains the planning actions. |
java.lang.String |
getDomainFile()
Retrieve the domain file control parameter |
AbleExpression |
getGoalState()
Retrieve the goal state |
AbleExpression[] |
getInitialState()
Retrieve the initial state |
java.util.HashMap |
getParams()
Retrieve the parameter hashmap (control parameter) |
java.util.ArrayList |
getPlan()
Gets the plan created by the infer() method. |
java.lang.String |
getProblemFile()
Retrieve the problem file control parameter |
AbleExpression[] |
getProblemObjects()
Retrieve the objects in the problem |
java.lang.Object[] |
getRequirements()
Retrieve the requirements list (control parameter) |
void |
infer(AbleRuleBlock theRuleBlock)
Inference over the set of rules in the specified ruleblock object. |
boolean |
isRuleBlockValid(AbleRuleBlock theRuleBlock)
Make sure the current ruleblock is "executable" when examined from a static viewpoint. |
void |
setControlParameter(java.lang.String theControlParameter,
java.lang.Object theValue)
Set the specified control parameter on the associated inference engine. |
void |
setDomain(java.lang.String theDomain)
Set the domain control parameter |
void |
setDomainActionsClass(java.lang.Class theDomainActionsClass)
Sets the class that contains the planning actions. |
void |
setDomainFile(java.lang.String theDomainFile)
Set the domain file name control parameter |
void |
setGoalState(AbleExpression theGoalState)
Set the goal state |
void |
setInitialState(AbleExpression[] theInitialState)
Set the initial state |
void |
setParams(java.util.HashMap theParams)
Set the parameter hashmap (control parameter) |
void |
setProblemFile(java.lang.String theProblemFile)
Set the problem file control parameter |
void |
setProblemObjects(AbleExpression[] theProblemObjects)
Set the objects in the problem. |
void |
setRequirements(java.lang.Object[] theRequirements)
Set the requirements list (control parameter) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected com.ibm.able.planner4J.planners.IDomain myDomainObj
protected com.ibm.able.planner4J.planners.IProblem myProblemObj
protected com.ibm.able.planner4J.planners.IPlanner myPlanner
protected com.ibm.able.planner4J.planners.IPlanSolution myResult
protected boolean myDebugFlag
protected boolean myHTNProblemFlag
protected boolean myProblemInitObjectsExplicitFlag
protected AbleExpression[] myProblemInitObjects
protected AbleExpression[] myInitialState
protected AbleExpression myGoalState
protected java.lang.String myDomain
protected java.lang.String myDomainFile
protected java.lang.String myProblemFile
protected java.lang.Object[] myRequirements
protected java.util.HashMap myParams
protected java.lang.Class myDomainActionsClass
protected java.util.ArrayList myExecutablePlan
| Constructor Detail |
public AblePlanningEngine(AbleRuleSet theRuleSet,
AbleLogger theTracer,
AbleRuleBlock theRuleBlock)
theRuleSet - A ruleset whose context is used for inferencing
by this inference engine.
theTracer - A tracer object to which this inference engine can log
information. This may be null, in which case no
information is logged.
theRuleBlock - A ruleblock whose rules are to be used for inferencing
by this inference engine.
| Method Detail |
public boolean isRuleBlockValid(AbleRuleBlock theRuleBlock)
throws AbleDataException
AbleInferenceEngine
isRuleBlockValid in class AbleInferenceEngineAbleDataException
public void infer(AbleRuleBlock theRuleBlock)
throws AbleDataException
AbleInferenceEngine
infer in class AbleInferenceEnginetheRuleBlock - The ruleblock to be processed by the engine.
AbleDataException
public void convertPlanToExecutableForm()
throws AbleDataException
AbleDataException
public void convertPlanToStringForm()
throws AbleDataException
AbleDataException
public java.util.Vector convertExprToPredicateList(AbleExpression theExpr)
throws AbleDataException
AbleDataException
public com.ibm.able.planner4J.planners.classicalPlannerImpl.PredicateImpl convertAblePredicateToGroundP4JPredicate(AblePredicate theAblePredicate)
throws AbleDataException
AbleDataException
public void setControlParameter(java.lang.String theControlParameter,
java.lang.Object theValue)
throws AbleDataException
AbleInferenceEngine
setControlParameter in class AbleInferenceEngineAbleDataException
public java.lang.Object getControlParameter(java.lang.String theControlParameter)
throws AbleDataException
AbleInferenceEngine
getControlParameter in class AbleInferenceEngineAbleDataExceptionpublic void setProblemObjects(AbleExpression[] theProblemObjects)
theProblemObjects - public AbleExpression[] getProblemObjects()
public void setInitialState(AbleExpression[] theInitialState)
theInitialState - public AbleExpression[] getInitialState()
public void setGoalState(AbleExpression theGoalState)
theGoalState - public AbleExpression getGoalState()
public void setDomain(java.lang.String theDomain)
theDomain - public java.lang.String getDomain()
public void setDomainFile(java.lang.String theDomainFile)
theDomainFile - public java.lang.String getDomainFile()
public void setProblemFile(java.lang.String theProblemFile)
theProblemFile - public java.lang.String getProblemFile()
public void setRequirements(java.lang.Object[] theRequirements)
theRequirements - public java.lang.Object[] getRequirements()
public void setParams(java.util.HashMap theParams)
theParams - public java.util.HashMap getParams()
public void setDomainActionsClass(java.lang.Class theDomainActionsClass)
theDomainActionsClass - public java.lang.Class getDomainActionsClass()
public java.lang.String getDomainActionsClassName()
public java.util.ArrayList getPlan()
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||