Package fr.uga.pddl4j.problem
Interface Problem
- All Superinterfaces:
AtomicFormulaSimplifier<Integer>
,Serializable
- All Known Implementing Classes:
AbstractProblem
,DefaultProblem
,FinalizedProblem
,InstantiatedProblem
,PostInstantiatedProblem
,PreInstantiatedProblem
This interface describes the interface of all planning problem.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the accepted requirements of the problem.Returns the list of instantiated actions of the problem.Returns the list of constant symbols of the problem.Returns the domains for each type of the problem.Returns the list of instantiated durative actions of the problem.Returns the list of instantiated methods of the problem.Returns the list of relevant fluents used the problem.getGoal()
Returns the goal of the problem or null if the goal can is not reachable.Returns the initial state of the problem.Returns the initial task network of the problem.Returns the list of instantiated methods of the problem.Returns the PDDL problem of the problem.Returns the signatures of the predicates defined in the problem.Returns the list of predicate symbols of the problem.Returns the requirements of the problem.Returns the relevant operators for the tasks of the problem.getTasks()
The list of relevant tasks of the problem.getTypes()
Returns the list of the type symbols of the problem.void
Instantiate the problem.boolean
Returnstrue
if this problem is solvable.boolean
Returns true if the problem is totally ordered.boolean
simplify(Expression<Integer> atom)
Simply an atomic formula based on the inertia and the initial state of the problem.toShortString(AbstractInstantiatedOperator operator)
Returns a short string representation of the specified operator, i.e., its name and its instantiated parameters.Returns a string representation of a hierarchical decomposition of plan.Return a string representation of a search.Returns a string representation of a fluent.toString(InitialState state)
Returns a string representation of a initial state.Returns a string representation of a specified action.Returns a string representation of a state.toString(ConditionalEffect effect)
Returns a string representation of a conditional effect.toString(DurativeAction action)
Returns a string representation of a specified durative action.toString(DurativeMethod method)
Returns a string representation of a specified durative method.Returns a string representation of a state.Returns a string representation of a specified method.toString(TaskNetwork network)
Returns a string representation of a specified task network.Returns a string representation of a closed world state.Returns a string representation of a specified task.
-
Method Details
-
getParsedProblem
DefaultParsedProblem getParsedProblem()Returns the PDDL problem of the problem.- Returns:
- the PDDL problem of the problem.
-
getRequirements
Set<RequireKey> getRequirements()Returns the requirements of the problem.- Returns:
- the requirements of the problem.
-
getAcceptedRequirements
Set<RequireKey> getAcceptedRequirements()Returns the accepted requirements of the problem.- Returns:
- the accepted requirements of the problem.
-
getTypes
Returns the list of the type symbols of the problem.- Returns:
- the list of the type symbols of the problem.
-
getDomains
Returns the domains for each type of the problem.- Returns:
- the domains for each type of the problem.
-
getConstantSymbols
Returns the list of constant symbols of the problem.- Returns:
- the list of constant symbols of the problem.
-
getPredicateSymbols
Returns the list of predicate symbols of the problem.- Returns:
- the list predicate symbols of the problem.
-
getPredicateSignatures
Returns the signatures of the predicates defined in the problem.- Returns:
- the signatures of the predicates defined in the problem.
-
getFluents
Returns the list of relevant fluents used the problem.- Returns:
- the list of relevant fluents used the problem.
-
getActions
Returns the list of instantiated actions of the problem.- Returns:
- the list of instantiated actions of the problem.
-
getDurativeActions
List<DurativeAction> getDurativeActions()Returns the list of instantiated durative actions of the problem.- Returns:
- the list of instantiated durative actions of the problem.
-
getMethods
Returns the list of instantiated methods of the problem.- Returns:
- the list of instantiated methods of the problem.
-
getDurativeMethods
List<DurativeMethod> getDurativeMethods()Returns the list of instantiated methods of the problem.- Returns:
- the list of instantiated methods of the problem.
-
getTasks
The list of relevant tasks of the problem.- Returns:
- the list of relevant tasks of the problem.
-
getTaskResolvers
Returns the relevant operators for the tasks of the problem. The method returnnull
if the problem is not hierarchical.Warning a task may have many resolvers event primitives tasks.
The resolvers returned are indexes of operators. To get the list of resolvers of a specific taskt
just write:
Two case must be considered.List<Integer> resolvers = problem.getTaskResolvers().get(t)
- If the task
t
is primitive, i.e.,problem.getTask(t).isPrimtive()
returns true, the list of resolvers contains either indexes of actions either indexes of durative actions. If the index is positive the index represents an action. To get the corresponding action just useproblem.getActions(index)
. If the index is negative the index represents a durative action. To get the corresponding durative action just useproblem.getDurativeActions(-index - 1)
. - Symmetrically, if the task
t
is compound, i.e.,problem.getTask(t).isCompound()
returns true, the list of resolvers contains either indexes of method either indexes of durative methods. If the index is positive the index represents a method. To get the corresponding method just useproblem.getMethods(index)
. If the index is negative the index represents a durative method. To get the corresponding durative method just useproblem.getDurativeMethods(-index - 1)
.
- Returns:
- the relevant operators for a task.
- If the task
-
getGoal
Condition getGoal()Returns the goal of the problem or null if the goal can is not reachable.- Returns:
- the goal of the problem.
-
getInitialState
InitialState getInitialState()Returns the initial state of the problem.- Returns:
- the initial state of the problem.
-
getInitialTaskNetwork
TaskNetwork getInitialTaskNetwork()Returns the initial task network of the problem.- Returns:
- the initial task network of the problem.
-
isSolvable
boolean isSolvable()Returnstrue
if this problem is solvable. It is not because the method returnstrue
that the problem is solvable. It just means that instantiation process can not exclude the fact that the problem is solvable.- Returns:
true
if this problem is solvable;false
.
-
instantiate
void instantiate()Instantiate the problem. -
toString
Returns a string representation of a specified action.- Parameters:
action
- the action.- Returns:
- a string representation of the specified action.
-
toString
Returns a string representation of a specified durative action.- Parameters:
action
- the action.- Returns:
- a string representation of the specified durative action.
-
toString
Returns a string representation of a specified method.- Parameters:
method
- the method.- Returns:
- a string representation of the specified method.
-
toString
Returns a string representation of a specified durative method.- Parameters:
method
- the method.- Returns:
- a string representation of the specified durative method.
-
toString
Returns a string representation of a specified task.- Parameters:
task
- the task.- Returns:
- a string representation of the specified task.
-
toString
Returns a string representation of a specified task network.- Parameters:
network
- the task network..- Returns:
- a string representation of the specified task network.
-
toString
Returns a string representation of a hierarchical decomposition of plan.- Parameters:
hierarchy
- the hierarchical decomposition to convert into string represention.- Returns:
- the string representation of the he hierarchical decomposition in parameter.
-
toString
Returns a string representation of a state.- Parameters:
condition
- the state.- Returns:
- a string representation of the state.
-
toString
Returns a string representation of a state.- Parameters:
effect
- the state.- Returns:
- a string representation of the state.
-
toString
Returns a string representation of a closed world state.- Parameters:
state
- the state.- Returns:
- a string representation of the specified expression.
-
toString
Returns a string representation of a initial state.- Parameters:
state
- the state.- Returns:
- a string representation of the specified expression.
-
toString
Returns a string representation of a fluent.- Parameters:
fluent
- the formula.- Returns:
- a string representation of the specified expression.
-
toString
Return a string representation of a search.- Parameters:
plan
- the search.- Returns:
- a string representation of the specified search.
-
toString
Returns a string representation of a conditional effect.- Parameters:
effect
- the conditional effect.- Returns:
- a string representation of the specified conditional effect.
-
toShortString
Returns a short string representation of the specified operator, i.e., its name and its instantiated parameters. This method can be used for actions and methods.- Parameters:
operator
- the operator.- Returns:
- a string representation of the specified operator.
-
simplify
Simply an atomic formula based on the inertia and the initial state of the problem. The atomic formula in parameter must be an expression of type ATOM. The simplification can be done with totally or partially instantiated atom. When the atom can be simplified, its connector is modified to TRUE or FALSE.- Specified by:
simplify
in interfaceAtomicFormulaSimplifier<Integer>
- Parameters:
atom
- the atomic formula.- Returns:
- if the atom can be simplify to TRUE or FALSE.
-
isTotallyOrdered
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.
-