Interface ParsedProblem

All Superinterfaces:
Serializable
All Known Implementing Classes:
DefaultParsedProblem

public interface ParsedProblem extends Serializable
This interface defines the methods of a planning problem read by the parser.
  • Method Details

    • getDomainName

      Symbol<String> getDomainName()
      Returns the name of the domain.
      Returns:
      the name of the domain.
    • setDomainName

      void setDomainName(Symbol<String> name)
      Sets a name to the domain.
      Parameters:
      name - the name to set.
    • getProblemName

      Symbol<String> getProblemName()
      Return the name of the problem.
      Returns:
      the name of the problem.
    • setProblemName

      void setProblemName(Symbol<String> name)
      Sets the name of the problem.
      Parameters:
      name - the name to set.
    • getRequirements

      Set<RequireKey> getRequirements()
      Returns the set of requirements.
      Returns:
      the set of requirements.
    • addRequirement

      boolean addRequirement(RequireKey requirement)
      Adds a requirements to the domain.
      Parameters:
      requirement - the requirement to add.
      Returns:
      true if the requirement was added; false otherwise.
    • getObjects

      List<TypedSymbol<String>> getObjects()
      Returns the list of objects declared in the problem file.
      Returns:
      the list of objects declared in the problem file.
    • addObject

      boolean addObject(TypedSymbol<String> object)
      Adds an object to the problem.
      Parameters:
      object - the object to add.
      Returns:
      true if the object was added; false otherwise.
    • setInitialTaskNetwork

      void setInitialTaskNetwork(ParsedTaskNetwork network)
      Set the initial task network of the problem.
      Parameters:
      network - The task network to set.
    • getInitialTaskNetwork

      ParsedTaskNetwork getInitialTaskNetwork()
      Returns the task network of the problem.
      Returns:
      the task network of the problem. The task network may null if it is not defined.
    • getInit

      List<Expression<String>> getInit()
      Returns the list of initial facts defined in the problem file.
      Returns:
      the list of initial facts defined in the problem file.
    • addInitialFact

      boolean addInitialFact(Expression<String> fact)
      Adds an initial fact to the problem.
      Parameters:
      fact - the fact to add.
      Returns:
      true if the fact was added; false otherwise.
    • getGoal

      Expression<String> getGoal()
      Returns the list of goal defined in the problem file.
      Returns:
      the list of goal defined in the problem file.
    • setGoal

      void setGoal(Expression<String> goal)
      Set the goal of this problem.
      Parameters:
      goal - the goal of this problem.
    • getMetric

      Expression<String> getMetric()
      Returns the metric of the problem or null if the problem has no metric specification.
      Returns:
      the metric of the problem or null if the problem has no metric specification.
    • getConstraints

      Expression<String> getConstraints()
      Returns the constraints loaded in the domain file.
      Returns:
      the constraints loaded in the domain file or null if the domain has no constraints.
    • setConstraints

      void setConstraints(Expression<String> constraints)
      Sets the constraints to the domain.
      Parameters:
      constraints - the constraint of the domain.
    • setMetric

      void setMetric(Expression<String> metric)
      Sets the metric of the problem.
      Parameters:
      metric - the metric to set.
    • getObject

      TypedSymbol<String> getObject(Symbol<String> symbol)
      Returns the object from a specified symbol.
      Parameters:
      symbol - The symbol.
      Returns:
      the object from a specified symbol or null if no object with this symbol was declared.
    • normalize

      void normalize()
      Normalize the problem. This method renames the variables and then move inward the negation of the goal and the constraints of the problem.
    • toString

      String toString()
      Returns a string representation of this problem.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this problem.