Solution_
- the solution type, the class with the PlanningSolution
annotationpublic final class DefaultSolverFactory<Solution_> extends SolverFactory<Solution_>
SolverFactory
Constructor and Description |
---|
DefaultSolverFactory(SolverConfig solverConfig) |
DefaultSolverFactory(SolverConfig solverConfig,
SolverConfigContext solverConfigContext) |
Modifier and Type | Method and Description |
---|---|
Solver<Solution_> |
buildSolver()
Creates a new
Solver instance. |
SolverFactory<Solution_> |
cloneSolverFactory()
Deprecated.
|
ScoreDirectorFactory<Solution_> |
getScoreDirectorFactory()
Useful to reuse the
Score calculation (for example in a UI)
and to explain the Score to the user
with the ConstraintMatchTotal and Indictment API. |
SolverConfig |
getSolverConfig()
Deprecated.
|
SolverConfigContext |
getSolverConfigContext() |
create, createEmpty, createEmpty, createEmptyFromKieContainer, createEmptyFromKieContainer, createFromKieContainer, createFromKieContainerXmlResource, createFromKieContainerXmlResource, createFromKieContainerXmlResource, createFromXmlFile, createFromXmlFile, createFromXmlInputStream, createFromXmlInputStream, createFromXmlReader, createFromXmlReader, createFromXmlResource, createFromXmlResource
public DefaultSolverFactory(SolverConfig solverConfig)
public DefaultSolverFactory(SolverConfig solverConfig, SolverConfigContext solverConfigContext)
public Solver<Solution_> buildSolver()
SolverFactory
Solver
instance.buildSolver
in class SolverFactory<Solution_>
public ScoreDirectorFactory<Solution_> getScoreDirectorFactory()
SolverFactory
Score
calculation (for example in a UI)
and to explain the Score
to the user
with the ConstraintMatchTotal
and Indictment
API.getScoreDirectorFactory
in class SolverFactory<Solution_>
@Deprecated public SolverConfig getSolverConfig()
SolverFactory
SolverFactory
dynamically (without parsing XML each time),
use SolverFactory.create(SolverConfig)
instead.
This method is not thread-safe. To configure a SolverConfig
differently for parallel requests,
build a template SolverFactory
from XML
and clone it SolverFactory.cloneSolverFactory()
for each request, before before calling this method.
getSolverConfig
in class SolverFactory<Solution_>
@Deprecated public SolverFactory<Solution_> cloneSolverFactory()
SolverFactory
SolverFactory
dynamically (without parsing XML each time),
use SolverConfig(SolverConfig)
and SolverFactory.create(SolverConfig)
instead.
Build a SolverFactory
quickly (without parsing XML) that builds the exact same Solver
with SolverFactory.buildSolver()
, but can also be modified with SolverFactory.getSolverConfig()
to build a different
Solver
without affecting the original SolverFactory
.
cloneSolverFactory
in class SolverFactory<Solution_>
SolverFactory
subclass implementation than this instancepublic SolverConfigContext getSolverConfigContext()
Copyright © 2006–2021 JBoss by Red Hat. All rights reserved.