Package jsprit.core.problem.solution

Examples of jsprit.core.problem.solution.SolutionCostCalculator


      InsertionStrategy bestInsertion = iBuilder.build();
       
      RuinStrategy radial = new RadialRuinStrategyFactory( 0.15, new AvgServiceDistance(vrp.getTransportCosts())).createStrategy(vrp);
      RuinStrategy random = new RandomRuinStrategyFactory(0.25).createStrategy(vrp);
     
      SolutionCostCalculator solutionCostCalculator = new SolutionCostCalculator() {
       
        @Override
        public double getCosts(VehicleRoutingProblemSolution solution) {
          double costs = 0.0;
          for(VehicleRoute route : solution.getRoutes()){
View Full Code Here


     */
    /*
     * but before define how a generated solution is evaluated
     * here: the VariablePlusFixed.... comes out of the box and it does what its name suggests
     */
    SolutionCostCalculator solutionCostCalculator = new VariablePlusFixedSolutionCostCalculatorFactory(stateManager).createCalculator();
   
    SearchStrategy firstStrategy = new SearchStrategy(new SelectBest(), new GreedyAcceptance(1), solutionCostCalculator);
    firstStrategy.addModule(new RuinAndRecreateModule("randomRuinAndBestInsertion", iStrategy, randomRuin));
   
    SearchStrategy secondStrategy = new SearchStrategy(new SelectBest(), new GreedyAcceptance(1), solutionCostCalculator);
View Full Code Here

TOP

Related Classes of jsprit.core.problem.solution.SolutionCostCalculator

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.