Package fr.uga.pddl4j.planners
Class Statistics
java.lang.Object
fr.uga.pddl4j.planners.Statistics
- All Implemented Interfaces:
Serializable
The class implements the statistics of the planner, search time, memory used, etc.
- Since:
- 3.0
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new statistics object to store statistical information about planner performances. -
Method Summary
Modifier and TypeMethodDescriptionstatic doublebyteToMByte(long size)Converts a size in bytes in mega bytes.longReturns the memory used to encode the planning problem in bytes.longReturns the memory used to search a planning problem in bytes.intReturns the number of actions contained in the solved problem .intReturns the number of relevant facts of the solved problem.Returns the path to the file containing the description of the solved problem.longReturns the encoding time, i.e., the time to encode the planning problem in a compact representation.longReturn the parsing time, i.e., the time needed to parser the domain and the problem description.longReturns the search time, i.e., the time needed to find a solution.static doublemillisecondToSecond(long time)Converts a time in milliseconds in seconds.voidsetMemoryUsedForProblemRepresentation(long memory)Sets the memory used to encode the planning problem in bytes.voidsetMemoryUsedToSearch(long memory)Sets the memory used to search the planning problem in bytes.voidsetNumberOfActions(int actions)Sets the number of actions of the solved problem .voidsetNumberOfRelevantFluents(int facts)Sets the number of relevant facts of the solved problem.voidsetProblem(String problem)Sets the path to the file containing the description of the solved problem.voidsetTimeToEncode(long time)Sets the encoding time, i.e., the time to encode the planning problem in a compact representation.voidsetTimeToParse(long time)Sets the parsing time, i.e., the time needed to parser the domain and the problem description.voidsetTimeToSearch(long time)Sets the search time, i.e., the time needed to find a solution.toString()Returns a string representation of this statistics.
-
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
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
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
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.
-