Package jsprit.core.util

Examples of jsprit.core.util.CrowFlyCosts


     */
    public VehicleRoutingProblem build() {
      logger.info("build problem ...");
      if(transportCosts == null){
        logger.warn("set routing costs crowFlyDistance.");
        transportCosts = new CrowFlyCosts(getLocations());
      }
      if(addPenaltyVehicles){
        if(fleetSize.equals(FleetSize.INFINITE)){
          logger.warn("penaltyType and FleetSize.INFINITE does not make sense. thus no penalty-types are added.");
        }
View Full Code Here


        return Coordinate.newInstance(Double.parseDouble(splitted[0]),
            Double.parseDouble(splitted[1]));
      }
     
    };
    routingCosts = new CrowFlyCosts(locations);

  }
View Full Code Here

        setStartLocationCoordinate(Coordinate.newInstance(0, 0)).setStartLocationId("0,0")
        .setType(VehicleTypeImpl.Builder.newInstance("myType").addCapacityDimension(0, 20).setCostPerDistance(1.0).build()).build();
    vrpBuilder.addVehicle(vehicle);
    vrpBuilder.addJob(Service.Builder.newInstance("myService").addSizeDimension(0, 2).setLocationId("0,20").setCoord(Coordinate.newInstance(0, 20)).build());
    vrpBuilder.setFleetSize(FleetSize.INFINITE);
    vrpBuilder.setRoutingCost(getTpCosts(new CrowFlyCosts(vrpBuilder.getLocations())));
    VehicleRoutingProblem vrp = vrpBuilder.build();
   
    VehicleRoutingAlgorithm vra = VehicleRoutingAlgorithms.readAndCreateAlgorithm(vrp, "src/test/resources/testConfig.xml");
    Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
   
View Full Code Here

    VehicleRoutingProblem.Builder problemBuilder = VehicleRoutingProblem.Builder.newInstance();
    problemBuilder.setFleetSize(FleetSize.FINITE);
    readEnvelopes(problemBuilder);
    readMessengers(problemBuilder);
    //add constraints to problem
    VehicleRoutingTransportCosts routingCosts = new CrowFlyCosts(problemBuilder.getLocations()); //which is the default VehicleRoutingTransportCosts in builder above
        problemBuilder.setRoutingCost(routingCosts);
        //finally build the problem
//        problemBuilder.addPenaltyVehicles(20.0,50000);
        VehicleRoutingProblem bicycleMessengerProblem = problemBuilder.build();
View Full Code Here

TOP

Related Classes of jsprit.core.util.CrowFlyCosts

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.