mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
test and modify ruin strategies to deal with initial routes
This commit is contained in:
parent
62e12d5153
commit
2b87155879
10 changed files with 192 additions and 29 deletions
|
|
@ -14,7 +14,7 @@
|
|||
<strategy>
|
||||
<memory>1</memory>
|
||||
<searchStrategies>
|
||||
<searchStrategy name="radialRuinAndRecreate">
|
||||
<searchStrategy name="random_best">
|
||||
<selector name="selectBest"/>
|
||||
<acceptor name="acceptNewRemoveWorst"/>
|
||||
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
<probability>0.2</probability>
|
||||
</searchStrategy>
|
||||
|
||||
<searchStrategy name="radialRuinAndRecreate">
|
||||
<searchStrategy name="radial_best">
|
||||
<selector name="selectBest"/>
|
||||
<acceptor name="acceptNewRemoveWorst"/>
|
||||
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
<probability>0.2</probability>
|
||||
</searchStrategy>
|
||||
|
||||
<searchStrategy name="radialRuinAndRecreate">
|
||||
<searchStrategy name="small_radial_best">
|
||||
<selector name="selectBest"/>
|
||||
<acceptor name="acceptNewRemoveWorst"/>
|
||||
<modules>
|
||||
|
|
|
|||
|
|
@ -76,6 +76,9 @@ public class MultipleDepotWithInitialRoutesExample {
|
|||
/*
|
||||
* solve the problem
|
||||
*/
|
||||
// VehicleRoutingAlgorithm vra = Jsprit.Builder.newInstance(vrp)
|
||||
// .setProperty(Jsprit.Parameter.ITERATIONS,"10000").buildAlgorithm();
|
||||
|
||||
VehicleRoutingAlgorithm vra = VehicleRoutingAlgorithms.readAndCreateAlgorithm(vrp, "input/algorithmConfig_noVehicleSwitch.xml");
|
||||
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue