Package org.optaplanner.benchmark.impl.result

## Class ProblemBenchmarkResult<Solution_>

- java.lang.Object
- - org.optaplanner.benchmark.impl.result.ProblemBenchmarkResult<Solution_>

-     public class ProblemBenchmarkResult<Solution_>
      extends Object

  Represents 1 problem instance (data set) benchmarked on multiple `Solver` configurations.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected org.slf4j.Logger` | `logger` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ProblemBenchmarkResult​(PlannerBenchmarkResult plannerBenchmarkResult)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `accumulateResults​(BenchmarkReport benchmarkReport)` |
    `protected static <Solution_> Map<ProblemBenchmarkResult,​ProblemBenchmarkResult>` | `createMergeMap​(PlannerBenchmarkResult newPlannerBenchmarkResult, List<SingleBenchmarkResult> singleBenchmarkResultList)` |
    `boolean` | `equals​(Object o)` | Used by `ProblemBenchmarksConfig.buildProblemBenchmarkList(org.optaplanner.core.config.SolverConfigContext, org.optaplanner.benchmark.impl.result.SolverBenchmarkResult, Solution_[])`.
    `List<PureSubSingleStatistic>` | `extractPureSubSingleStatisticList​(SingleStatisticType singleStatisticType)` |
    `Collection<SingleStatisticType>` | `extractSingleStatisticTypeList()` |
    `String` | `findScoreLevelLabel​(int scoreLevel)` |
    `String` | `getAnchorId()` |
    `Long` | `getAverageUsedMemoryAfterInputSolution()` |
    `File` | `getBenchmarkReportDirectory()` |
    `Long` | `getEntityCount()` |
    `Integer` | `getFailureCount()` |
    `Long` | `getInputSolutionLoadingTimeMillisSpent()` |
    `Integer` | `getMaximumSubSingleCount()` |
    `Long` | `getMaximumValueCount()` |
    `String` | `getName()` |
    `PlannerBenchmarkResult` | `getPlannerBenchmarkResult()` |
    `ProblemProvider<Solution_>` | `getProblemProvider()` |
    `File` | `getProblemReportDirectory()` |
    `String` | `getProblemReportDirectoryName()` |
    `Long` | `getProblemScale()` |
    `List<ProblemStatistic>` | `getProblemStatisticList()` |
    `List<SingleBenchmarkResult>` | `getSingleBenchmarkResultList()` |
    `int` | `getTotalSubSingleCount()` |
    `Long` | `getVariableCount()` |
    `SingleBenchmarkResult` | `getWinningSingleBenchmarkResult()` |
    `Long` | `getWorstScoreCalculationSpeed()` |
    `SingleBenchmarkResult` | `getWorstSingleBenchmarkResult()` |
    `boolean` | `hasAnyFailure()` |
    `boolean` | `hasAnyStatistic()` |
    `boolean` | `hasAnySuccess()` |
    `int` | `hashCode()` |
    `boolean` | `hasProblemStatisticType​(ProblemStatisticType problemStatisticType)` |
    `boolean` | `isWriteOutputSolutionEnabled()` |
    `void` | `makeDirs()` |
    `Solution_` | `readProblem()` |
    `void` | `registerScale​(long registeringEntityCount, long registeringVariableCount, long registeringMaximumValueCount, long registeringProblemScale)` | HACK to avoid loading the problem just to extract its problemScale.
    `void` | `setName​(String name)` |
    `void` | `setPlannerBenchmarkResult​(PlannerBenchmarkResult plannerBenchmarkResult)` |
    `void` | `setProblemProvider​(ProblemProvider<Solution_> problemProvider)` |
    `void` | `setProblemStatisticList​(List<ProblemStatistic> problemStatisticList)` |
    `void` | `setSingleBenchmarkResultList​(List<SingleBenchmarkResult> singleBenchmarkResultList)` |
    `void` | `setWriteOutputSolutionEnabled​(boolean writeOutputSolutionEnabled)` |
    `String` | `toString()` |
    `void` | `writeSolution​(SubSingleBenchmarkResult subSingleBenchmarkResult, Solution_ solution)` |

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

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

- - ### Field Detail

    - #### logger

          protected final transient org.slf4j.Logger logger

  - ### Constructor Detail

    - #### ProblemBenchmarkResult

          public ProblemBenchmarkResult​(PlannerBenchmarkResult plannerBenchmarkResult)

  - ### Method Detail

    - #### getPlannerBenchmarkResult

          public PlannerBenchmarkResult getPlannerBenchmarkResult()

    - #### setPlannerBenchmarkResult

          public void setPlannerBenchmarkResult​(PlannerBenchmarkResult plannerBenchmarkResult)

    - #### getName

          public String getName()

      Returns:
        never null, filename safe

    - #### setName

          public void setName​(String name)

    - #### getProblemProvider

          public ProblemProvider<Solution_> getProblemProvider()

    - #### setProblemProvider

          public void setProblemProvider​(ProblemProvider<Solution_> problemProvider)

    - #### isWriteOutputSolutionEnabled

          public boolean isWriteOutputSolutionEnabled()

    - #### setWriteOutputSolutionEnabled

          public void setWriteOutputSolutionEnabled​(boolean writeOutputSolutionEnabled)

    - #### getProblemStatisticList

          public List<ProblemStatistic> getProblemStatisticList()

    - #### setProblemStatisticList

          public void setProblemStatisticList​(List<ProblemStatistic> problemStatisticList)

    - #### getSingleBenchmarkResultList

          public List<SingleBenchmarkResult> getSingleBenchmarkResultList()

    - #### setSingleBenchmarkResultList

          public void setSingleBenchmarkResultList​(List<SingleBenchmarkResult> singleBenchmarkResultList)

    - #### getEntityCount

          public Long getEntityCount()

    - #### getVariableCount

          public Long getVariableCount()

    - #### getMaximumValueCount

          public Long getMaximumValueCount()

    - #### getProblemScale

          public Long getProblemScale()

    - #### getInputSolutionLoadingTimeMillisSpent

          public Long getInputSolutionLoadingTimeMillisSpent()

    - #### getMaximumSubSingleCount

          public Integer getMaximumSubSingleCount()

    - #### getAverageUsedMemoryAfterInputSolution

          public Long getAverageUsedMemoryAfterInputSolution()

    - #### getFailureCount

          public Integer getFailureCount()

    - #### getWinningSingleBenchmarkResult

          public SingleBenchmarkResult getWinningSingleBenchmarkResult()

    - #### getWorstSingleBenchmarkResult

          public SingleBenchmarkResult getWorstSingleBenchmarkResult()

    - #### getWorstScoreCalculationSpeed

          public Long getWorstScoreCalculationSpeed()

    - #### getAnchorId

          public String getAnchorId()

    - #### findScoreLevelLabel

          public String findScoreLevelLabel​(int scoreLevel)

    - #### getBenchmarkReportDirectory

          public File getBenchmarkReportDirectory()

    - #### hasAnyFailure

          public boolean hasAnyFailure()

    - #### hasAnySuccess

          public boolean hasAnySuccess()

    - #### hasAnyStatistic

          public boolean hasAnyStatistic()

    - #### hasProblemStatisticType

          public boolean hasProblemStatisticType​(ProblemStatisticType problemStatisticType)

    - #### extractSingleStatisticTypeList

          public Collection<SingleStatisticType> extractSingleStatisticTypeList()

    - #### extractPureSubSingleStatisticList

          public List<PureSubSingleStatistic> extractPureSubSingleStatisticList​(SingleStatisticType singleStatisticType)

    - #### getProblemReportDirectoryName

          public String getProblemReportDirectoryName()

    - #### getProblemReportDirectory

          public File getProblemReportDirectory()

    - #### makeDirs

          public void makeDirs()

    - #### getTotalSubSingleCount

          public int getTotalSubSingleCount()

    - #### readProblem

          public Solution_ readProblem()

    - #### writeSolution

          public void writeSolution​(SubSingleBenchmarkResult subSingleBenchmarkResult,
                                    Solution_ solution)

    - #### accumulateResults

          public void accumulateResults​(BenchmarkReport benchmarkReport)

    - #### registerScale

          public void registerScale​(long registeringEntityCount,
                                    long registeringVariableCount,
                                    long registeringMaximumValueCount,
                                    long registeringProblemScale)

      HACK to avoid loading the problem just to extract its problemScale. Called multiple times, for every `SingleBenchmarkResult` of this `ProblemBenchmarkResult`.
      Parameters:
        `registeringEntityCount` - `>= 0`
        `registeringVariableCount` - `>= 0`
        `registeringProblemScale` - `>= 0`

    - #### equals

          public boolean equals​(Object o)

      Used by `ProblemBenchmarksConfig.buildProblemBenchmarkList(org.optaplanner.core.config.SolverConfigContext, org.optaplanner.benchmark.impl.result.SolverBenchmarkResult, Solution_[])`.
      Overrides:
        `equals` in class `Object`
      Parameters:
        `o` - sometimes null
      Returns:
        true if equal

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### createMergeMap

          protected static <Solution_> Map<ProblemBenchmarkResult,​ProblemBenchmarkResult> createMergeMap​(PlannerBenchmarkResult newPlannerBenchmarkResult,
                                                                                                               List<SingleBenchmarkResult> singleBenchmarkResultList)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`