Package jsprit.core.algorithm.ruin

Examples of jsprit.core.algorithm.ruin.RandomRuinStrategyFactory


  private static RuinStrategy getRandomRuin(final VehicleRoutingProblem vrp, final StateManager routeStates, TypedMap definedClasses, ModKey modKey, double shareToRuin) {
    RuinStrategyKey stratKey = new RuinStrategyKey(modKey);
    RuinStrategy ruin = definedClasses.get(stratKey);
    if(ruin == null){
      ruin = new RandomRuinStrategyFactory(shareToRuin).createStrategy(vrp);
      definedClasses.put(stratKey, ruin);
    }
    return ruin;
  }
View Full Code Here


    InsertionStrategy iStrategy = iBuilder.build();
   
    /*
     * second, define random-ruin that ruins 50-percent of the selected solution
     */
    RuinStrategy randomRuin = new RandomRuinStrategyFactory(0.5).createStrategy(vrp);
   
    /*
     * third, define radial-ruin that ruins 30-percent of the selected solution
     * the second para defines the distance between two jobs.
     */
 
View Full Code Here

        BestInsertionBuilder bestIBuilder = new BestInsertionBuilder(vrp, fleetManager, stateManager,constraintManager);
        InsertionStrategy bestInsertion = bestIBuilder.build();


        RuinStrategy radial = new RadialRuinStrategyFactory( 0.3, new AvgServiceAndShipmentDistance(vrp.getTransportCosts())).createStrategy(vrp);
        RuinStrategy random = new RandomRuinStrategyFactory(0.5).createStrategy(vrp);


        SolutionCostCalculator solutionCostCalculator = new SolutionCostCalculator() {

            @Override
View Full Code Here

    VehicleFleetManager fleetManager = new InfiniteFleetManagerFactory(vrp.getVehicles()).createFleetManager();
   
    InsertionStrategy bestInsertion = new BestInsertionBuilder(vrp, fleetManager, stateManager, cManager).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) {
View Full Code Here

      BestInsertionBuilder iBuilder = new BestInsertionBuilder(vrp, fleetManager, stateManager, constraintManager);
//      iBuilder.setConstraintManager(constraintManger);
      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) {
View Full Code Here

    InsertionStrategy iStrategy = iBuilder.build();
   
    /*
     * second, define random-ruin that ruins 50-percent of the selected solution
     */
    RuinStrategy randomRuin = new RandomRuinStrategyFactory(0.5).createStrategy(vrp);
   
    /*
     * third, define radial-ruin that ruins 30-percent of the selected solution
     * the second para defines the distance between two jobs.
     */
 
View Full Code Here

TOP

Related Classes of jsprit.core.algorithm.ruin.RandomRuinStrategyFactory

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.