Class DefaultProblem

All Implemented Interfaces:
AtomicFormulaSimplifier<Integer>, Problem, Serializable

public class DefaultProblem extends FinalizedProblem
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
  • Constructor Details

    • DefaultProblem

      public DefaultProblem(DefaultParsedProblem problem)
      Create a new default problem from a domain and problem.
      Parameters:
      problem - The problem.
  • Method Details

    • getAcceptedRequirements

      public Set<RequireKey> 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:
      initialization in class AbstractProblem
    • 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:
      preinstantiation in class AbstractProblem
    • 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:
      instantiation in class AbstractProblem
    • 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:
      postinstantiation in class AbstractProblem
    • 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:
      finalization in class AbstractProblem
    • isSolvable

      public boolean isSolvable()
      Returns true if this problem is solvable. The method returns false if the goal is simplified to false during the instantiation process, otherwise the method returns true. 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 true that the problem is solvable. It just means that the encoding process can not exclude the fact that the problem is solvable.

      Returns:
      true if 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

      public static void main(String[] args)
      TO DO: Remove.
      Parameters:
      args - the domain and the problem to instantiate.