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

make ClusterRuin deal with jobs without location - #170

This commit is contained in:
oblonski 2015-08-06 18:13:34 +02:00
parent 11eb5dc983
commit 87bc74e180
5 changed files with 77 additions and 30 deletions

View file

@ -55,11 +55,11 @@ public class VariableStartAndWaitingTimeExample {
VehicleImpl v2 = VehicleImpl.Builder.newInstance("v2").setType(type).setReturnToDepot(true)
.setStartLocation(Location.newInstance(0, 0))
.setEarliestStart(0).setLatestArrival(500)
.setBreak((Break) Break.Builder.newInstance("v2-break").setTimeWindow(TimeWindow.newInstance(100,150)).setServiceTime(50).build())
.setBreak((Break) Break.Builder.newInstance("v2-break").setTimeWindow(TimeWindow.newInstance(60,80)).setServiceTime(50).build())
.build();
VehicleImpl v3 = VehicleImpl.Builder.newInstance("v3").setType(type2).setReturnToDepot(true)
.setStartLocation(Location.newInstance(0.5, 10.5))
.setBreak((Break) Break.Builder.newInstance("v3-break").setTimeWindow(TimeWindow.newInstance(100,150)).setServiceTime(50).build())
.setBreak((Break) Break.Builder.newInstance("v3-break").setTimeWindow(TimeWindow.newInstance(60,80)).setServiceTime(50).build())
.setEarliestStart(0).setLatestArrival(500)
.build();
// VehicleImpl v4 = VehicleImpl.Builder.newInstance("v4").setType(type3).setReturnToDepot(true)
@ -124,8 +124,8 @@ public class VariableStartAndWaitingTimeExample {
.addCoreStateAndConstraintStuff(true)
.setStateAndConstraintManager(stateManager, constraintManager)
.setProperty(Jsprit.Parameter.THRESHOLD_INI, "0.1")
.setProperty(Jsprit.Strategy.CLUSTER_REGRET, "0.")
.setProperty(Jsprit.Strategy.CLUSTER_BEST, "0.")
// .setProperty(Jsprit.Strategy.CLUSTER_REGRET, "0.")
// .setProperty(Jsprit.Strategy.CLUSTER_BEST, "0.")
// .setProperty(Jsprit.Strategy.WORST_REGRET, "0.")
// .setProperty(Jsprit.Strategy.RANDOM_REGRET, "0.")
// .setProperty(Jsprit.Strategy.RADIAL_REGRET, "0.")