Package fr.uga.pddl4j.problem
Class DefaultProblem
- All Implemented Interfaces:
AtomicFormulaSimplifier<Integer>,Problem,Serializable
This class implements a default problem. this class allows to realize the instantiation of a problem before its
resolution. For the moment, the instantiation process does not deal with the case of fluent objects.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class fr.uga.pddl4j.problem.AbstractProblem
AbstractProblem.Data -
Constructor Summary
ConstructorsConstructorDescriptionDefaultProblem(DefaultParsedProblem problem)Create a new default problem from a domain and problem. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThis method finalizes the domain, i.e., it encodes the planning problem into it final compact representation using bit set.Returns the list of PDDL requirements accepted by the problem.protected voidThis method initializes the structures needed to the instantiation process from the PDDL domain and problem given in parameters of the constructor of the class.protected voidThis methods carries out the instantiation of the planning operators and the goal of the problem in to actions.booleanReturnstrueif this problem is solvable.booleanReturns true if the problem is totally ordered.static voidTO DO: Remove.protected voidThis method carries out all the necessary treatment to postinstantiate the problem.protected voidThis method carries out all the necessary treatment to preinstantiate the problem.Methods inherited from class fr.uga.pddl4j.problem.FinalizedProblem
extractRelevantFluents, extractRelevantFluents, extractRelevantNumericFluents, extractRelevantTasks, finalizeActions, finalizeCondition, finalizeGoal, finalizeInitialNumericFluent, finalizeInitialState, finalizeInitialTaskNetwork, finalizeMethods, finalizeTimeCondition, getActions, getDurativeActions, getDurativeMethods, getFluents, getGoal, getInitialState, getInitialTaskNetwork, getMethods, getNumericFluents, getTaskResolvers, getTasks, initMapOfNumericFluentIndex, initMapOfTaskIndex, initOfMapFluentIndex, initTaskResolvers, toShortString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toStringCostMethods inherited from class fr.uga.pddl4j.problem.PostInstantiatedProblem
extractGroundInertia, extractGroundNumericInertia, getGroundInertia, getGroundNumericInertia, simplifyGoalWithGroundInertia, simplifyWithGroundInertia, simplyActionsWithGroundInertia, simplyMethodsWithGroundInertiaMethods inherited from class fr.uga.pddl4j.problem.InstantiatedProblem
getHierarchicalRelevantPrimitiveTasks, getRelevantActions, getRelevantCompoundTasks, getRelevantHierarchicalActions, getRelevantMethods, getRelevantPrimitiveTasks, instantiateActions, instantiateGoal, instantiateInitialTaskNetwork, instantiateMethodsMethods inherited from class fr.uga.pddl4j.problem.PreInstantiatedProblem
createPredicatesTables, extractInertia, extractNumericInertia, getInertia, getNumericInertia, inferTypesFromInertia, printPredicatesTables, simplify, simplifyActionsWithInferredTypesMethods inherited from class fr.uga.pddl4j.problem.AbstractProblem
getCompoundTaskSymbols, getConstantSymbols, getDomains, getFunctions, getFunctionSignatures, getIntActions, getIntGoal, getIntInitFunctionCost, getIntInitFunctions, getIntInitialState, getIntInitialTaskNetwork, getIntMethods, getIntTimedFluents, getParsedProblem, getPredicateSignatures, getPredicateSymbols, getPrimitiveTaskSymbols, getRequirements, getTaskSignatures, getTaskSymbols, getTypes, initActions, initCompoundTaskSymbols, initConstants, initEitherTypes, initExpression, initFunctions, initGoal, initInitialState, initInitialTaskNetwork, initMethods, initPredicates, initPrimitiveTaskSymbols, initRequirements, initTaskNetwork, initTasks, initTypes, instantiate, setIntInitialTaskNetwork, toShortString, toString, toString, toString, toString, toString, toString, toString
-
Constructor Details
-
DefaultProblem
Create a new default problem from a domain and problem.- Parameters:
problem- The problem.
-
-
Method Details
-
getAcceptedRequirements
Returns the list of PDDL requirements accepted by the problem.- Returns:
- the list of PDDL requirements accepted by the problem.
-
initialization
protected void initialization()This method initializes the structures needed to the instantiation process from the PDDL domain and problem given in parameters of the constructor of the class. First, it collects the constants, the types, the predicate, the function and the tasks symbols. Then, it encodes the actions, the methods, the goal and the initial tasks network of the problem into compact int representation.- Specified by:
initializationin classAbstractProblem
-
preinstantiation
protected void preinstantiation()This method carries out all the necessary treatment to preinstantiate the problem. In particular, it calculates the static properties (Inertia) of the problem in order to prune as soon as possible the actions that can never be triggered.- Specified by:
preinstantiationin classAbstractProblem
-
instantiation
protected void instantiation()This methods carries out the instantiation of the planning operators and the goal of the problem in to actions.- Specified by:
instantiationin classAbstractProblem
-
postinstantiation
protected void postinstantiation()This method carries out all the necessary treatment to postinstantiate the problem. In particular, it simplifies the actions instantiated based on static properties based on the initial state information of the problem in order to prune the actions that can never be triggered.- Specified by:
postinstantiationin classAbstractProblem
-
finalization
protected void finalization()This method finalizes the domain, i.e., it encodes the planning problem into it final compact representation using bit set.- Specified by:
finalizationin classAbstractProblem
-
isSolvable
public boolean isSolvable()Returnstrueif this problem is solvable. The method returnsfalseif the goal is simplified tofalseduring the instantiation process, otherwise the method returnstrue. If the problem is hierarchic, the method checks also that every task in the initial task network has at least a one resolver.Warning, it is not because the method returns
truethat the problem is solvable. It just means that the encoding process can not exclude the fact that the problem is solvable.- Returns:
trueif this problem is solvable;false.
-
isTotallyOrdered
public final boolean isTotallyOrdered()Returns true if the problem is totally ordered. The method returns true if the problem is not hierarchical, i.e., contains no methods durative or not and no no initial task network. A hierarchical problem is totally ordered if and only the subtasks of each method of the problem are totally ordered and the initial task network is totally ordered.- Returns:
- true if the problem is totally ordered, false otherwise.
-
main
TO DO: Remove.- Parameters:
args- the domain and the problem to instantiate.
-