Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/15/12 09:11:17 (12 years ago)
Author:
gkronber
Message:

#1081 merged r7462:7609 from trunk into time series branch

Location:
branches/HeuristicLab.TimeSeries
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.TimeSeries

  • branches/HeuristicLab.TimeSeries/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs

    r7268 r7615  
    240240    }
    241241
     242    protected override IEnumerable<KeyValuePair<string, IItem>> GetCollectedValues(IItem value) {
     243      var children = base.GetCollectedValues(value);
     244      foreach (var child in children) {
     245        if (child.Value is IOperator)
     246          yield return new KeyValuePair<string, IItem>(child.Key, new StringValue(((IOperator)child.Value).Name));
     247        else yield return child;
     248      }
     249    }
     250
    242251    #region Events
    243252    public event EventHandler ExecutionStateChanged;
     
    265274      ExecutionState = ExecutionState.Prepared;
    266275      ExecutionTime = TimeSpan.Zero;
    267       foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects().OfType<IStatefulItem>()) {
     276      foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects(new HashSet<string>() { "runs" }).OfType<IStatefulItem>()) {
    268277        statefulObject.InitializeState();
    269278      }
     
    286295    protected virtual void OnStopped() {
    287296      ExecutionState = ExecutionState.Stopped;
    288       foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects().OfType<IStatefulItem>()) {
     297      foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects(new HashSet<string>() { "runs" }).OfType<IStatefulItem>()) {
    289298        statefulObject.ClearState();
    290299      }
Note: See TracChangeset for help on using the changeset viewer.