Package org.optaplanner.benchmark.api

## Class PlannerBenchmarkFactory

- java.lang.Object
- - org.optaplanner.benchmark.api.PlannerBenchmarkFactory

- Direct Known Subclasses:
    `DefaultPlannerBenchmarkFactory`

      public abstract class PlannerBenchmarkFactory
      extends Object

  Builds `PlannerBenchmark` instances.

  Supports tweaking the configuration programmatically before a `PlannerBenchmark` instance is build.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PlannerBenchmarkFactory()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract PlannerBenchmark` | `buildPlannerBenchmark()` | Creates a new `PlannerBenchmark` instance.
    `<Solution_> PlannerBenchmark` | `buildPlannerBenchmark​(List<Solution_> problemList)` | Creates a new `PlannerBenchmark` instance for datasets that are already in memory.
    `abstract <Solution_> PlannerBenchmark` | `buildPlannerBenchmark​(Solution_... problems)` | Creates a new `PlannerBenchmark` instance for datasets that are already in memory.
    `static PlannerBenchmarkFactory` | `create​(PlannerBenchmarkConfig benchmarkConfig)` | Uses a `PlannerBenchmarkConfig` to build a `PlannerBenchmarkFactory`.
    `static PlannerBenchmarkFactory` | `createFromFreemarkerXmlFile​(File templateFile)` | Reads an Freemarker template rom the file system that generates an XML benchmark configuration and uses that `PlannerBenchmarkConfig` to build a `PlannerBenchmarkFactory`.
    `static PlannerBenchmarkFactory` | `createFromFreemarkerXmlFile​(File templateFile, ClassLoader classLoader)` | As defined by `createFromFreemarkerXmlFile(File)`.
    `static PlannerBenchmarkFactory` | `createFromFreemarkerXmlFile​(File templateFile, Object model)` | As defined by `createFromFreemarkerXmlFile(File)`.
    `static PlannerBenchmarkFactory` | `createFromFreemarkerXmlFile​(File templateFile, Object model, ClassLoader classLoader)` | As defined by `createFromFreemarkerXmlFile(File)`.
    `static PlannerBenchmarkFactory` | `createFromFreemarkerXmlInputStream​(InputStream templateIn)` | Deprecated. in favor of `PlannerBenchmarkConfig.createFromFreemarkerXmlInputStream(InputStream)` and `create(PlannerBenchmarkConfig)`.
    `static PlannerBenchmarkFactory` | `createFromFreemarkerXmlInputStream​(InputStream templateIn, ClassLoader classLoader)` | Deprecated. in favor of `PlannerBenchmarkConfig.createFromFreemarkerXmlInputStream(InputStream, ClassLoader)` and `create(PlannerBenchmarkConfig)`.
    `static PlannerBenchmarkFactory` | `createFromFreemarkerXmlInputStream​(InputStream templateIn, Object model)` | Deprecated. in favor of `PlannerBenchmarkConfig.createFromFreemarkerXmlInputStream(InputStream, Object)` and `create(PlannerBenchmarkConfig)`.
    `static PlannerBenchmarkFactory` | `createFromFreemarkerXmlInputStream​(InputStream templateIn, Object model, ClassLoader classLoader)` | Deprecated. in favor of `PlannerBenchmarkConfig.createFromFreemarkerXmlInputStream(InputStream, Object, ClassLoader)` and `create(PlannerBenchmarkConfig)`.
    `static PlannerBenchmarkFactory` | `createFromFreemarkerXmlReader​(Reader templateReader)` | Deprecated. in favor of `PlannerBenchmarkConfig.createFromFreemarkerXmlReader(Reader)` and `create(PlannerBenchmarkConfig)`.
    `static PlannerBenchmarkFactory` | `createFromFreemarkerXmlReader​(Reader templateReader, ClassLoader classLoader)` | Deprecated. in favor of `PlannerBenchmarkConfig.createFromFreemarkerXmlReader(Reader, ClassLoader)` and `create(PlannerBenchmarkConfig)`.
    `static PlannerBenchmarkFactory` | `createFromFreemarkerXmlReader​(Reader templateReader, Object model)` | Deprecated. in favor of `PlannerBenchmarkConfig.createFromFreemarkerXmlReader(Reader, Object)` and `create(PlannerBenchmarkConfig)`.
    `static PlannerBenchmarkFactory` | `createFromFreemarkerXmlReader​(Reader templateReader, Object model, ClassLoader classLoader)` | Deprecated. in favor of `PlannerBenchmarkConfig.createFromFreemarkerXmlReader(Reader, Object, ClassLoader)` and `create(PlannerBenchmarkConfig)`.
    `static PlannerBenchmarkFactory` | `createFromFreemarkerXmlResource​(String templateResource)` | Reads an Freemarker template from the classpath that generates an XML benchmark configuration and uses that `PlannerBenchmarkConfig` to build a `PlannerBenchmarkFactory`.
    `static PlannerBenchmarkFactory` | `createFromFreemarkerXmlResource​(String templateResource, ClassLoader classLoader)` | As defined by `createFromFreemarkerXmlResource(String)`.
    `static PlannerBenchmarkFactory` | `createFromFreemarkerXmlResource​(String templateResource, Object model)` | As defined by `createFromFreemarkerXmlResource(String)`.
    `static PlannerBenchmarkFactory` | `createFromFreemarkerXmlResource​(String templateResource, Object model, ClassLoader classLoader)` | As defined by `createFromFreemarkerXmlResource(String)`.
    `static PlannerBenchmarkFactory` | `createFromKieContainerXmlResource​(String benchmarkConfigResource)` | Creates a new `PlannerBenchmarkFactory` that uses `KieServices.getKieClasspathContainer()`.
    `static PlannerBenchmarkFactory` | `createFromKieContainerXmlResource​(org.kie.api.builder.ReleaseId releaseId, String benchmarkConfigResource)` | Creates a new `PlannerBenchmarkFactory` that uses a `KieModule` represented by its releaseId.
    `static PlannerBenchmarkFactory` | `createFromKieContainerXmlResource​(org.kie.api.runtime.KieContainer kieContainer, String benchmarkConfigResource)` | Creates a new `PlannerBenchmarkFactory` that uses a `KieModule` wrapped by a `KieContainer`.
    `static PlannerBenchmarkFactory` | `createFromSolverConfigXmlResource​(String solverConfigResource)` | Reads an XML solver configuration from the classpath and uses that `SolverConfig` to build a `PlannerBenchmarkConfig` that in turn is used to build a `PlannerBenchmarkFactory`.
    `static PlannerBenchmarkFactory` | `createFromSolverConfigXmlResource​(String solverConfigResource, File benchmarkDirectory)` | As defined by `createFromSolverConfigXmlResource(String)`.
    `static PlannerBenchmarkFactory` | `createFromSolverConfigXmlResource​(String solverConfigResource, File benchmarkDirectory, ClassLoader classLoader)` | As defined by `createFromSolverConfigXmlResource(String)`.
    `static PlannerBenchmarkFactory` | `createFromSolverConfigXmlResource​(String solverConfigResource, ClassLoader classLoader)` | As defined by `createFromSolverConfigXmlResource(String)`.
    `static <Solution_> PlannerBenchmarkFactory` | `createFromSolverFactory​(SolverFactory<Solution_> solverFactory)` | Deprecated. in favor of `createFromSolverConfigXmlResource(String)` or in complex cases `PlannerBenchmarkConfig.createFromSolverConfig(SolverConfig)` and `create(PlannerBenchmarkConfig)`.
    `static <Solution_> PlannerBenchmarkFactory` | `createFromSolverFactory​(SolverFactory<Solution_> solverFactory, File benchmarkDirectory)` | Deprecated. in favor of `createFromSolverConfigXmlResource(String, File)`.
    `static PlannerBenchmarkFactory` | `createFromXmlFile​(File benchmarkConfigFile)` | Reads an XML benchmark configuration from the file system and uses that `PlannerBenchmarkConfig` to build a `PlannerBenchmarkFactory`.
    `static PlannerBenchmarkFactory` | `createFromXmlFile​(File benchmarkConfigFile, ClassLoader classLoader)` | As defined by `createFromXmlFile(File)`.
    `static PlannerBenchmarkFactory` | `createFromXmlInputStream​(InputStream in)` | Deprecated. in favor of `PlannerBenchmarkConfig.createFromXmlInputStream(InputStream)` and `create(PlannerBenchmarkConfig)`.
    `static PlannerBenchmarkFactory` | `createFromXmlInputStream​(InputStream in, ClassLoader classLoader)` | Deprecated. in favor of `PlannerBenchmarkConfig.createFromXmlInputStream(InputStream, ClassLoader)` and `create(PlannerBenchmarkConfig)`.
    `static PlannerBenchmarkFactory` | `createFromXmlReader​(Reader reader)` | Deprecated. in favor of `PlannerBenchmarkConfig.createFromXmlReader(Reader)` and `create(PlannerBenchmarkConfig)`.
    `static PlannerBenchmarkFactory` | `createFromXmlReader​(Reader reader, ClassLoader classLoader)` | Deprecated. in favor of `PlannerBenchmarkConfig.createFromXmlReader(Reader, ClassLoader)` and `create(PlannerBenchmarkConfig)`.
    `static PlannerBenchmarkFactory` | `createFromXmlResource​(String benchmarkConfigResource)` | Reads an XML benchmark configuration from the classpath and uses that `PlannerBenchmarkConfig` to build a `PlannerBenchmarkFactory`.
    `static PlannerBenchmarkFactory` | `createFromXmlResource​(String benchmarkConfigResource, ClassLoader classLoader)` | As defined by `createFromXmlResource(String)`.
    `abstract PlannerBenchmarkConfig` | `getPlannerBenchmarkConfig()` | Deprecated. in favor of `PlannerBenchmarkConfig()` and `create(PlannerBenchmarkConfig)`.

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

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

- - ### Constructor Detail

    - #### PlannerBenchmarkFactory

          public PlannerBenchmarkFactory()

  - ### Method Detail

    - #### createFromSolverConfigXmlResource

          public static PlannerBenchmarkFactory createFromSolverConfigXmlResource​(String solverConfigResource)

      Reads an XML solver configuration from the classpath and uses that `SolverConfig` to build a `PlannerBenchmarkConfig` that in turn is used to build a `PlannerBenchmarkFactory`. The XML root element must be `<solver>`.

      To read an XML benchmark configuration instead, use `createFromXmlResource(String)`.

      Parameters:
        `solverConfigResource` - never null, a classpath resource as defined by `ClassLoader.getResource(String)`

    - #### createFromSolverConfigXmlResource

          public static PlannerBenchmarkFactory createFromSolverConfigXmlResource​(String solverConfigResource,
                                                                                  ClassLoader classLoader)

      As defined by `createFromSolverConfigXmlResource(String)`.
      Parameters:
        `solverConfigResource` - never null, a classpath resource as defined by `ClassLoader.getResource(String)`.
        `classLoader` - sometimes null, the `ClassLoader` to use for loading all resources and `Class`es, null to use the default `ClassLoader`

    - #### createFromSolverConfigXmlResource

          public static PlannerBenchmarkFactory createFromSolverConfigXmlResource​(String solverConfigResource,
                                                                                  File benchmarkDirectory)

      As defined by `createFromSolverConfigXmlResource(String)`.
      Parameters:
        `solverConfigResource` - never null, a classpath resource as defined by `ClassLoader.getResource(String)`
        `benchmarkDirectory` - never null

    - #### createFromSolverConfigXmlResource

          public static PlannerBenchmarkFactory createFromSolverConfigXmlResource​(String solverConfigResource,
                                                                                  File benchmarkDirectory,
                                                                                  ClassLoader classLoader)

      As defined by `createFromSolverConfigXmlResource(String)`.
      Parameters:
        `solverConfigResource` - never null, a classpath resource as defined by `ClassLoader.getResource(String)`
        `benchmarkDirectory` - never null
        `classLoader` - sometimes null, the `ClassLoader` to use for loading all resources and `Class`es, null to use the default `ClassLoader`

    - #### createFromSolverFactory

          @Deprecated
          public static <Solution_> PlannerBenchmarkFactory createFromSolverFactory​(SolverFactory<Solution_> solverFactory)

      Deprecated.
      in favor of `createFromSolverConfigXmlResource(String)` or in complex cases `PlannerBenchmarkConfig.createFromSolverConfig(SolverConfig)` and `create(PlannerBenchmarkConfig)`. Will be removed in 8.0.
      Type Parameters:
        `Solution_` - the solution type, the class with the `PlanningSolution` annotation
      Parameters:
        `solverFactory` - never null, also its `ClassLoader` is reused if any was configured during creation

    - #### createFromSolverFactory

          @Deprecated
          public static <Solution_> PlannerBenchmarkFactory createFromSolverFactory​(SolverFactory<Solution_> solverFactory,
                                                                                    File benchmarkDirectory)

      Deprecated.
      in favor of `createFromSolverConfigXmlResource(String, File)`. or in complex cases `PlannerBenchmarkConfig.createFromSolverConfig(SolverConfig, File)` and `create(PlannerBenchmarkConfig)`. Will be removed in 8.0.
      Type Parameters:
        `Solution_` - the solution type, the class with the `PlanningSolution` annotation
      Parameters:
        `solverFactory` - never null, also its `ClassLoader` is reused if any was configured during creation
        `benchmarkDirectory` - never null

    - #### createFromXmlResource

          public static PlannerBenchmarkFactory createFromXmlResource​(String benchmarkConfigResource)

      Reads an XML benchmark configuration from the classpath and uses that `PlannerBenchmarkConfig` to build a `PlannerBenchmarkFactory`. The XML root element must be `<plannerBenchmark>`.

      To read an XML solver configuration instead, use `createFromSolverConfigXmlResource(String)`.

      Parameters:
        `benchmarkConfigResource` - never null, a classpath resource as defined by `ClassLoader.getResource(String)`
      Returns:
        never null

    - #### createFromXmlResource

          public static PlannerBenchmarkFactory createFromXmlResource​(String benchmarkConfigResource,
                                                                      ClassLoader classLoader)

      As defined by `createFromXmlResource(String)`.
      Parameters:
        `benchmarkConfigResource` - never null, a classpath resource as defined by `ClassLoader.getResource(String)`
        `classLoader` - sometimes null, the `ClassLoader` to use for loading all resources and `Class`es, null to use the default `ClassLoader`
      Returns:
        never null

    - #### createFromXmlFile

          public static PlannerBenchmarkFactory createFromXmlFile​(File benchmarkConfigFile)

      Reads an XML benchmark configuration from the file system and uses that `PlannerBenchmarkConfig` to build a `PlannerBenchmarkFactory`.

      Warning: this leads to platform dependent code, it's recommend to use `createFromXmlResource(String)` instead.

      Parameters:
        `benchmarkConfigFile` - never null
      Returns:
        never null

    - #### createFromXmlFile

          public static PlannerBenchmarkFactory createFromXmlFile​(File benchmarkConfigFile,
                                                                  ClassLoader classLoader)

      As defined by `createFromXmlFile(File)`.
      Parameters:
        `benchmarkConfigFile` - never null
        `classLoader` - sometimes null, the `ClassLoader` to use for loading all resources and `Class`es, null to use the default `ClassLoader`
      Returns:
        never null

    - #### createFromXmlInputStream

          @Deprecated
          public static PlannerBenchmarkFactory createFromXmlInputStream​(InputStream in)

      Deprecated.
      in favor of `PlannerBenchmarkConfig.createFromXmlInputStream(InputStream)` and `create(PlannerBenchmarkConfig)`. Will be removed in 8.0.
      Parameters:
        `in` - never null, gets closed
      Returns:
        never null

    - #### createFromXmlInputStream

          @Deprecated
          public static PlannerBenchmarkFactory createFromXmlInputStream​(InputStream in,
                                                                         ClassLoader classLoader)

      Deprecated.
      in favor of `PlannerBenchmarkConfig.createFromXmlInputStream(InputStream, ClassLoader)` and `create(PlannerBenchmarkConfig)`. Will be removed in 8.0.
      Parameters:
        `in` - never null, gets closed
        `classLoader` - sometimes null, the `ClassLoader` to use for loading all resources and `Class`es, null to use the default `ClassLoader`
      Returns:
        never null

    - #### createFromXmlReader

          @Deprecated
          public static PlannerBenchmarkFactory createFromXmlReader​(Reader reader)

      Deprecated.
      in favor of `PlannerBenchmarkConfig.createFromXmlReader(Reader)` and `create(PlannerBenchmarkConfig)`. Will be removed in 8.0.
      Parameters:
        `reader` - never null, gets closed
      Returns:
        never null

    - #### createFromXmlReader

          @Deprecated
          public static PlannerBenchmarkFactory createFromXmlReader​(Reader reader,
                                                                    ClassLoader classLoader)

      Deprecated.
      in favor of `PlannerBenchmarkConfig.createFromXmlReader(Reader, ClassLoader)` and `create(PlannerBenchmarkConfig)`. Will be removed in 8.0.
      Parameters:
        `reader` - never null, gets closed
        `classLoader` - sometimes null, the `ClassLoader` to use for loading all resources and `Class`es, null to use the default `ClassLoader`
      Returns:
        never null

    - #### createFromFreemarkerXmlResource

          public static PlannerBenchmarkFactory createFromFreemarkerXmlResource​(String templateResource)

      Reads an Freemarker template from the classpath that generates an XML benchmark configuration and uses that `PlannerBenchmarkConfig` to build a `PlannerBenchmarkFactory`. The generated XML root element must be `<plannerBenchmark>`.
      Parameters:
        `templateResource` - never null, a classpath resource as defined by `ClassLoader.getResource(String)`
      Returns:
        never null
      See Also:
        `createFromFreemarkerXmlResource(String)`

    - #### createFromFreemarkerXmlResource

          public static PlannerBenchmarkFactory createFromFreemarkerXmlResource​(String templateResource,
                                                                                ClassLoader classLoader)

      As defined by `createFromFreemarkerXmlResource(String)`.
      Parameters:
        `templateResource` - never null, a classpath resource as defined by `ClassLoader.getResource(String)`
        `classLoader` - sometimes null, the `ClassLoader` to use for loading all resources and `Class`es, null to use the default `ClassLoader`
      Returns:
        never null

    - #### createFromFreemarkerXmlResource

          public static PlannerBenchmarkFactory createFromFreemarkerXmlResource​(String templateResource,
                                                                                Object model)

      As defined by `createFromFreemarkerXmlResource(String)`.
      Parameters:
        `templateResource` - never null, a classpath resource as defined by `ClassLoader.getResource(String)`
        `model` - sometimes null
      Returns:
        never null

    - #### createFromFreemarkerXmlResource

          public static PlannerBenchmarkFactory createFromFreemarkerXmlResource​(String templateResource,
                                                                                Object model,
                                                                                ClassLoader classLoader)

      As defined by `createFromFreemarkerXmlResource(String)`.
      Parameters:
        `templateResource` - never null, a classpath resource as defined by `ClassLoader.getResource(String)`
        `model` - sometimes null
        `classLoader` - sometimes null, the `ClassLoader` to use for loading all resources and `Class`es, null to use the default `ClassLoader`
      Returns:
        never null

    - #### createFromFreemarkerXmlFile

          public static PlannerBenchmarkFactory createFromFreemarkerXmlFile​(File templateFile)

      Reads an Freemarker template rom the file system that generates an XML benchmark configuration and uses that `PlannerBenchmarkConfig` to build a `PlannerBenchmarkFactory`. The generated XML root element must be `<plannerBenchmark>`.

      Warning: this leads to platform dependent code, it's recommend to use `createFromFreemarkerXmlResource(String)` instead.

      Parameters:
        `templateFile` - never null
      Returns:
        never null

    - #### createFromFreemarkerXmlFile

          public static PlannerBenchmarkFactory createFromFreemarkerXmlFile​(File templateFile,
                                                                            ClassLoader classLoader)

      As defined by `createFromFreemarkerXmlFile(File)`.
      Parameters:
        `templateFile` - never null
        `classLoader` - sometimes null, the `ClassLoader` to use for loading all resources and `Class`es, null to use the default `ClassLoader`
      Returns:
        never null

    - #### createFromFreemarkerXmlFile

          public static PlannerBenchmarkFactory createFromFreemarkerXmlFile​(File templateFile,
                                                                            Object model)

      As defined by `createFromFreemarkerXmlFile(File)`.
      Parameters:
        `templateFile` - never null
        `model` - sometimes null
      Returns:
        never null

    - #### createFromFreemarkerXmlFile

          public static PlannerBenchmarkFactory createFromFreemarkerXmlFile​(File templateFile,
                                                                            Object model,
                                                                            ClassLoader classLoader)

      As defined by `createFromFreemarkerXmlFile(File)`.
      Parameters:
        `templateFile` - never null
        `model` - sometimes null
        `classLoader` - sometimes null, the `ClassLoader` to use for loading all resources and `Class`es, null to use the default `ClassLoader`
      Returns:
        never null

    - #### createFromFreemarkerXmlInputStream

          @Deprecated
          public static PlannerBenchmarkFactory createFromFreemarkerXmlInputStream​(InputStream templateIn)

      Deprecated.
      in favor of `PlannerBenchmarkConfig.createFromFreemarkerXmlInputStream(InputStream)` and `create(PlannerBenchmarkConfig)`. Will be removed in 8.0.
      Parameters:
        `templateIn` - never null, gets closed
      Returns:
        never null

    - #### createFromFreemarkerXmlInputStream

          @Deprecated
          public static PlannerBenchmarkFactory createFromFreemarkerXmlInputStream​(InputStream templateIn,
                                                                                   ClassLoader classLoader)

      Deprecated.
      in favor of `PlannerBenchmarkConfig.createFromFreemarkerXmlInputStream(InputStream, ClassLoader)` and `create(PlannerBenchmarkConfig)`. Will be removed in 8.0.
      Parameters:
        `templateIn` - never null, gets closed
        `classLoader` - sometimes null, the `ClassLoader` to use for loading all resources and `Class`es, null to use the default `ClassLoader`
      Returns:
        never null

    - #### createFromFreemarkerXmlInputStream

          @Deprecated
          public static PlannerBenchmarkFactory createFromFreemarkerXmlInputStream​(InputStream templateIn,
                                                                                   Object model)

      Deprecated.
      in favor of `PlannerBenchmarkConfig.createFromFreemarkerXmlInputStream(InputStream, Object)` and `create(PlannerBenchmarkConfig)`. Will be removed in 8.0.
      Parameters:
        `templateIn` - never null, gets closed
        `model` - sometimes null
      Returns:
        never null

    - #### createFromFreemarkerXmlInputStream

          @Deprecated
          public static PlannerBenchmarkFactory createFromFreemarkerXmlInputStream​(InputStream templateIn,
                                                                                   Object model,
                                                                                   ClassLoader classLoader)

      Deprecated.
      in favor of `PlannerBenchmarkConfig.createFromFreemarkerXmlInputStream(InputStream, Object, ClassLoader)` and `create(PlannerBenchmarkConfig)`. Will be removed in 8.0.
      Parameters:
        `templateIn` - never null, gets closed
        `model` - sometimes null
        `classLoader` - sometimes null, the `ClassLoader` to use for loading all resources and `Class`es, null to use the default `ClassLoader`
      Returns:
        never null

    - #### createFromFreemarkerXmlReader

          @Deprecated
          public static PlannerBenchmarkFactory createFromFreemarkerXmlReader​(Reader templateReader)

      Deprecated.
      in favor of `PlannerBenchmarkConfig.createFromFreemarkerXmlReader(Reader)` and `create(PlannerBenchmarkConfig)`. Will be removed in 8.0.
      Parameters:
        `templateReader` - never null, gets closed
      Returns:
        never null

    - #### createFromFreemarkerXmlReader

          @Deprecated
          public static PlannerBenchmarkFactory createFromFreemarkerXmlReader​(Reader templateReader,
                                                                              ClassLoader classLoader)

      Deprecated.
      in favor of `PlannerBenchmarkConfig.createFromFreemarkerXmlReader(Reader, ClassLoader)` and `create(PlannerBenchmarkConfig)`. Will be removed in 8.0.
      Parameters:
        `templateReader` - never null, gets closed
        `classLoader` - sometimes null, the `ClassLoader` to use for loading all resources and `Class`es, null to use the default `ClassLoader`
      Returns:
        never null

    - #### createFromFreemarkerXmlReader

          @Deprecated
          public static PlannerBenchmarkFactory createFromFreemarkerXmlReader​(Reader templateReader,
                                                                              Object model)

      Deprecated.
      in favor of `PlannerBenchmarkConfig.createFromFreemarkerXmlReader(Reader, Object)` and `create(PlannerBenchmarkConfig)`. Will be removed in 8.0.
      Parameters:
        `templateReader` - never null, gets closed
        `model` - sometimes null
      Returns:
        never null

    - #### createFromFreemarkerXmlReader

          @Deprecated
          public static PlannerBenchmarkFactory createFromFreemarkerXmlReader​(Reader templateReader,
                                                                              Object model,
                                                                              ClassLoader classLoader)

      Deprecated.
      in favor of `PlannerBenchmarkConfig.createFromFreemarkerXmlReader(Reader, Object, ClassLoader)` and `create(PlannerBenchmarkConfig)`. Will be removed in 8.0.
      Parameters:
        `templateReader` - never null, gets closed
        `model` - sometimes null
        `classLoader` - sometimes null, the `ClassLoader` to use for loading all resources and `Class`es, null to use the default `ClassLoader`
      Returns:
        never null

    - #### create

          public static PlannerBenchmarkFactory create​(PlannerBenchmarkConfig benchmarkConfig)

      Uses a `PlannerBenchmarkConfig` to build a `PlannerBenchmarkFactory`. If you don't need to manipulate the `PlannerBenchmarkConfig` programmatically, use `createFromXmlResource(String)` instead.
      Parameters:
        `benchmarkConfig` - never null
      Returns:
        never null

    - #### createFromKieContainerXmlResource

          public static PlannerBenchmarkFactory createFromKieContainerXmlResource​(String benchmarkConfigResource)

      Creates a new `PlannerBenchmarkFactory` that uses `KieServices.getKieClasspathContainer()`.
      Parameters:
        `benchmarkConfigResource` - never null, a classpath resource in the `KieContainer` as defined by `ClassLoader.getResource(String)`
      Returns:
        never null

    - #### createFromKieContainerXmlResource

          public static PlannerBenchmarkFactory createFromKieContainerXmlResource​(org.kie.api.builder.ReleaseId releaseId,
                                                                                  String benchmarkConfigResource)

      Creates a new `PlannerBenchmarkFactory` that uses a `KieModule` represented by its releaseId.
      Parameters:
        `releaseId` - never null
        `benchmarkConfigResource` - never null, a classpath resource in the `KieContainer` as defined by `ClassLoader.getResource(String)`
      Returns:
        never null

    - #### createFromKieContainerXmlResource

          public static PlannerBenchmarkFactory createFromKieContainerXmlResource​(org.kie.api.runtime.KieContainer kieContainer,
                                                                                  String benchmarkConfigResource)

      Creates a new `PlannerBenchmarkFactory` that uses a `KieModule` wrapped by a `KieContainer`.
      Parameters:
        `kieContainer` - never null
        `benchmarkConfigResource` - never null, a classpath resource in the `KieContainer` as defined by `ClassLoader.getResource(String)`
      Returns:
        never null

    - #### buildPlannerBenchmark

          public abstract PlannerBenchmark buildPlannerBenchmark()

      Creates a new `PlannerBenchmark` instance.
      Returns:
        never null

    - #### buildPlannerBenchmark

          public <Solution_> PlannerBenchmark buildPlannerBenchmark​(List<Solution_> problemList)

      Creates a new `PlannerBenchmark` instance for datasets that are already in memory.
      Type Parameters:
        `Solution_` - the solution type, the class with the `PlanningSolution` annotation
      Parameters:
        `problemList` - never null, can be empty
      Returns:
        never null

    - #### buildPlannerBenchmark

          public abstract <Solution_> PlannerBenchmark buildPlannerBenchmark​(Solution_... problems)

      Creates a new `PlannerBenchmark` instance for datasets that are already in memory.
      Type Parameters:
        `Solution_` - the solution type, the class with the `PlanningSolution` annotation
      Parameters:
        `problems` - never null, can be none
      Returns:
        never null

    - #### getPlannerBenchmarkConfig

          @Deprecated
          public abstract PlannerBenchmarkConfig getPlannerBenchmarkConfig()

      Deprecated.
      in favor of `PlannerBenchmarkConfig()` and `create(PlannerBenchmarkConfig)`. Will be removed in 8.0.
      Deprecated. To configure a `PlannerBenchmarkFactory` dynamically (without parsing XML each time), use `create(PlannerBenchmarkConfig)` instead.

      This method is not thread-safe.

      Returns:
        never null