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)

Location:
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3
Files:
2 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}
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/VehicleRoutingProblem.cs

    r4852 r4856  
    200200      : base(original, cloner) {
    201201      operators = original.operators.Select(x => (IOperator)cloner.Clone(x)).ToList();
    202       DistanceMatrixParameter.Value = DistanceMatrixParameter.Value;
    203202      AttachEventHandlers();
    204203    }
Note: See TracChangeset for help on using the changeset viewer.