Package jsprit.core.algorithm.selector

Examples of jsprit.core.algorithm.selector.SelectBest


    assertThat(new SelectBest().selectSolution(Arrays.asList(sol1)), is(sol1));
  }
 
  @Test
  public void whenHavingNoSolutions_returnNull(){
    assertNull(new SelectBest().selectSolution(Collections.<VehicleRoutingProblemSolution> emptyList()));
  }
View Full Code Here


                }
                return costs;
            }
        };

        SearchStrategy randomStrategy = new SearchStrategy(new SelectBest(), new GreedyAcceptance(1), solutionCostCalculator);
        RuinAndRecreateModule randomModule = new RuinAndRecreateModule("randomRuin_bestInsertion", bestInsertion, random);
        randomStrategy.addModule(randomModule);

        SearchStrategy radialStrategy = new SearchStrategy(new SelectBest(), new GreedyAcceptance(1), solutionCostCalculator);
        RuinAndRecreateModule radialModule = new RuinAndRecreateModule("radialRuin_bestInsertion", bestInsertion, radial);
        radialStrategy.addModule(radialModule);

        SearchStrategyManager strategyManager = new SearchStrategyManager();
        strategyManager.addStrategy(radialStrategy, 0.5);
View Full Code Here

    ModKey key = new ModKey(acceptorName,acceptorId);
    AcceptorKey accKey = new AcceptorKey(key);
    SolutionAcceptor acceptor =  new GreedyAcceptance(1);
   
    SelectorKey selKey = new SelectorKey(new ModKey(selectorName,selectorId));
    SolutionSelector selector = new SelectBest();
   
    typedMap.put(accKey, acceptor);
    typedMap.put(selKey, selector);
   
    assertEquals(acceptor,typedMap.get(accKey));
View Full Code Here

    ModKey key = new ModKey(acceptorName,acceptorId);
    AcceptorKey accKey = new AcceptorKey(key);
    SolutionAcceptor acceptor =  new GreedyAcceptance(1);
   
    SelectorKey selKey = new SelectorKey(new ModKey(selectorName,selectorId));
    SolutionSelector selector = new SelectBest();
   
    AcceptorKey accKey2 = new AcceptorKey(new ModKey(acceptorName2,acceptorId2));
    SolutionAcceptor acceptor2 =  new GreedyAcceptance(1);
   
    typedMap.put(accKey, acceptor);
View Full Code Here

        }
        return costs;
      }
    };
   
    SearchStrategy randomStrategy = new SearchStrategy(new SelectBest(), new GreedyAcceptance(1), solutionCostCalculator);
    RuinAndRecreateModule randomModule = new RuinAndRecreateModule("randomRuin_bestInsertion", bestInsertion, random);
    randomStrategy.addModule(randomModule);
   
    SearchStrategy radialStrategy = new SearchStrategy(new SelectBest(), new GreedyAcceptance(1), solutionCostCalculator);
    RuinAndRecreateModule radialModule = new RuinAndRecreateModule("radialRuin_bestInsertion", bestInsertion, radial);
    radialStrategy.addModule(radialModule);
   
    SearchStrategyManager strategyManager = new SearchStrategyManager();
    strategyManager.addStrategy(radialStrategy, 0.5);
View Full Code Here

          }
          return costs;
        }
      };
     
      SearchStrategy randomStrategy = new SearchStrategy(new SelectBest(), new GreedyAcceptance(1), solutionCostCalculator);
      RuinAndRecreateModule randomModule = new RuinAndRecreateModule("randomRuin_bestInsertion", bestInsertion, random);
      randomStrategy.addModule(randomModule);
     
      SearchStrategy radialStrategy = new SearchStrategy(new SelectBest(), new GreedyAcceptance(1), solutionCostCalculator);
      RuinAndRecreateModule radialModule = new RuinAndRecreateModule("radialRuin_bestInsertion", bestInsertion, radial);
      radialStrategy.addModule(radialModule);
     
      SearchStrategyManager strategyManager = new SearchStrategyManager();
      strategyManager.addStrategy(radialStrategy, 0.5);
View Full Code Here

    Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
   
    /*
     * Retrieve best solution.
     */
    VehicleRoutingProblemSolution solution = new SelectBest().selectSolution(solutions);
   
    /*
     * print solution
     */
    SolutionPrinter.print(solution);
 
View Full Code Here

    Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
   
    /*
     * Retrieve best solution.
     */
    VehicleRoutingProblemSolution solution = new SelectBest().selectSolution(solutions);
   
    /*
     * print solution
     */
    SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
View Full Code Here

    Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
   
    /*
     * Retrieve best solution.
     */
    VehicleRoutingProblemSolution solution = new SelectBest().selectSolution(solutions);
   
    /*
     * print solution
     */
    SolutionPrinter.print(solution);
 
View Full Code Here

    Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
   
    /*
     * Retrieve best solution.
     */
    VehicleRoutingProblemSolution solution = new SelectBest().selectSolution(solutions);
   
    /*
     * print solution
     */
    SolutionPrinter.print(solution);
 
View Full Code Here

TOP

Related Classes of jsprit.core.algorithm.selector.SelectBest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.