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

add and test skill constraint violation checks

This commit is contained in:
oblonski 2014-10-07 12:54:58 +02:00
parent c788b477b6
commit 04b52759e5
2 changed files with 2 additions and 7 deletions

View file

@ -136,7 +136,7 @@ public class VRPWithBackhaulsExample2 {
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("dist@" + route.getStart().getLocationId() + ": " + analyser.getDistanceAtActivity(route.getStart(),route));
System.out.println("timeWindowViolation@" + route.getStart().getLocationId() + ": " + analyser.getTimeWindowViolationAtActivity(route.getStart(), route));
@ -150,6 +150,7 @@ public class VRPWithBackhaulsExample2 {
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("--");
System.out.println("dist@" + route.getEnd().getLocationId() + ": " + analyser.getDistanceAtActivity(route.getEnd(),route));