Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/06/10 16:08:46 (14 years ago)
Author:
svonolfe
Message:

Refactored VRP, added some Potvin operators (WIP) (#1039)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/VRPOperator.cs

    r4154 r4174  
    2424using HeuristicLab.Parameters;
    2525using HeuristicLab.Data;
     26using HeuristicLab.Problems.VehicleRouting.Encodings;
    2627
    2728namespace HeuristicLab.Problems.VehicleRouting {
     
    7172      Parameters.Add(new LookupParameter<DoubleArray>("ServiceTime", "The service time of each customer."));
    7273    }
     74
     75    protected bool Feasible(Tour tour) {
     76      return tour.Feasible(
     77                  DueTimeParameter.ActualValue,
     78                  ServiceTimeParameter.ActualValue,
     79                  ReadyTimeParameter.ActualValue,
     80                  DemandParameter.ActualValue,
     81                  CapacityParameter.ActualValue,
     82                  CoordinatesParameter.ActualValue,
     83                  DistanceMatrixParameter,
     84                  UseDistanceMatrixParameter.ActualValue);
     85    }
     86
     87    protected double GetLength(Tour tour) {
     88      return tour.GetLength(
     89                CoordinatesParameter.ActualValue,
     90                DistanceMatrixParameter,
     91                UseDistanceMatrixParameter.ActualValue);
     92    }
    7393  }
    7494}
Note: See TracChangeset for help on using the changeset viewer.