-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
-
NEW
-
NEW
BEFORE
SolverFactory solverFactory = SolverFactory.createFromXmlResource(
"org/optaplanner/examples/cloudbalancing/solver/cloudBalancingSolverConfig.xml");
Solver solver = solverFactory.buildSolver();
CloudBalance unsolvedCloudBalance = ...;
solver.solve(unsolvedCloudBalance);
CloudBalance solvedCloudBalance = (CloudBalance) solver.getBestSolution();
AFTER version 1
SolverFactory<CloudBalance> solverFactory = SolverFactory.createFromXmlResource(
"org/optaplanner/examples/cloudbalancing/solver/cloudBalancingSolverConfig.xml");
Solver<CloudBalance> solver = solverFactory.buildSolver();
CloudBalance unsolvedCloudBalance = ...;
solver.solve(unsolvedCloudBalance);
CloudBalance solvedCloudBalance = solver.getBestSolution();
AFTER version 2
SolverFactory<CloudBalance> solverFactory = SolverFactory.createFromXmlResource(
"org/optaplanner/examples/cloudbalancing/solver/cloudBalancingSolverConfig.xml");
Solver<CloudBalance> solver = solverFactory.buildSolver();
CloudBalance unsolvedCloudBalance = ...;
CloudBalance solvedCloudBalance = solver.solve(unsolvedCloudBalance);
Note: all this is backwards compatible, BEFORE client code still works too!
- is related to
-
PLANNER-492 Generify ScoreDirector
- Resolved