Package jsprit.core.problem.driver

Examples of jsprit.core.problem.driver.Driver


    this.vehicleSwitchAllowed = vehicleSwitchAllowed;
  }

  public InsertionData getInsertionData(final VehicleRoute currentRoute, final Job jobToInsert, final Vehicle vehicle, double newVehicleDepartureTime, final Driver driver, final double bestKnownCost) {
    Vehicle selectedVehicle = currentRoute.getVehicle();
    Driver selectedDriver = currentRoute.getDriver();
    InsertionData bestIData = InsertionData.createEmptyInsertionData();
    double bestKnownCost_ = bestKnownCost;
    Collection<Vehicle> relevantVehicles = new ArrayList<Vehicle>();
    if(!(selectedVehicle instanceof NoVehicle)) {
      relevantVehicles.add(selectedVehicle);
View Full Code Here


  public double getCosts(JobInsertionContext insertionContext){
    double delta_access = 0.0;
    double delta_egress = 0.0;
    VehicleRoute currentRoute = insertionContext.getRoute();
    Vehicle newVehicle = insertionContext.getNewVehicle();
    Driver newDriver = insertionContext.getNewDriver();
    double newVehicleDepartureTime = insertionContext.getNewDepTime();
    if(!currentRoute.isEmpty()){
      double accessTransportCostNew = routingCosts.getTransportCost(newVehicle.getStartLocationId(), currentRoute.getActivities().get(0).getLocationId(), newVehicleDepartureTime, newDriver, newVehicle);
      double accessTransportCostOld = routingCosts.getTransportCost(currentRoute.getStart().getLocationId(), currentRoute.getActivities().get(0).getLocationId(), currentRoute.getDepartureTime(), currentRoute.getDriver(), currentRoute.getVehicle());
     
View Full Code Here

    }
  }
  private void readInitialRoutes(XMLConfiguration xmlConfig) {
    List<HierarchicalConfiguration> initialRouteConfigs = xmlConfig.configurationsAt("initialRoutes.route");
    for(HierarchicalConfiguration routeConfig : initialRouteConfigs){
      Driver driver = DriverImpl.noDriver();
      String vehicleId = routeConfig.getString("vehicleId");
      Vehicle vehicle = getVehicle(vehicleId);
      if(vehicle == null) throw new IllegalStateException("vehicle is missing.");
      String start = routeConfig.getString("start");
      if(start == null) throw new IllegalStateException("route start-time is missing.");
View Full Code Here

      if(totalCost != null) cost = Double.parseDouble(totalCost);
      List<HierarchicalConfiguration> routeConfigs = solutionConfig.configurationsAt("routes.route");
      List<VehicleRoute> routes = new ArrayList<VehicleRoute>();
      for(HierarchicalConfiguration routeConfig : routeConfigs){
        //! here, driverId is set to noDriver, no matter whats in driverId.
        Driver driver = DriverImpl.noDriver();
        String vehicleId = routeConfig.getString("vehicleId");
        Vehicle vehicle = getVehicle(vehicleId);
        if(vehicle == null) throw new IllegalStateException("vehicle is missing.");
        String start = routeConfig.getString("start");
        if(start == null) throw new IllegalStateException("route start-time is missing.");
View Full Code Here

TOP

Related Classes of jsprit.core.problem.driver.Driver

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.