From df4ed02e033804d8583d56105f5df9fa2f6613e7 Mon Sep 17 00:00:00 2001 From: jsprit Date: Fri, 5 Sep 2014 14:01:42 +0200 Subject: [PATCH 1/7] Update WHATS_NEW.md --- WHATS_NEW.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/WHATS_NEW.md b/WHATS_NEW.md index 2957c18d..af44f129 100644 --- a/WHATS_NEW.md +++ b/WHATS_NEW.md @@ -56,6 +56,26 @@ This, however, easily enables you to define objective functions that maximizes p Thus, if you already use your own custom objective function, you need to manually adapt it and add penalties for unassigned jobs. + LIFO and FIFO CONSTRAINTS + +You can now retrieve additional information about related activities from JobInsertionContext (see https://github.com/jsprit/jsprit/issues/127). + +If one deals with shipments then two activities will be inserted: pickupShipment and deliverShipment. + +If you implement + +public double getCosts(JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime); + +you can now retrieve additional information from iFacts. If newAct is "deliverShipment" then + +iFacts.getRelatedActivityContext(); + +provides arrivalTime, endTime and potentialInsertionIndex of the related "pickupShipment" (see javadoc of ActivityContext). + +This allows you to easily implement LIFO and FIFO constraints. + + + ------------------------------ 2014-08-20 jsprit has a mailing list (https://groups.google.com/group/jsprit-mailing-list) From d434ce49026af20b8cb1e997b3c8993d60182ec0 Mon Sep 17 00:00:00 2001 From: jsprit Date: Fri, 5 Sep 2014 14:06:09 +0200 Subject: [PATCH 2/7] Update WHATS_NEW.md --- WHATS_NEW.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/WHATS_NEW.md b/WHATS_NEW.md index af44f129..6748cabe 100644 --- a/WHATS_NEW.md +++ b/WHATS_NEW.md @@ -62,9 +62,13 @@ You can now retrieve additional information about related activities from JobIns If one deals with shipments then two activities will be inserted: pickupShipment and deliverShipment. -If you implement +If you implement core.problem.constraint.SoftActivityContraint and core.problem.constraint.HardActivityStateLevelConstraint and thus public double getCosts(JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime); + +and + +public ConstraintsStatus fulfilled(JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime); you can now retrieve additional information from iFacts. If newAct is "deliverShipment" then @@ -72,7 +76,7 @@ you can now retrieve additional information from iFacts. If newAct is "deliverSh provides arrivalTime, endTime and potentialInsertionIndex of the related "pickupShipment" (see javadoc of ActivityContext). -This allows you to easily implement LIFO and FIFO constraints. +This allows you to easily implement LIFO and FIFO constraints (since you now know where the pickup activity will be inserted). From 09136487c29fe8a9f55070e633e5328e15aa5f95 Mon Sep 17 00:00:00 2001 From: jsprit Date: Fri, 5 Sep 2014 14:09:38 +0200 Subject: [PATCH 3/7] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a6e0123..eb6ad51a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,8 @@ Change-log - bugfix [#111](https://github.com/jsprit/jsprit/issues/111) - bugfix [#112](https://github.com/jsprit/jsprit/issues/112) - bugfix [#114](https://github.com/jsprit/jsprit/issues/114) +- bugfix [#126](https://github.com/jsprit/jsprit/issues/126) +- bugfix [#128](https://github.com/jsprit/jsprit/issues/128) **v1.3.1** @ 2014-06-14 From 1945e5af3825eefe52320ef87cbeaf5e433858ac Mon Sep 17 00:00:00 2001 From: jsprit Date: Fri, 5 Sep 2014 14:13:00 +0200 Subject: [PATCH 4/7] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb6ad51a..a8592e74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Change-log - StateManager.addDefault... methods do not exists anymore. Client must now decide what to do when state does not exist. - deprecated core.problem.VehicleRoutingProblem.Builder.addVehicle(Vehicle v) and added core.problem.VehicleRoutingProblem.Builder.addVehicle(AbstractVehicle v) - deprecated core.problem.VehicleRoutingProblem.Builder.addJob(Job j) and added core.problem.VehicleRoutingProblem.Builder.addJob(AbstractJob j) +- this [example](https://github.com/jsprit/jsprit/blob/master/jsprit-examples/src/main/java/jsprit/examples/MultipleProductsWithLoadConstraintExample.java) might make migrating from v1.3.1 to v1.4 easier (since both versions are implemented - v1.3.1 was commented out) - bugfix [#107](https://github.com/jsprit/jsprit/issues/107) - bugfix [#109](https://github.com/jsprit/jsprit/issues/109) From 60b8be66bc40da7a9b137637c459b97980c79920 Mon Sep 17 00:00:00 2001 From: jsprit Date: Fri, 5 Sep 2014 16:00:14 +0200 Subject: [PATCH 5/7] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8592e74..c04302b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ Change-log - countless improvements of javadocs jsprit-core +- renaming of core.problem.constraint.HardActivityStateLevelConstraint into HardActivityConstraint +- renaming of core.problem.constraint.HardRouteStateLevelConstraint into HardRouteConstraint - StateFactory.createId(String name) moved to core.algorithm.state.StateManager.createStateId(String name) - StateFactory moved from core.problem.solution.route.state.StateFactory to core.algorithm.state.InternalStates - StateId moved from core.problem.route.state.StateFactory.StateId to core.algorithm.state.StateId From a09358a0f032f06923679e2527df14a3685cff41 Mon Sep 17 00:00:00 2001 From: jsprit Date: Fri, 5 Sep 2014 16:02:09 +0200 Subject: [PATCH 6/7] Update WHATS_NEW.md --- WHATS_NEW.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WHATS_NEW.md b/WHATS_NEW.md index 6748cabe..714cd5f0 100644 --- a/WHATS_NEW.md +++ b/WHATS_NEW.md @@ -5,6 +5,8 @@ WHATS NEW 2014-09-? new release **v1.4.0** +v1.4 breaks your code! Look at [changelog](https://github.com/jsprit/jsprit/blob/master/CHANGELOG.md) to migrate from v1.3.1 to v1.4. + SKILLS Skills can now be included easily (see for example https://github.com/jsprit/jsprit/blob/master/jsprit-examples/src/main/java/jsprit/examples/SolomonWithSkillsExample.java). From 7b40afc72db12d5e4560611d20d1fac245ba502b Mon Sep 17 00:00:00 2001 From: jsprit Date: Fri, 5 Sep 2014 16:06:50 +0200 Subject: [PATCH 7/7] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c04302b6..46e08d35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ Change-log - StateManager.addDefault... methods do not exists anymore. Client must now decide what to do when state does not exist. - deprecated core.problem.VehicleRoutingProblem.Builder.addVehicle(Vehicle v) and added core.problem.VehicleRoutingProblem.Builder.addVehicle(AbstractVehicle v) - deprecated core.problem.VehicleRoutingProblem.Builder.addJob(Job j) and added core.problem.VehicleRoutingProblem.Builder.addJob(AbstractJob j) -- this [example](https://github.com/jsprit/jsprit/blob/master/jsprit-examples/src/main/java/jsprit/examples/MultipleProductsWithLoadConstraintExample.java) might make migrating from v1.3.1 to v1.4 easier (since both versions are implemented - v1.3.1 was commented out) +- this [example](https://github.com/jsprit/jsprit/blob/master/jsprit-examples/src/main/java/jsprit/examples/MultipleProductsWithLoadConstraintExample.java) might make migrating from v1.3.1 to v1.4 easier (since both versions are implemented - v1.3.1 was commented out) - bugfix [#107](https://github.com/jsprit/jsprit/issues/107) - bugfix [#109](https://github.com/jsprit/jsprit/issues/109)