Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/29/11 15:51:56 (13 years ago)
Author:
svonolfe
Message:

Added support for multi depot CVRP instances (#1177)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/TourEncoding.cs

    r6837 r6851  
    3838   
    3939    #region IVRPEncoding Members
    40     public void Repair() {
     40    public virtual void Repair() {
    4141      List<Tour> toBeRemoved = new List<Tour>();
    4242      foreach (Tour tour in Tours) {
     
    6262
    6363     return result;
     64    }
     65
     66    public int GetTourIndex(Tour tour) {
     67      int index = -1;
     68
     69      for (int i = 0; i < Tours.Count; i++) {
     70        if (Tours[i].IsEqual(tour)) {
     71          index = i;
     72          break;
     73        }
     74      }
     75
     76      return index;
     77    }
     78
     79    public virtual int GetVehicleAssignment(int tour) {
     80      return tour;
    6481    }
    6582
Note: See TracChangeset for help on using the changeset viewer.