Package jsprit.core.problem.cost

Examples of jsprit.core.problem.cost.AbstractForwardVehicleRoutingTransportCosts


 
  @Test
  public void whenSettingRoutingCosts_vprShouldContainIt(){
    VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance();
   
    builder.setRoutingCost(new AbstractForwardVehicleRoutingTransportCosts() {
     
      @Override
      public double getTransportTime(String fromId, String toId,
          double departureTime, Driver driver, Vehicle vehicle) {
        return 0;
View Full Code Here


    VehicleType type = VehicleTypeImpl.Builder.newInstance("t").addCapacityDimension(0,1000).build();
        vehicle = VehicleImpl.Builder.newInstance("v1").setType(type).setStartLocationId("0,0").setLatestArrival(100.).build();
        newVehicle = VehicleImpl.Builder.newInstance("v2").setType(type).setStartLocationId("0,0").setLatestArrival(100.).build();
    driver = DriverImpl.noDriver();

        costs = new AbstractForwardVehicleRoutingTransportCosts() {

            VehicleRoutingTransportCosts routingCosts = CostFactory.createManhattanCosts();

            @Override
            public double getTransportTime(String fromId, String toId, double departureTime, Driver driver, Vehicle vehicle) {
View Full Code Here

        return Coordinate.newInstance(Double.parseDouble(splitted[0]),
            Double.parseDouble(splitted[1]));
      }
     
    };
    costs = new AbstractForwardVehicleRoutingTransportCosts() {
     
      @Override
      public double getTransportTime(String fromId, String toId,double departureTime, Driver driver, Vehicle vehicle) {
        return ManhattanDistanceCalculator.calculateDistance(locations.getCoord(fromId), locations.getCoord(toId));
      }
View Full Code Here

    final Map<String,Coordinate> coords = new HashMap<String, Coordinate>();
    coords.put("oldV", Coordinate.newInstance(1, 0));
    coords.put("newV", Coordinate.newInstance(5, 0));
    coords.put("service", Coordinate.newInstance(0, 0));
   
    AbstractForwardVehicleRoutingTransportCosts routingCosts = new AbstractForwardVehicleRoutingTransportCosts() {
     
      @Override
      public double getTransportTime(String fromId, String toId,double departureTime, Driver driver, Vehicle vehicle) {
        return getTransportCost(fromId, toId, departureTime, driver, vehicle);
      }
View Full Code Here

TOP

Related Classes of jsprit.core.problem.cost.AbstractForwardVehicleRoutingTransportCosts

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.