From 561760e1b3c69fc84ab338c149930a72fa4c190e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schr=C3=B6der?= Date: Fri, 12 Dec 2014 11:43:04 +0100 Subject: [PATCH 1/8] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 971ac0e1..cc2f8ce0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ Change-log ========== **v1.5** @ 2014-12-12 ! Break change ! -(only if you already build your algorithm from scratch since strategies now need to have unique ids) + +It only breaks your code if you already build your algorithm from scratch since strategies now need to have unique ids. just add a unique id to the SearchStrategy constructor. new features: see [Whats new](https://github.com/jsprit/jsprit/blob/master/WHATS_NEW.md) From 4665150e9e69372168372cacdca6ba62e1ac01e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schr=C3=B6der?= Date: Fri, 12 Dec 2014 11:47:12 +0100 Subject: [PATCH 2/8] Update WHATS_NEW.md --- WHATS_NEW.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WHATS_NEW.md b/WHATS_NEW.md index 81e4ab14..16fd7392 100644 --- a/WHATS_NEW.md +++ b/WHATS_NEW.md @@ -28,7 +28,7 @@ With AbstractRuinStrategy and AbstractInsertionStrategyPrettyAlgorithmBuilder you can finally build your algorithm, basically just by adding your strategies. All -other things that needs to be done to wire up the components of your algorithm does the builder for you. +other things that need to be done to wire up the components of your algorithm does the builder for you. A third improvement in this regards is that you can switch on and off certain strategies or just change their weights in the course of the search (which allow you to adapt your strategies e.g. according to its recorded success). You do that by informing the strategy manager to change a strategy's weight much like this: From 7e7dc42805600f7bc6b54155c9edddb963544b17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schr=C3=B6der?= Date: Fri, 12 Dec 2014 12:02:31 +0100 Subject: [PATCH 3/8] Update WHATS_NEW.md --- WHATS_NEW.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WHATS_NEW.md b/WHATS_NEW.md index 16fd7392..c094abe2 100644 --- a/WHATS_NEW.md +++ b/WHATS_NEW.md @@ -43,7 +43,7 @@ illustrates a few of the outlined features. Another new feature which is worth to mention is a new InsertionStrategy called [RegretInsertion](https://github.com/jsprit/jsprit/blob/master/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/RegretInsertion.java). It is much less myopic than BestInsertion since it scores all jobs before inserting them. The one with the highest score will be inserted first. The scoring function is based on opportunity costs, i.e. it compares the best insertion alternative with the second best. -If the difference between both is high, the job will be preferred, i.e. it will be inserted earlier than later. The scoring function comes with default parameter. However, you +If the difference between both is high, the job will be preferred, i.e. it will be inserted earlier than later. The scoring function comes with default parameters. However, you can replace params or overwrite the whole scoring function with your own (which currently means that you need to build your algorithm from scratch). Note, that this strategy will have a significant impact on the computational performance. If you run it with the same no. of iterations as you run BestInsertion, you are likely to wait forever. However, since it is a bit more 'intelligent' you do not need as many iterations. It is also recommended to use the [concurrent mode](https://github.com/jsprit/jsprit/blob/master/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/RegretInsertionConcurrent.java) since RegretInsertion From e08241b61d1edc39dc50e46315c6dd0698717607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schr=C3=B6der?= Date: Fri, 12 Dec 2014 12:41:08 +0100 Subject: [PATCH 4/8] Update WHATS_NEW.md --- WHATS_NEW.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WHATS_NEW.md b/WHATS_NEW.md index c094abe2..b584a029 100644 --- a/WHATS_NEW.md +++ b/WHATS_NEW.md @@ -5,7 +5,7 @@ WHATS NEW jsprit made a big step towards analysing and designing your own ruin and recreation strategies. -First, it is now possible to record and view each and every algorithm step which allows you to visualize the search, e.g. neighborhoods +First, it is now possible to record and view each and every algorithm step which allows you to visualise the search, e.g. neighborhoods and the emergence of new structures. It is as easy as importing the corresponding classes from jsprit-analysis and coding the following lines:
AlgorithmEventsRecorder recorder = new AlgorithmEventsRecorder(vrp,"output/events.dgs.gz"); 
@@ -22,10 +22,10 @@ viewer.setRecreationDelay(4); //lets you slow down recreation vis (in ms)
 viewer.display("output/events.dgs.gz");
 
-It is not only beautiful, but it allows you to immediately analyze your own strategies which brings us to the second improvement. +It is not only beautiful, but it allows you to understand why jsprit can find and cannot find certain solutions, and it allows you to immediately analyze your own strategies which brings us to the second improvement. With AbstractRuinStrategy and AbstractInsertionStrategy it is easy to implement your own strategies. The -abstract classes do all the non-intuitive stuff (such as informing listeners that a job has been inserted etc.) for you and you can focus on your strategies. +abstract classes do all the non-intuitive and tricky stuff (such as informing listeners that a job has been inserted etc.) for you and you can focus on your strategies. With the PrettyAlgorithmBuilder you can finally build your algorithm, basically just by adding your strategies. All other things that need to be done to wire up the components of your algorithm does the builder for you. From 30b87518278b82ce2d071fbbc123cd795af9d18e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schr=C3=B6der?= Date: Fri, 12 Dec 2014 12:43:52 +0100 Subject: [PATCH 5/8] Update WHATS_NEW.md --- WHATS_NEW.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WHATS_NEW.md b/WHATS_NEW.md index b584a029..6b573325 100644 --- a/WHATS_NEW.md +++ b/WHATS_NEW.md @@ -30,7 +30,7 @@ abstract classes do all the non-intuitive and tricky stuff (such as informing li With the PrettyAlgorithmBuilder you can finally build your algorithm, basically just by adding your strategies. All other things that need to be done to wire up the components of your algorithm does the builder for you. -A third improvement in this regards is that you can switch on and off certain strategies or just change their weights in the course of the search (which allow you to adapt your strategies e.g. +A third improvement in this regard is that you can switch on and off certain strategies or just change their weights in the course of the search (which allow you to adapt your strategies e.g. according to its recorded success). You do that by informing the strategy manager to change a strategy's weight much like this:
vra.getSearchStrategyManager().informStrategyWeightChanged(strategyId, 0.); //which is basically switching off the strategy

From a328210d6d25286805dc647a3628cfc38b12cdf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Schr=C3=B6der?= 
Date: Fri, 12 Dec 2014 12:45:13 +0100
Subject: [PATCH 6/8] Update WHATS_NEW.md

---
 WHATS_NEW.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/WHATS_NEW.md b/WHATS_NEW.md
index 6b573325..90e195fd 100644
--- a/WHATS_NEW.md
+++ b/WHATS_NEW.md
@@ -41,7 +41,7 @@ the strategy's weight and all other weights (i.e. prob(i) = weight(i) / sumOfAll
 now require a unique id. Latter might break your code if (and only if) you already build your algorithm from scratch. This [example](https://github.com/jsprit/jsprit/blob/master/jsprit-examples/src/main/java/jsprit/examples/BuildAlgorithmFromScratch.java)
 illustrates a few of the outlined features.
 
-Another new feature which is worth to mention is a new InsertionStrategy called [RegretInsertion](https://github.com/jsprit/jsprit/blob/master/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/RegretInsertion.java). It is much less myopic than BestInsertion since it scores all jobs before inserting them.
+Another new feature which is worth to mention is a new insertion strategy called [RegretInsertion](https://github.com/jsprit/jsprit/blob/master/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/RegretInsertion.java). It is much less myopic than BestInsertion since it scores all jobs before inserting them.
 The one with the highest score will be inserted first. The scoring function is based on opportunity costs, i.e. it compares the best insertion alternative with the second best.
 If the difference between both is high, the job will be preferred, i.e. it will be inserted earlier than later. The scoring function comes with default parameters. However, you
 can replace params or overwrite the whole scoring function with your own (which currently means that you need to build your algorithm from scratch).

From 9580d63ee3a0573179453ac9ac887b2ae7e9a09a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Schr=C3=B6der?= 
Date: Fri, 12 Dec 2014 12:47:04 +0100
Subject: [PATCH 7/8] Update WHATS_NEW.md

---
 WHATS_NEW.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/WHATS_NEW.md b/WHATS_NEW.md
index 90e195fd..317c87b1 100644
--- a/WHATS_NEW.md
+++ b/WHATS_NEW.md
@@ -49,7 +49,7 @@ Note, that this strategy will have a significant impact on the computational per
  likely to wait forever. However, since it is a bit more 'intelligent' you do not need as many iterations. It is also recommended to use the [concurrent mode](https://github.com/jsprit/jsprit/blob/master/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/RegretInsertionConcurrent.java) since RegretInsertion
   is best suited for concurrent calculation.
 
-Last, you can use spherical coordinates (i.e. longitude and latitude) since [GreatCircleCosts](https://github.com/jsprit/jsprit/blob/master/jsprit-core/src/main/java/jsprit/core/util/GreatCircleCosts.java) knows how to calculate great circle distance and time. It approximates distance
+Last, you can use spherical coordinates (i.e. longitude and latitude) since [GreatCircleCosts](https://github.com/jsprit/jsprit/blob/master/jsprit-core/src/main/java/jsprit/core/util/GreatCircleCosts.java) knows how to calculate great circle distance. It approximates distance
  based on the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula). If you want to approximate real networks, you can set a detour factor and a speed value.
 
 

From b7679cba578e5cec82f84b4e38bc1f20d1fa9cf5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Schr=C3=B6der?= 
Date: Fri, 12 Dec 2014 13:58:54 +0100
Subject: [PATCH 8/8] Update WHATS_NEW.md

---
 WHATS_NEW.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/WHATS_NEW.md b/WHATS_NEW.md
index 317c87b1..ab87f630 100644
--- a/WHATS_NEW.md
+++ b/WHATS_NEW.md
@@ -38,7 +38,9 @@ according to its recorded success). You do that by informing the strategy manage
 
 This comes with two changes. Strategy probabilities are now strategy weights (and do not need to be smaller than 1) and the probability of choosing a strategy is simply a function of
 the strategy's weight and all other weights (i.e. prob(i) = weight(i) / sumOfAllWeights). The second change is that strategies
-now require a unique id. Latter might break your code if (and only if) you already build your algorithm from scratch. This [example](https://github.com/jsprit/jsprit/blob/master/jsprit-examples/src/main/java/jsprit/examples/BuildAlgorithmFromScratch.java)
+now require a unique id. Latter might break your code if (and only if) you already build your algorithm from scratch. 
+
+This [example](https://github.com/jsprit/jsprit/blob/master/jsprit-examples/src/main/java/jsprit/examples/BuildAlgorithmFromScratch.java)
 illustrates a few of the outlined features.
 
 Another new feature which is worth to mention is a new insertion strategy called [RegretInsertion](https://github.com/jsprit/jsprit/blob/master/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/RegretInsertion.java). It is much less myopic than BestInsertion since it scores all jobs before inserting them.