@Component(value="optaweb-solver-manager") class SolverManager extends Object implements org.optaplanner.core.api.solver.event.SolverEventListener<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.RouteChangedEventPublisher.| Modifier and Type | Class and Description |
|---|---|
(package private) static interface |
SolverManager.SolvingTask
An alias interface that fixates the Callable's type parameter.
|
| Constructor and Description |
|---|
SolverManager(org.optaplanner.core.api.solver.Solver<VehicleRoutingSolution> solver,
org.springframework.core.task.AsyncListenableTaskExecutor executor,
RouteChangedEventPublisher routeChangedEventPublisher,
org.springframework.context.ApplicationEventPublisher eventPublisher) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
addVehicle(PlanningVehicle vehicle) |
(package private) void |
addVisit(PlanningVisit visit) |
void |
bestSolutionChanged(org.optaplanner.core.api.solver.event.BestSolutionChangedEvent<VehicleRoutingSolution> bestSolutionChangedEvent) |
(package private) void |
changeCapacity(PlanningVehicle vehicle) |
(package private) void |
removeVehicle(PlanningVehicle vehicle) |
(package private) void |
removeVisit(PlanningVisit visit) |
(package private) void |
startSolver(VehicleRoutingSolution solution) |
(package private) void |
stopSolver() |
@Autowired SolverManager(org.optaplanner.core.api.solver.Solver<VehicleRoutingSolution> solver, org.springframework.core.task.AsyncListenableTaskExecutor executor, RouteChangedEventPublisher routeChangedEventPublisher, org.springframework.context.ApplicationEventPublisher eventPublisher)
public void bestSolutionChanged(org.optaplanner.core.api.solver.event.BestSolutionChangedEvent<VehicleRoutingSolution> bestSolutionChangedEvent)
bestSolutionChanged in interface org.optaplanner.core.api.solver.event.SolverEventListener<VehicleRoutingSolution>void startSolver(VehicleRoutingSolution solution)
void stopSolver()
void addVisit(PlanningVisit visit)
void removeVisit(PlanningVisit visit)
void addVehicle(PlanningVehicle vehicle)
void removeVehicle(PlanningVehicle vehicle)
void changeCapacity(PlanningVehicle vehicle)
Copyright © 2001–2021 JBoss by Red Hat. All rights reserved.