Class Statistics

java.lang.Object
fr.uga.pddl4j.planners.Statistics
All Implemented Interfaces:
Serializable

public class Statistics extends Object implements Serializable
The class implements the statistics of the planner, search time, memory used, etc.
Since:
3.0
See Also:
Serialized Form
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new statistics object to store statistical information about planner performances.
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    byteToMByte​(long size)
    Converts a size in bytes in mega bytes.
    long
    Returns the memory used to encode the planning problem in bytes.
    long
    Returns the memory used to search a planning problem in bytes.
    int
    Returns the number of actions contained in the solved problem .
    int
    Returns the number of relevant facts of the solved problem.
    Returns the path to the file containing the description of the solved problem.
    long
    Returns the encoding time, i.e., the time to encode the planning problem in a compact representation.
    long
    Return the parsing time, i.e., the time needed to parser the domain and the problem description.
    long
    Returns the search time, i.e., the time needed to find a solution.
    static double
    millisecondToSecond​(long time)
    Converts a time in milliseconds in seconds.
    void
    Sets the memory used to encode the planning problem in bytes.
    void
    setMemoryUsedToSearch​(long memory)
    Sets the memory used to search the planning problem in bytes.
    void
    setNumberOfActions​(int actions)
    Sets the number of actions of the solved problem .
    void
    Sets the number of relevant facts of the solved problem.
    void
    setProblem​(String problem)
    Sets the path to the file containing the description of the solved problem.
    void
    setTimeToEncode​(long time)
    Sets the encoding time, i.e., the time to encode the planning problem in a compact representation.
    void
    setTimeToParse​(long time)
    Sets the parsing time, i.e., the time needed to parser the domain and the problem description.
    void
    setTimeToSearch​(long time)
    Sets the search time, i.e., the time needed to find a solution.
    Returns a string representation of this statistics.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Statistics

      public Statistics()
      Creates a new statistics object to store statistical information about planner performances. The default statistic values are set to 0.
  • Method Details

    • getProblem

      public final String getProblem()
      Returns the path to the file containing the description of the solved problem.
      Returns:
      the path to the file containing the description of the solved problem.
    • setProblem

      public final void setProblem(String problem)
      Sets the path to the file containing the description of the solved problem.
      Parameters:
      problem - the path to the file containing the description of the solved problem.
    • getMemoryUsedForProblemRepresentation

      public final long getMemoryUsedForProblemRepresentation()
      Returns the memory used to encode the planning problem in bytes.
      Returns:
      the memory used to encode the planning problem.
    • setMemoryUsedForProblemRepresentation

      public void setMemoryUsedForProblemRepresentation(long memory)
      Sets the memory used to encode the planning problem in bytes.
      Parameters:
      memory - the memory used to encode the planning problem in bytes.
    • getMemoryUsedToSearch

      public final long getMemoryUsedToSearch()
      Returns the memory used to search a planning problem in bytes.
      Returns:
      the memory used to search a planning problem.
    • setMemoryUsedToSearch

      public final void setMemoryUsedToSearch(long memory)
      Sets the memory used to search the planning problem in bytes.
      Parameters:
      memory - the memory used to search the planning problem in bytes.
    • getNumberOfActions

      public final int getNumberOfActions()
      Returns the number of actions contained in the solved problem .
      Returns:
      the number of actions contained in the solved problem .
    • setNumberOfActions

      public final void setNumberOfActions(int actions)
      Sets the number of actions of the solved problem .
      Parameters:
      actions - the number of actions of the solved problem .
    • getNumberOfRelevantFluents

      public final int getNumberOfRelevantFluents()
      Returns the number of relevant facts of the solved problem.
      Returns:
      the number of relevant facts of the solved problem.
    • setNumberOfRelevantFluents

      public final void setNumberOfRelevantFluents(int facts)
      Sets the number of relevant facts of the solved problem.
      Parameters:
      facts - the number of relevant facts of the solved problem.
    • getTimeToEncode

      public final long getTimeToEncode()
      Returns the encoding time, i.e., the time to encode the planning problem in a compact representation.
      Returns:
      the encoding time in ms.
    • getTimeToSearch

      public final long getTimeToSearch()
      Returns the search time, i.e., the time needed to find a solution.
      Returns:
      the search time in ms.
    • getTimeToParse

      public final long getTimeToParse()
      Return the parsing time, i.e., the time needed to parser the domain and the problem description.
      Returns:
      the parsing time in ms.
    • setTimeToEncode

      public final void setTimeToEncode(long time)
      Sets the encoding time, i.e., the time to encode the planning problem in a compact representation.
      Parameters:
      time - the encoding time in ms.
    • setTimeToSearch

      public final void setTimeToSearch(long time)
      Sets the search time, i.e., the time needed to find a solution.
      Parameters:
      time - the search time in ms.
    • setTimeToParse

      public final void setTimeToParse(long time)
      Sets the parsing time, i.e., the time needed to parser the domain and the problem description.
      Parameters:
      time - the parsing time in ms.
    • toString

      public String toString()
      Returns a string representation of this statistics.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this statistics.
    • millisecondToSecond

      public static final double millisecondToSecond(long time)
      Converts a time in milliseconds in seconds.
      Parameters:
      time - the time in milliseconds
      Returns:
      the time in seconds.
    • byteToMByte

      public static final double byteToMByte(long size)
      Converts a size in bytes in mega bytes.
      Parameters:
      size - the size in bytes
      Returns:
      the siez in mega bytes.