1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

Pass executor service (#39)

* pass executor service

* fixes

* fix back
This commit is contained in:
kandelirina 2018-03-13 13:50:18 +02:00 committed by kobyb
parent ac14f2850c
commit 4da11a6c80
2 changed files with 14 additions and 5 deletions

View file

@ -475,9 +475,9 @@ public class VehicleRoutingAlgorithms {
// stateManager.addStateUpdater(new UpdateActivityTimes(vrp.getTransportCosts()));
// stateManager.addStateUpdater(new UpdateVariableCosts(vrp.getActivityCosts(), vrp.getTransportCosts(), stateManager));
/*
/*
* define constraints
*/
*/
//constraint manager
if (constraintManager == null)
constraintManager = new ConstraintManager(vrp, stateManager);
@ -536,13 +536,13 @@ public class VehicleRoutingAlgorithms {
@Override
public void uncaughtException(Thread arg0, Throwable arg1) {
System.err.println(arg1.toString());
log.error("error: {}", arg1.toString());
}
});
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
if (!executorService.isShutdown()) {
System.err.println("shutdowHook shuts down executorService");
log.error("shutdowHook shuts down executorService");
executorService.shutdown();
}
}