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/Encodings/Alba/AlbaEncoding.cs

    r4150 r4174  
    4242        for (int i = 0; i < this.array.Length; i++) {
    4343          if (this.array[i] >= cities) {
    44             if (tour.Count > 0) {
     44            if (tour.Cities.Count > 0) {
    4545              result.Add(tour);
    4646
     
    4848            }
    4949          } else {
    50             tour.Add(new IntValue(this.array[i] + 1));
     50            tour.Cities.Add(this.array[i] + 1);
    5151          }
    5252        }
    5353
    54         if (tour.Count > 0) {
     54        if (tour.Cities.Count > 0) {
    5555          result.Add(tour);
    5656        }
     
    9797      int cities = 0;
    9898      foreach (Tour tour in tours) {
    99         cities += tour.Count;
     99        cities += tour.Cities.Count;
    100100      }
    101101
     
    107107
    108108      foreach (Tour tour in tours) {
    109         foreach (IntValue city in tour) {
    110             array[arrayIndex] = city.Value - 1;
     109        foreach (int city in tour.Cities) {
     110            array[arrayIndex] = city - 1;
    111111            arrayIndex++;
    112112        }
Note: See TracChangeset for help on using the changeset viewer.