Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/19/10 15:27:10 (14 years ago)
Author:
svonolfe
Message:

Implemented review changes (#1236)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/TourEncoding.cs

    r4722 r4856  
    2626using HeuristicLab.Data;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using System.Text;
    2829
    2930namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
     
    6768    public TourEncoding() {
    6869      Tours = new ItemList<Tour>();
     70
     71      Tours.ToStringChanged += new System.EventHandler(Tours_ToStringChanged);
     72    }
     73
     74    void Tours_ToStringChanged(object sender, System.EventArgs e) {
     75      this.OnToStringChanged();
    6976    }
    7077
     
    96103      }
    97104    }
     105
     106    public override string ToString() {
     107      StringBuilder sb = new StringBuilder();
     108
     109      foreach (Tour tour in Tours) {
     110        foreach (int city in tour.Cities) {
     111          sb.Append(city);
     112          sb.Append(" ");
     113        }
     114
     115        sb.AppendLine();
     116      }
     117
     118      return sb.ToString();
     119    }
    98120  }
    99121}
Note: See TracChangeset for help on using the changeset viewer.