Free cookie consent management tool by TermsFeed Policy Generator

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

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

Location:
branches/HeuristicLab.TimeSeries
Files:
5 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      }
  • branches/HeuristicLab.TimeSeries/HeuristicLab.Optimization/3.3/BatchRun.cs

    r7268 r7615  
    339339    private void Optimizer_Paused(object sender, EventArgs e) {
    340340      if (ExecutionState == ExecutionState.Started) {
    341         batchRunStarted = false;
    342         batchRunPaused = true;
    343         batchRunStopped = false;
    344341        OnPaused();
    345342      }
  • branches/HeuristicLab.TimeSeries/HeuristicLab.Optimization/3.3/Experiment.cs

    r7268 r7615  
    337337    private void optimizer_Prepared(object sender, EventArgs e) {
    338338      if (Optimizers.All(x => x.ExecutionState == ExecutionState.Prepared)) OnPrepared();
    339       else if (Optimizers.All(x => x.ExecutionState != ExecutionState.Started)) OnPaused();
    340339    }
    341340    private void optimizer_Started(object sender, EventArgs e) {
  • branches/HeuristicLab.TimeSeries/HeuristicLab.Optimization/3.3/Problems/Problem.cs

    r7460 r7615  
    2626using HeuristicLab.Common;
    2727using HeuristicLab.Core;
     28using HeuristicLab.Data;
    2829using HeuristicLab.Parameters;
    2930using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    9798    #endregion
    9899
     100    protected override IEnumerable<KeyValuePair<string, IItem>> GetCollectedValues(IItem value) {
     101      var children = base.GetCollectedValues(value);
     102      foreach (var child in children) {
     103        if (child.Value is IOperator)
     104          yield return new KeyValuePair<string, IItem>(child.Key, new StringValue(((IOperator)child.Value).Name));
     105        else yield return child;
     106      }
     107    }
     108
    99109    #region events
    100110    private void Operators_Changed(object sender, EventArgs e) {
Note: See TracChangeset for help on using the changeset viewer.