mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
add maxOperationTime stats
This commit is contained in:
parent
c2c3062a43
commit
094a04c2ce
1 changed files with 8 additions and 0 deletions
|
|
@ -54,6 +54,8 @@ public class SolutionAnalyser {
|
||||||
private final static String LOAD_DELIVERED = "load-delivered";
|
private final static String LOAD_DELIVERED = "load-delivered";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static class LoadAndActivityCounter implements StateUpdater, ActivityVisitor {
|
private static class LoadAndActivityCounter implements StateUpdater, ActivityVisitor {
|
||||||
|
|
||||||
private final StateManager stateManager;
|
private final StateManager stateManager;
|
||||||
|
|
@ -491,6 +493,8 @@ public class SolutionAnalyser {
|
||||||
private Capacity deliveryLoad;
|
private Capacity deliveryLoad;
|
||||||
private Capacity deliveryLoadAtEnd;
|
private Capacity deliveryLoadAtEnd;
|
||||||
|
|
||||||
|
private double maxOperationTime;
|
||||||
|
|
||||||
|
|
||||||
private Double total_costs;
|
private Double total_costs;
|
||||||
|
|
||||||
|
|
@ -558,6 +562,7 @@ public class SolutionAnalyser {
|
||||||
|
|
||||||
private void recalculateSolutionIndicators() {
|
private void recalculateSolutionIndicators() {
|
||||||
for (VehicleRoute route : solution.getRoutes()) {
|
for (VehicleRoute route : solution.getRoutes()) {
|
||||||
|
maxOperationTime = Math.max(maxOperationTime,getOperationTime(route));
|
||||||
tp_distance += getDistance(route);
|
tp_distance += getDistance(route);
|
||||||
tp_time += getTransportTime(route);
|
tp_time += getTransportTime(route);
|
||||||
waiting_time += getWaitingTime(route);
|
waiting_time += getWaitingTime(route);
|
||||||
|
|
@ -583,6 +588,7 @@ public class SolutionAnalyser {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clearSolutionIndicators() {
|
private void clearSolutionIndicators() {
|
||||||
|
maxOperationTime = 0.;
|
||||||
tp_distance = 0.;
|
tp_distance = 0.;
|
||||||
tp_time = 0.;
|
tp_time = 0.;
|
||||||
waiting_time = 0.;
|
waiting_time = 0.;
|
||||||
|
|
@ -1124,6 +1130,8 @@ public class SolutionAnalyser {
|
||||||
return operation_time;
|
return operation_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Double getMaxOperationTime() { return maxOperationTime; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return total waiting time for specified solution
|
* @return total waiting time for specified solution
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue