@Component class SolverManager extends Object implements org.optaplanner.core.api.solver.event.SolverEventListener<org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution>
Does following:
Solver.solve(Object problem) in a thread that's not the caller's thread.Solver.solver() (in a different thread) to the thread that
interacts with SolverManager.SolutionPublisher.| Modifier and Type | Class and Description |
|---|---|
(package private) static interface |
SolverManager.SolvingTask |
| Constructor and Description |
|---|
SolverManager(org.optaplanner.core.api.solver.Solver<org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution> solver,
org.springframework.core.task.AsyncTaskExecutor executor,
SolutionPublisher solutionPublisher) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
addLocation(org.optaplanner.examples.vehiclerouting.domain.location.Location location) |
(package private) void |
addVehicle(org.optaplanner.examples.vehiclerouting.domain.Vehicle vehicle) |
void |
bestSolutionChanged(org.optaplanner.core.api.solver.event.BestSolutionChangedEvent<org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution> bestSolutionChangedEvent) |
(package private) void |
changeCapacity(org.optaplanner.examples.vehiclerouting.domain.Vehicle vehicle) |
(package private) void |
removeLocation(org.optaplanner.examples.vehiclerouting.domain.location.Location location) |
(package private) void |
removeVehicle(org.optaplanner.examples.vehiclerouting.domain.Vehicle vehicle) |
(package private) void |
startSolver(org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution solution) |
(package private) void |
stopSolver() |
@Autowired
SolverManager(org.optaplanner.core.api.solver.Solver<org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution> solver,
org.springframework.core.task.AsyncTaskExecutor executor,
SolutionPublisher solutionPublisher)
public void bestSolutionChanged(org.optaplanner.core.api.solver.event.BestSolutionChangedEvent<org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution> bestSolutionChangedEvent)
bestSolutionChanged in interface org.optaplanner.core.api.solver.event.SolverEventListener<org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution>void startSolver(org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution solution)
void stopSolver()
void addLocation(org.optaplanner.examples.vehiclerouting.domain.location.Location location)
void removeLocation(org.optaplanner.examples.vehiclerouting.domain.location.Location location)
void addVehicle(org.optaplanner.examples.vehiclerouting.domain.Vehicle vehicle)
void removeVehicle(org.optaplanner.examples.vehiclerouting.domain.Vehicle vehicle)
void changeCapacity(org.optaplanner.examples.vehiclerouting.domain.Vehicle vehicle)
Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.