mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
add solution stats
This commit is contained in:
parent
6d7087f8ca
commit
682c0b5083
3 changed files with 246 additions and 126 deletions
|
|
@ -129,14 +129,13 @@ public class VRPWithBackhaulsExample2 {
|
|||
System.out.println("operationTime: " + analyser.getOperationTime(route));
|
||||
System.out.println("serviceTime: " + analyser.getServiceTime(route));
|
||||
System.out.println("transportTime: " + analyser.getTransportTime(route));
|
||||
System.out.println("lateArrival: " + analyser.getLateArrivalTimes(route));
|
||||
System.out.println("transportCosts: " + analyser.getVariableTransportCosts(route));
|
||||
System.out.println("fixedCosts: " + analyser.getFixedCosts(route));
|
||||
System.out.println("capViolationOnRoute: " + analyser.getCapacityViolation(route));
|
||||
System.out.println("capViolation@beginning: " + analyser.getCapacityViolationAtBeginning(route));
|
||||
System.out.println("capViolation@end: " + analyser.getCapacityViolationAtEnd(route));
|
||||
System.out.println("timeWindowViolationOnRoute: " + analyser.getTimeWindowViolation(route));
|
||||
System.out.println("skillConstraintViolatedOnRoute: " + analyser.skillConstraintIsViolated(route));
|
||||
System.out.println("skillConstraintViolatedOnRoute: " + analyser.hasSkillConstraintViolation(route));
|
||||
|
||||
System.out.println("dist@" + route.getStart().getLocationId() + ": " + analyser.getDistanceAtActivity(route.getStart(),route));
|
||||
System.out.println("timeWindowViolation@" + route.getStart().getLocationId() + ": " + analyser.getTimeWindowViolationAtActivity(route.getStart(), route));
|
||||
|
|
@ -146,17 +145,29 @@ public class VRPWithBackhaulsExample2 {
|
|||
System.out.println("dist@" + act.getLocationId() + ": " + analyser.getDistanceAtActivity(act,route));
|
||||
System.out.println("load(before)@" + act.getLocationId() + ": " + analyser.getLoadJustBeforeActivity(act,route));
|
||||
System.out.println("load(after)@" + act.getLocationId() + ": " + analyser.getLoadRightAfterActivity(act, route));
|
||||
System.out.println("tooLate@" + act.getLocationId() + ": " + analyser.getLateArrivalTimesAtActivity(act, route));
|
||||
System.out.println("transportCosts@" + act.getLocationId() + ": " + analyser.getVariableTransportCostsAtActivity(act,route));
|
||||
System.out.println("capViolation(after)@" + act.getLocationId() + ": " + analyser.getCapacityViolationAfterActivity(act,route));
|
||||
System.out.println("timeWindowViolation@" + act.getLocationId() + ": " + analyser.getTimeWindowViolationAtActivity(act,route));
|
||||
System.out.println("skillConstraintViolated@" + act.getLocationId() + ": " + analyser.skillConstraintIsViolatedAtActivity(act,route));
|
||||
System.out.println("skillConstraintViolated@" + act.getLocationId() + ": " + analyser.hasSkillConstraintViolationAtActivity(act, route));
|
||||
}
|
||||
System.out.println("--");
|
||||
System.out.println("dist@" + route.getEnd().getLocationId() + ": " + analyser.getDistanceAtActivity(route.getEnd(),route));
|
||||
System.out.println("timeWindowViolation@" + route.getEnd().getLocationId() + ": " + analyser.getTimeWindowViolationAtActivity(route.getEnd(),route));
|
||||
}
|
||||
|
||||
System.out.println("-----");
|
||||
System.out.println("aggreate solution stats");
|
||||
System.out.println("total tp_distance: " + analyser.getDistance());
|
||||
System.out.println("total tp_time: " + analyser.getTransportTime());
|
||||
System.out.println("total waiting_time: " + analyser.getWaitingTime());
|
||||
System.out.println("total service_time: " + analyser.getServiceTime());
|
||||
System.out.println("total operation_time: " + analyser.getOperationTime());
|
||||
System.out.println("total twViolation: " + analyser.getTimeWindowViolation());
|
||||
System.out.println("total capViolation: " + analyser.getCapacityViolation());
|
||||
System.out.println("total fixedCosts: " + analyser.getFixedCosts());
|
||||
System.out.println("total variableCosts: " + analyser.getVariableTransportCosts());
|
||||
System.out.println("total costs: " + analyser.getTotalCosts());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue