Package org.optaplanner.benchmark.impl.result

## Class SingleBenchmarkResult

- java.lang.Object
- - org.optaplanner.benchmark.impl.result.SingleBenchmarkResult

- All Implemented Interfaces:
    `BenchmarkResult`

      public class SingleBenchmarkResult
      extends Object
      implements BenchmarkResult

  Represents 1 benchmark for 1 `Solver` configuration for 1 problem instance (data set).

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SingleBenchmarkResult()` |
    `SingleBenchmarkResult​(SolverBenchmarkResult solverBenchmarkResult, ProblemBenchmarkResult problemBenchmarkResult)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `accumulateResults​(BenchmarkReport benchmarkReport)` |
    `protected static SingleBenchmarkResult` | `createMerge​(SolverBenchmarkResult solverBenchmarkResult, ProblemBenchmarkResult problemBenchmarkResult, SingleBenchmarkResult oldResult)` |
    `String` | `getAnchorId()` |
    `Score` | `getAverageScore()` |
    `File` | `getBenchmarkReportDirectory()` |
    `SubSingleBenchmarkResult` | `getBest()` |
    `Integer` | `getFailureCount()` |
    `Integer` | `getInfeasibleScoreCount()` |
    `SubSingleBenchmarkResult` | `getMedian()` |
    `String` | `getName()` |
    `ProblemBenchmarkResult` | `getProblemBenchmarkResult()` |
    `Integer` | `getRanking()` |
    `File` | `getResultDirectory()` |
    `String` | `getResultDirectoryName()` |
    `long` | `getScoreCalculationCount()` |
    `Long` | `getScoreCalculationSpeed()` |
    `String` | `getScoreExplanationSummary()` |
    `String` | `getScoreExplanationSummaryAsHtmlEscaped()` |
    `SolverBenchmarkResult` | `getSolverBenchmarkResult()` |
    `double[]` | `getStandardDeviationDoubles()` |
    `String` | `getStandardDeviationString()` |
    `List<SubSingleBenchmarkResult>` | `getSubSingleBenchmarkResultList()` |
    `int` | `getSubSingleCount()` |
    `SubSingleStatistic` | `getSubSingleStatistic​(ProblemStatisticType problemStatisticType)` |
    `int` | `getSuccessCount()` |
    `long` | `getTimeMillisSpent()` |
    `Score<?>` | `getTotalScore()` |
    `Integer` | `getUninitializedSolutionCount()` |
    `Long` | `getUsedMemoryAfterInputSolution()` |
    `Score<?>` | `getWinningScoreDifference()` |
    `SubSingleBenchmarkResult` | `getWorst()` |
    `Double` | `getWorstScoreCalculationSpeedDifferencePercentage()` |
    `ScoreDifferencePercentage` | `getWorstScoreDifferencePercentage()` |
    `boolean` | `hasAllSuccess()` |
    `boolean` | `hasAnyFailure()` |
    `void` | `initSubSingleStatisticMaps()` |
    `boolean` | `isInitialized()` |
    `boolean` | `isScoreFeasible()` |
    `boolean` | `isWinner()` |
    `void` | `makeDirs()` |
    `void` | `setAverageAndTotalScoreForTesting​(Score<?> averageAndTotalScore)` |
    `void` | `setFailureCount​(Integer failureCount)` |
    `void` | `setProblemBenchmarkResult​(ProblemBenchmarkResult problemBenchmarkResult)` |
    `void` | `setRanking​(Integer ranking)` |
    `void` | `setScoreCalculationCount​(long scoreCalculationCount)` |
    `void` | `setSolverBenchmarkResult​(SolverBenchmarkResult solverBenchmarkResult)` |
    `void` | `setSubSingleBenchmarkResultList​(List<SubSingleBenchmarkResult> subSingleBenchmarkResultList)` |
    `void` | `setTimeMillisSpent​(long timeMillisSpent)` |
    `void` | `setUsedMemoryAfterInputSolution​(Long usedMemoryAfterInputSolution)` |
    `void` | `setWinningScoreDifference​(Score<?> winningScoreDifference)` |
    `void` | `setWorstScoreCalculationSpeedDifferencePercentage​(Double worstScoreCalculationSpeedDifferencePercentage)` |
    `void` | `setWorstScoreDifferencePercentage​(ScoreDifferencePercentage worstScoreDifferencePercentage)` |
    `String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SingleBenchmarkResult

          public SingleBenchmarkResult()

    - #### SingleBenchmarkResult

          public SingleBenchmarkResult​(SolverBenchmarkResult solverBenchmarkResult,
                                       ProblemBenchmarkResult problemBenchmarkResult)

  - ### Method Detail

    - #### initSubSingleStatisticMaps

          public void initSubSingleStatisticMaps()

    - #### getSolverBenchmarkResult

          public SolverBenchmarkResult getSolverBenchmarkResult()

    - #### setSolverBenchmarkResult

          public void setSolverBenchmarkResult​(SolverBenchmarkResult solverBenchmarkResult)

    - #### getProblemBenchmarkResult

          public ProblemBenchmarkResult getProblemBenchmarkResult()

    - #### setProblemBenchmarkResult

          public void setProblemBenchmarkResult​(ProblemBenchmarkResult problemBenchmarkResult)

    - #### getSubSingleBenchmarkResultList

          public List<SubSingleBenchmarkResult> getSubSingleBenchmarkResultList()

    - #### setSubSingleBenchmarkResultList

          public void setSubSingleBenchmarkResultList​(List<SubSingleBenchmarkResult> subSingleBenchmarkResultList)

    - #### getUsedMemoryAfterInputSolution

          public Long getUsedMemoryAfterInputSolution()

      Returns:
        null if `PlannerBenchmarkResult.hasMultipleParallelBenchmarks()` return true

    - #### setUsedMemoryAfterInputSolution

          public void setUsedMemoryAfterInputSolution​(Long usedMemoryAfterInputSolution)

    - #### getFailureCount

          public Integer getFailureCount()

    - #### setFailureCount

          public void setFailureCount​(Integer failureCount)

    - #### getTimeMillisSpent

          public long getTimeMillisSpent()

    - #### setTimeMillisSpent

          public void setTimeMillisSpent​(long timeMillisSpent)

    - #### getScoreCalculationCount

          public long getScoreCalculationCount()

    - #### setScoreCalculationCount

          public void setScoreCalculationCount​(long scoreCalculationCount)

    - #### getScoreExplanationSummary

          public String getScoreExplanationSummary()

    - #### getScoreExplanationSummaryAsHtmlEscaped

          public String getScoreExplanationSummaryAsHtmlEscaped()

    - #### getWinningScoreDifference

          public Score<?> getWinningScoreDifference()

    - #### setWinningScoreDifference

          public void setWinningScoreDifference​(Score<?> winningScoreDifference)

    - #### getWorstScoreDifferencePercentage

          public ScoreDifferencePercentage getWorstScoreDifferencePercentage()

    - #### setWorstScoreDifferencePercentage

          public void setWorstScoreDifferencePercentage​(ScoreDifferencePercentage worstScoreDifferencePercentage)

    - #### getWorstScoreCalculationSpeedDifferencePercentage

          public Double getWorstScoreCalculationSpeedDifferencePercentage()

    - #### setWorstScoreCalculationSpeedDifferencePercentage

          public void setWorstScoreCalculationSpeedDifferencePercentage​(Double worstScoreCalculationSpeedDifferencePercentage)

    - #### getRanking

          public Integer getRanking()

    - #### setRanking

          public void setRanking​(Integer ranking)

    - #### getAverageScore

          public Score getAverageScore()

      Specified by:
        `getAverageScore` in interface `BenchmarkResult`

    - #### setAverageAndTotalScoreForTesting

          public void setAverageAndTotalScoreForTesting​(Score<?> averageAndTotalScore)

    - #### getMedian

          public SubSingleBenchmarkResult getMedian()

    - #### getBest

          public SubSingleBenchmarkResult getBest()

    - #### getWorst

          public SubSingleBenchmarkResult getWorst()

    - #### getStandardDeviationDoubles

          public double[] getStandardDeviationDoubles()

    - #### getInfeasibleScoreCount

          public Integer getInfeasibleScoreCount()

    - #### getUninitializedSolutionCount

          public Integer getUninitializedSolutionCount()

    - #### getTotalScore

          public Score<?> getTotalScore()

    - #### getAnchorId

          public String getAnchorId()

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `BenchmarkResult`
      Returns:
        never null, filename safe

    - #### getBenchmarkReportDirectory

          public File getBenchmarkReportDirectory()

    - #### hasAllSuccess

          public boolean hasAllSuccess()

      Specified by:
        `hasAllSuccess` in interface `BenchmarkResult`
      Returns:
        true if all child benchmarks were a success and the variable is initialized

    - #### isInitialized

          public boolean isInitialized()

    - #### hasAnyFailure

          public boolean hasAnyFailure()

      Specified by:
        `hasAnyFailure` in interface `BenchmarkResult`
      Returns:
        true if there is a failed child benchmark and the variable is initialized

    - #### isScoreFeasible

          public boolean isScoreFeasible()

    - #### getScoreCalculationSpeed

          public Long getScoreCalculationSpeed()

    - #### isWinner

          public boolean isWinner()

    - #### getSubSingleStatistic

          public SubSingleStatistic getSubSingleStatistic​(ProblemStatisticType problemStatisticType)

    - #### getSuccessCount

          public int getSuccessCount()

    - #### getStandardDeviationString

          public String getStandardDeviationString()

    - #### getResultDirectoryName

          public String getResultDirectoryName()

      Specified by:
        `getResultDirectoryName` in interface `BenchmarkResult`
      Returns:
        the name of the directory that holds the benchmark's results

    - #### getResultDirectory

          public File getResultDirectory()

      Specified by:
        `getResultDirectory` in interface `BenchmarkResult`
      Returns:
        the benchmark result directory as a file

    - #### makeDirs

          public void makeDirs()

    - #### getSubSingleCount

          public int getSubSingleCount()

    - #### accumulateResults

          public void accumulateResults​(BenchmarkReport benchmarkReport)

    - #### createMerge

          protected static SingleBenchmarkResult createMerge​(SolverBenchmarkResult solverBenchmarkResult,
                                                             ProblemBenchmarkResult problemBenchmarkResult,
                                                             SingleBenchmarkResult oldResult)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`