Interface Problem

All Superinterfaces:
AtomicFormulaSimplifier<Integer>, Serializable
All Known Implementing Classes:
AbstractProblem, DefaultProblem, FinalizedProblem, InstantiatedProblem, PostInstantiatedProblem, PreInstantiatedProblem

public interface Problem extends Serializable, AtomicFormulaSimplifier<Integer>
This interface describes the interface of all planning problem.
  • 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

      List<String> getTypes()
      Returns the list of the type symbols of the problem.
      Returns:
      the list of the type symbols of the problem.
    • getDomains

      Map<Integer,​Set<Symbol<Integer>>> getDomains()
      Returns the domains for each type of the problem.
      Returns:
      the domains for each type of the problem.
    • getConstantSymbols

      List<String> getConstantSymbols()
      Returns the list of constant symbols of the problem.
      Returns:
      the list of constant symbols of the problem.
    • getPredicateSymbols

      List<String> getPredicateSymbols()
      Returns the list of predicate symbols of the problem.
      Returns:
      the list predicate symbols of the problem.
    • getPredicateSignatures

      List<List<Symbol<Integer>>> getPredicateSignatures()
      Returns the signatures of the predicates defined in the problem.
      Returns:
      the signatures of the predicates defined in the problem.
    • getFluents

      List<Fluent> getFluents()
      Returns the list of relevant fluents used the problem.
      Returns:
      the list of relevant fluents used the problem.
    • getActions

      List<Action> 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

      List<Method> 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

      List<Task> getTasks()
      The list of relevant tasks of the problem.
      Returns:
      the list of relevant tasks of the problem.
    • getTaskResolvers

      List<List<Integer>> getTaskResolvers()
      Returns the relevant operators for the tasks of the problem. The method return null 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 task t just write:
      
           List<Integer> resolvers = problem.getTaskResolvers().get(t)
       
      Two case must be considered.
      • 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 use problem.getActions(index). If the index is negative the index represents a durative action. To get the corresponding durative action just use problem.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 use problem.getMethods(index). If the index is negative the index represents a durative method. To get the corresponding durative method just use problem.getDurativeMethods(-index - 1).
      Returns:
      the relevant operators for a 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()
      Returns true if this problem is solvable. It is not because the method returns true 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

      String toString(Action action)
      Returns a string representation of a specified action.
      Parameters:
      action - the action.
      Returns:
      a string representation of the specified action.
    • toString

      String toString(DurativeAction action)
      Returns a string representation of a specified durative action.
      Parameters:
      action - the action.
      Returns:
      a string representation of the specified durative action.
    • toString

      String toString(Method method)
      Returns a string representation of a specified method.
      Parameters:
      method - the method.
      Returns:
      a string representation of the specified method.
    • toString

      String toString(DurativeMethod method)
      Returns a string representation of a specified durative method.
      Parameters:
      method - the method.
      Returns:
      a string representation of the specified durative method.
    • toString

      String toString(Task task)
      Returns a string representation of a specified task.
      Parameters:
      task - the task.
      Returns:
      a string representation of the specified task.
    • toString

      String toString(TaskNetwork network)
      Returns a string representation of a specified task network.
      Parameters:
      network - the task network..
      Returns:
      a string representation of the specified task network.
    • toString

      String toString(Hierarchy hierarchy)
      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

      String toString(Condition condition)
      Returns a string representation of a state.
      Parameters:
      condition - the state.
      Returns:
      a string representation of the state.
    • toString

      String toString(Effect effect)
      Returns a string representation of a state.
      Parameters:
      effect - the state.
      Returns:
      a string representation of the state.
    • toString

      String toString(State state)
      Returns a string representation of a closed world state.
      Parameters:
      state - the state.
      Returns:
      a string representation of the specified expression.
    • toString

      String toString(InitialState state)
      Returns a string representation of a initial state.
      Parameters:
      state - the state.
      Returns:
      a string representation of the specified expression.
    • toString

      String toString(Fluent fluent)
      Returns a string representation of a fluent.
      Parameters:
      fluent - the formula.
      Returns:
      a string representation of the specified expression.
    • toString

      String toString(Plan plan)
      Return a string representation of a search.
      Parameters:
      plan - the search.
      Returns:
      a string representation of the specified search.
    • toString

      String toString(ConditionalEffect effect)
      Returns a string representation of a conditional effect.
      Parameters:
      effect - the conditional effect.
      Returns:
      a string representation of the specified conditional effect.
    • toShortString

      String toShortString(AbstractInstantiatedOperator operator)
      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

      boolean simplify(Expression<Integer> atom)
      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 interface AtomicFormulaSimplifier<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.