Package jsprit.core.algorithm.box

Examples of jsprit.core.algorithm.box.SchrimpfFactory


    Shipment shipment = Shipment.Builder.newInstance("s").setPickupCoord(Coordinate.newInstance(5, 0))
        .setDeliveryCoord(Coordinate.newInstance(10, 0)).build();
   
    VehicleRoutingProblem vrp = VehicleRoutingProblem.Builder.newInstance().addJob(shipment).addVehicle(vehicle).build();
   
    VehicleRoutingAlgorithm vra = new SchrimpfFactory().createAlgorithm(vrp);
    vra.setNuOfIterations(10);
   
    try{
      @SuppressWarnings("unused")
      Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
View Full Code Here


   
    Service service = Service.Builder.newInstance("s").setCoord(Coordinate.newInstance(5, 0)).build();
   
    VehicleRoutingProblem vrp = VehicleRoutingProblem.Builder.newInstance().addJob(service).addVehicle(vehicle).build();
   
    VehicleRoutingAlgorithm vra = new SchrimpfFactory().createAlgorithm(vrp);
    vra.setNuOfIterations(10);
   
    try{
      @SuppressWarnings("unused")
      Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
View Full Code Here

    Shipment shipment = Shipment.Builder.newInstance("s").setPickupCoord(Coordinate.newInstance(5, 0))
        .setDeliveryCoord(Coordinate.newInstance(10, 0)).build();
   
    VehicleRoutingProblem vrp = VehicleRoutingProblem.Builder.newInstance().addJob(shipment).addVehicle(vehicle).build();
   
    VehicleRoutingAlgorithm vra = new SchrimpfFactory().createAlgorithm(vrp);
    vra.setNuOfIterations(10);
   
    Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
   
    assertEquals(10.,Solutions.bestOf(solutions).getCost(),0.01);
View Full Code Here

   
    Service service = Service.Builder.newInstance("s").setCoord(Coordinate.newInstance(5, 0)).build();
   
    VehicleRoutingProblem vrp = VehicleRoutingProblem.Builder.newInstance().addJob(service).addVehicle(vehicle).build();
   
    VehicleRoutingAlgorithm vra = new SchrimpfFactory().createAlgorithm(vrp);
    vra.setNuOfIterations(10);
   
    Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
   
    assertEquals(5.,Solutions.bestOf(solutions).getCost(),0.01);
View Full Code Here

        readDemandQuantitiesAsServices(vrpBuilder);
        readDistances(matrixBuilder);

        vrpBuilder.setRoutingCost(matrixBuilder.build());
    VehicleRoutingProblem vrp = vrpBuilder.build();
    VehicleRoutingAlgorithm vra = new SchrimpfFactory().createAlgorithm(vrp);
    vra.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(100));
    Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
   
    SolutionPrinter.print(vrp, Solutions.bestOf(solutions), Print.VERBOSE);
   
View Full Code Here

        readDemandQuantitiesAsPickups(vrpBuilder);
        readDistances(matrixBuilder);

        vrpBuilder.setRoutingCost(matrixBuilder.build());
        VehicleRoutingProblem vrp = vrpBuilder.build();
        VehicleRoutingAlgorithm vra = new SchrimpfFactory().createAlgorithm(vrp);
        vra.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(100));
        Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();

        SolutionPrinter.print(vrp, Solutions.bestOf(solutions), Print.VERBOSE);
View Full Code Here

        readDemandQuantitiesAsDeliveries(vrpBuilder);
        readDistances(matrixBuilder);

        vrpBuilder.setRoutingCost(matrixBuilder.build());
        VehicleRoutingProblem vrp = vrpBuilder.build();
        VehicleRoutingAlgorithm vra = new SchrimpfFactory().createAlgorithm(vrp);
        vra.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(100));
        Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();

        SolutionPrinter.print(vrp, Solutions.bestOf(solutions), Print.VERBOSE);
View Full Code Here

    for(int i=0;i<10;i++){
      VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
      new VrpXMLReader(vrpBuilder).read("src/test/resources/biggerProblem.xml");
      VehicleRoutingProblem vrp = vrpBuilder.build();

      VehicleRoutingAlgorithm vra = new SchrimpfFactory().createAlgorithm(vrp);
      vra.setNuOfIterations(10);
      try{
        @SuppressWarnings("unused")
        Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
      }
View Full Code Here

        VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
        new VrpXMLReader(vrpBuilder).read("src/test/resources/simpleProblem_iniRoutes.xml");
        VehicleRoutingProblem vrp = vrpBuilder.build();

        VehicleRoutingAlgorithm vra = new SchrimpfFactory().createAlgorithm(vrp);
        Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
        VehicleRoutingProblemSolution solution = Solutions.bestOf(solutions);

        SolutionPrinter.print(vrp,solution, SolutionPrinter.Print.VERBOSE);
View Full Code Here

        VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
        new VrpXMLReader(vrpBuilder).read("src/test/resources/simpleProblem_inclShipments_iniRoutes.xml");
        VehicleRoutingProblem vrp = vrpBuilder.build();

        VehicleRoutingAlgorithm vra = new SchrimpfFactory().createAlgorithm(vrp);
        Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
        VehicleRoutingProblemSolution solution = Solutions.bestOf(solutions);

        SolutionPrinter.print(vrp,solution, SolutionPrinter.Print.VERBOSE);
View Full Code Here

TOP

Related Classes of jsprit.core.algorithm.box.SchrimpfFactory

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.