Ignore:
Timestamp:
01/03/17 23:04:56 (6 years ago)
Author:
jzenisek
Message:

#2719 enhanced the optimizer's functionality

Location:
branches/HeuristicLab.DatastreamAnalysis/HeuristicLab.DatastreamAnalysis/3.4
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DatastreamAnalysis/HeuristicLab.DatastreamAnalysis/3.4/Datastream.cs

    r14536 r14538  
    4343    protected const string SlidingWindowStepWidthParameterName = "SlidingWindowStepWidth";
    4444    protected const string SlidingWindowMovementIntervalParameterName = "SlidingWindowMovementInterval";
     45    protected const string FitnessPartitionParameterName = "FitnessPartition";
    4546
    4647    #region parameter properites
     
    5051    }
    5152
    52     public IFixedValueParameter<IntRange> InitialSlidingWindowParameter {
    53       get { return (IFixedValueParameter<IntRange>) Parameters[InitialSlidingWindowParameterName]; }
    54     }
    55 
    56     public IFixedValueParameter<IntValue> SlidingWindowSizeParameter {
    57       get { return (IFixedValueParameter<IntValue>)Parameters[InitialSlidingWindowParameterName]; }
    58     }
    59 
    60     public IFixedValueParameter<IntValue> SlidingWindowStepWidthParameter {
    61       get { return (IFixedValueParameter<IntValue>)Parameters[SlidingWindowStepWidthParameterName]; }
    62     }
    63 
    64     public IFixedValueParameter<IntValue> SlidingWindowMovementIntervalParameter {
    65       get { return (IFixedValueParameter<IntValue>)Parameters[SlidingWindowMovementIntervalParameterName]; }
    66     }
    67 
     53    public IValueParameter<IntRange> InitialSlidingWindowParameter {
     54      get { return (IValueParameter<IntRange>) Parameters[InitialSlidingWindowParameterName]; }
     55    }
     56
     57    public IValueParameter<IntValue> SlidingWindowSizeParameter {
     58      get { return (IValueParameter<IntValue>) Parameters[SlidingWindowSizeParameterName]; }
     59    }
     60
     61    public IValueParameter<IntValue> SlidingWindowStepWidthParameter {
     62      get { return (IValueParameter<IntValue>) Parameters[SlidingWindowStepWidthParameterName]; }
     63    }
     64
     65    public IValueParameter<IntValue> SlidingWindowMovementIntervalParameter {
     66      get { return (IValueParameter<IntValue>) Parameters[SlidingWindowMovementIntervalParameterName]; }
     67    }
     68
     69    //public IValueParameter<IntRange> FitnessPartitionParameter {
     70    //  get { return (IValueParameter<IntRange>) Parameters[FitnessPartitionParameterName]; }
     71    //}
    6872
    6973    #endregion
     
    7579      set {
    7680        if(value == null) throw new ArgumentNullException("problemData", "The provided value for the problemData is null.");
    77         if (value == ProblemData) return;
    7881        ProblemDataParameter.Value = value;
    79       }
    80     }
     82        //OnProblemDataChanged();
     83      }
     84    }
     85   
    8186
    8287    public IntRange InitialSlidingWindow {
    8388      get { return InitialSlidingWindowParameter.Value; }
     89      set { InitialSlidingWindowParameter.Value = value; }
    8490    }
    8591
    8692    public IntValue SlidingWindowSize {
    8793      get { return SlidingWindowSizeParameter.Value; }
     94      set { SlidingWindowSizeParameter.Value = value; }
    8895    }
    8996
    9097    public IntValue SlidingWindowStepWidth {
    9198      get { return SlidingWindowStepWidthParameter.Value; }
     99      set { SlidingWindowStepWidthParameter.Value = value; }
    92100    }
    93101
    94102    public IntValue SlidingWindowMovementInterval {
    95103      get { return SlidingWindowMovementIntervalParameter.Value; }
     104      set { SlidingWindowMovementIntervalParameter.Value = value; }
    96105    }
    97106
     
    101110
    102111    public IntRange FitnessPartition { get; set; }
     112
     113    public bool UpdateAvailable {
     114      get { return false; }
     115    }
    103116
    104117    public bool SlidingWindowMovementPossible {
    105118      get {
    106119        return ProblemData != null && ProblemData.Dataset != null &&
    107                FitnessPartition.End + SlidingWindowStepWidth.Value <= ProblemData.Dataset.Rows;
    108         // TODO: add external datastream, hub, etc to condition
     120               (
     121                (FitnessPartition.End + SlidingWindowStepWidth.Value <= ProblemData.Dataset.Rows) // shift end
     122                || (FitnessPartition.Size > SlidingWindowSize.Value && (FitnessPartition.Start + SlidingWindowStepWidth.Value) < FitnessPartition.End) // shift start
     123               );
    109124      }
    110125    }
     
    112127    public bool SlidingWindowEvaluationPossible {
    113128      get {
    114         return ProblemData != null && ProblemData.Dataset != null &&
    115               FitnessPartition.Size > 0;
     129        //return ProblemData != null && ProblemData.Dataset != null && ProblemData.Dataset.Rows > 0 && FitnessPartition.Size > 0;
     130        return FitnessPartition.Size > 0;
    116131      }
    117132    }
     
    120135      if (ProblemData?.Dataset == null || ProblemData.Dataset.Rows == 0) return false;
    121136      if (FitnessPartition.End + SlidingWindowStepWidth.Value > ProblemData.Dataset.Rows) return false;
    122      
    123       if (FitnessPartition.Size > SlidingWindowSize.Value) {
    124         FitnessPartition.Start += SlidingWindowStepWidth.Value;
    125       } else if (FitnessPartition.Size == SlidingWindowSize.Value) {
     137
     138      if (FitnessPartition.Size == SlidingWindowSize.Value) {
    126139        FitnessPartition.Start += SlidingWindowStepWidth.Value;
    127140        FitnessPartition.End += SlidingWindowStepWidth.Value;
    128       } else {
     141      } else { 
    129142        FitnessPartition.End += SlidingWindowStepWidth.Value;
    130       }   
     143        FitnessPartition.Start += FitnessPartition.End - SlidingWindowSize.Value;
     144      }
     145
     146      //if (FitnessPartition.Size > SlidingWindowSize.Value) {
     147      //  FitnessPartition.Start += SlidingWindowStepWidth.Value;
     148      //} else if (FitnessPartition.Size == SlidingWindowSize.Value) {
     149      //  FitnessPartition.Start += SlidingWindowStepWidth.Value;
     150      //  FitnessPartition.End += SlidingWindowStepWidth.Value;
     151      //} else {
     152      //  FitnessPartition.End += SlidingWindowStepWidth.Value;
     153      //  if (FitnessPartition.Size > SlidingWindowSize.Value) {
     154      //    FitnessPartition.Start = FitnessPartition.End - FitnessPartition.Size;
     155      //  }
     156      //}   
    131157      return true;
    132158    }
     
    141167    private void AfterDeserialization() {
    142168      RegisterParameterEvents();
     169      RecoverState();
    143170    }
    144171
    145172    protected Datastream(Datastream original, Cloner cloner) : base(original, cloner) {
    146173      RegisterParameterEvents();
     174      RecoverState();
    147175    }
    148176
     
    151179    }
    152180
    153     public Datastream() {
     181    public Datastream() : base() {
    154182      Parameters.Add(new ValueParameter<RegressionProblemData>(ProblemDataParameterName, "ProblemData for analysis with selected ensembles.", null));
    155       Parameters.Add(new FixedValueParameter<IntRange>(InitialSlidingWindowParameterName, "Initial sliding window boundaries", new IntRange(0, 1)));
    156       Parameters.Add(new FixedValueParameter<IntValue>(SlidingWindowSizeParameterName, "Sliding window size", new IntValue(1)));
     183      Parameters.Add(new FixedValueParameter<IntRange>(InitialSlidingWindowParameterName, "Initial sliding window boundaries", new IntRange(0, 5)));
     184      Parameters.Add(new FixedValueParameter<IntValue>(SlidingWindowSizeParameterName, "Sliding window size", new IntValue(5)));
    157185      Parameters.Add(new FixedValueParameter<IntValue>(SlidingWindowStepWidthParameterName, "Sliding window step width", new IntValue(1)));
    158       Parameters.Add(new FixedValueParameter<IntValue>(SlidingWindowMovementIntervalParameterName, "Sliding window movement interval (milliseconds)", new IntValue(1000)));
     186      Parameters.Add(new FixedValueParameter<IntValue>(SlidingWindowMovementIntervalParameterName, "Sliding window movement interval (milliseconds)", new IntValue(2000)));
     187      RegisterParameterEvents();
    159188      InitializeState();
    160189    }
    161190    #endregion
    162191
    163 
    164     public void InitializeState() {
     192    public void InitializeState(){
    165193      if (ProblemData == null || ProblemData.Dataset == null || ProblemData.Dataset.Rows == 0) {
    166194        FitnessPartition = new IntRange(0, 0);
     
    173201    }
    174202
     203    public void RecoverState() {
     204      if (ProblemData == null || ProblemData.Dataset == null || ProblemData.Dataset.Rows == 0) {
     205        FitnessPartition = new IntRange(0, 0);
     206      } else {
     207        if(FitnessPartition == null) FitnessPartition = (IntRange)InitialSlidingWindow.Clone();
     208        if (FitnessPartition.End > ProblemData.Dataset.Rows) {
     209          FitnessPartition.End = ProblemData.Dataset.Rows;
     210        }
     211      }
     212    }
     213
    175214    public event EventHandler ProblemDataChanged;
    176 
     215    public event EventHandler Reset;
     216    public event EventHandler SlidingWindowChanged;
     217
     218
     219    //protected virtual void OnProblemDataChanged() {
     220    //  EventHandler handler = ProblemDataChanged;
     221    //  if(handler != null) handler(this, EventArgs.Empty);
     222    //}
     223
     224    //protected virtual void OnReset() {
     225    //  EventHandler handler = Reset;
     226    //  if (handler != null) handler(this, EventArgs.Empty);
     227    //}
    177228
    178229    private void RegisterParameterEvents() {
    179230      ProblemDataParameter.ValueChanged += new EventHandler(ProblemData_ValueChanged);
     231      //SlidingWindowSizeParameter.ValueChanged += new EventHandler(SlidingWindow_Changed);
     232      InitialSlidingWindowParameter.ValueChanged += new EventHandler(SlidingWindow_Changed);
    180233    }
    181234
     
    183236      if (e == null) return;
    184237
     238      InitializeState();
    185239      DatastreamAnalysisUtil.RaiseEvent(this, ProblemDataChanged);
    186240    }
    187241
     242    private void SlidingWindow_Changed(object sender, EventArgs e) {
     243      InitializeState();
     244    }
     245
     246
     247    // TODO
     248    public IEnumerable<IParameterizedItem> ExecutionContextItems { get; }
    188249   
    189 
    190250  }
    191251}
  • branches/HeuristicLab.DatastreamAnalysis/HeuristicLab.DatastreamAnalysis/3.4/DatastreamAnalysisOptimizer.cs

    r14536 r14538  
    2424using System;
    2525using System.Collections.Generic;
     26using System.ComponentModel;
    2627using System.Diagnostics;
    2728using System.Drawing;
     
    7677    private bool stopPending;
    7778    private DateTime lastUpdateTime;
     79    private bool prepared;
     80    private bool finished;
    7881
    7982    [Storable]
     
    106109        if (value == null || value == ensembles)
    107110          return;
    108 
     111        if(!(value is IRegressionEnsembleModel)) throw new ArgumentException("Invaid ensemble model type");
     112        DeregisterEnsembleEvents();
    109113        ensembles = value;
     114        RegisterEnsembleEvents();
     115        OnEnsemblesChanged();
     116        Prepare();
    110117      }
    111118    }
     
    121128        if (value == null || value == datastream)
    122129          return;
    123 
     130        if(!(value is IDatastream)) throw new ArgumentException("Invalid datastream type");
     131        DeregisterDatastreamEvents();
    124132        datastream = value;
     133        RegisterDatastreamEvents();
     134        OnDatastreamChanged();
     135        Prepare();
    125136      }
    126137    }
     
    128139    #endregion properties
    129140
    130     #region ResultsProperties
    131     private double ResultsBestQuality
    132     {
     141    #region results properties
     142    private int ResultsSlidingWindowMovements {
     143      get { return ((IntValue)Results["Sliding Window Movements"].Value).Value; }
     144      set { ((IntValue)Results["Sliding Window Movements"].Value).Value = value; }
     145    }
     146    private double ResultsBestQuality {
    133147      get { return ((DoubleValue)Results["Best Quality"].Value).Value; }
    134148      set { ((DoubleValue)Results["Best Quality"].Value).Value = value; }
    135149    }
    136     private DataTable ResultsQualities
    137     {
     150    private DataTable ResultsQualities {
    138151      get { return ((DataTable)Results["Qualities"].Value); }
    139152    }
     153
     154    private const string ResultsQualitiesR2 = "R²";
     155    private const string ResultsQualitiesPearson = "Pearson";
     156
     157    private DataTable ResultsTargets {
     158      get { return ((DataTable) Results["Targets"].Value); }
     159    }
     160
     161    private const string ResultsTargetsReal = "Real";
     162
     163    protected void SetupResults() {
     164      Results.Clear();
     165
     166      Results.Add(new Result("Sliding Window Movements", new IntValue(0)));
     167      Results.Add(new Result("Best Quality", new DoubleValue(0)));
     168      Results.Add(new Result("Qualities", new DataTable("Qualities")));
     169      Results.Add(new Result("Targets", new DataTable("Targets")));
     170
     171      ResultsQualities.Rows.Add(new DataRow(ResultsQualitiesR2));
     172      ResultsQualities.Rows.Add(new DataRow(ResultsQualitiesPearson));
     173      ResultsTargets.Rows.Add(new DataRow(ResultsTargetsReal));
     174      foreach (var ensemble in Ensembles) {
     175        ResultsTargets.Rows.Add(new DataRow(ensemble.Name));
     176      }
     177    }
     178
    140179    #endregion
    141180
    142181    #region constructors, cloner,...
    143182
    144     public DatastreamAnalysisOptimizer() {
     183    public DatastreamAnalysisOptimizer() : base() {
    145184      name = "Datastream Analysis";
    146185      log = new Log();
     
    159198    [StorableHook(HookType.AfterDeserialization)]
    160199    private void AfterDeserialization() {
    161       // nothing to do in here
     200      Initialize();
    162201    }
    163202
     
    179218    private void Initialize() {
    180219      if (runs != null) RegisterRunsEvents();
     220      if (datastream != null) RegisterDatastreamEvents();
     221      if (ensembles != null) RegisterEnsembleEvents();
    181222    }
    182223    #endregion
     
    185226
    186227    public override void Prepare() {
    187       if (ensembles == null || datastream == null) return;
    188       Prepare(true);
     228      if (ensembles == null || ensembles.Count == 0 || datastream == null || !datastream.SlidingWindowEvaluationPossible) return;
     229      //if (ensembles.SelectMany(x => x.Models).Count() == 0) return;
     230      base.Prepare();
     231      OnPrepared();
    189232    }
    190233
    191234    public void Prepare(bool clearRuns) {
    192       if (ensembles == null || datastream == null) return;
     235      if (ensembles == null || ensembles.Count == 0 || datastream == null || !datastream.SlidingWindowEvaluationPossible) return;
     236
    193237      base.Prepare();
    194       if (clearRuns) results.Clear();
     238      if (clearRuns) runs.Clear();
    195239      OnPrepared();
    196240    }
     
    201245      cancellationTokenSource = new CancellationTokenSource();
    202246      stopPending = false;
     247
     248      if (prepared) {
     249        SetupResults();
     250        //prepared = false;
     251      }
    203252
    204253      Task task = Task.Factory.StartNew(Run, cancellationTokenSource.Token, cancellationTokenSource.Token);
     
    219268
    220269        // handle stop/pause
    221         if(stopPending) { }
    222         if(!Datastream.SlidingWindowMovementPossible) OnStopped();
    223         else OnPaused();
     270        if (stopPending || finished) {
     271          OnStopped();
     272        } else {
     273          OnPaused();
     274        }
     275        //if(!Datastream.SlidingWindowMovementPossible) OnStopped();
     276        //else OnPaused();
    224277      });
    225278
     
    244297
    245298    protected override void OnPrepared() {
     299      ExecutionTime = TimeSpan.Zero;
     300      foreach (IStatefulItem statefulItem in this.GetObjectGraphObjects(new HashSet<object>() {Runs}).OfType<IStatefulItem>()) {
     301        statefulItem.InitializeState();
     302      }
     303      results.Clear();
     304      prepared = true;
     305      finished = false;
    246306      Log.LogMessage("Datastream analysis prepared");
    247307      base.OnPrepared();
     
    259319
    260320    protected override void OnStopped() {
    261       Log.LogMessage("Datastream analysis stopped");
    262       base.OnStopped();
     321      try {
     322        runsCounter++;
     323        var run = new Run();
     324        run.Filename = Filename;
     325        run.Name = string.Format("{0} Run {1}", Name, runsCounter);
     326        CollectParameterValues(run.Parameters);
     327        CollectResultValues(run.Results);
     328        runs.Add(run);
     329      }
     330      finally {
     331        Log.LogMessage("Datastream analysis stopped");
     332        base.OnStopped();
     333      }
    263334    }
    264335
    265336    #endregion
    266337
    267 
     338    #region run
    268339    private void Run(object state) {
    269340      CancellationToken cancellationToken = (CancellationToken) state;
     
    287358    }
    288359
     360    private int replayedIndex;
     361
    289362    protected void Run(CancellationToken cancellationToken) {
    290 
    291       // setup results
    292       var slidingWindowMovements = new IntValue(0);
    293       Results.Add(new Result("Sliding Window Movements", slidingWindowMovements));
    294 
    295       var qtable = new DataTable("Qualities");
    296       qtable.Rows.Add(new DataRow("R²"));
    297       qtable.Rows.Add(new DataRow("Pearson"));
    298       Results.Add(new Result("Qualities", qtable));
    299 
    300       var curLoss = new DoubleValue();
    301       Results.Add(new Result("R²", curLoss));
    302       Results.Add(new Result("Best Quality", curLoss));
    303 
    304 
    305363      // init algorithm
    306364      var problemData = Datastream.ProblemData;
    307365      var targetVarName = problemData.TargetVariable;
    308366      var activeVariables = problemData.AllowedInputVariables;
     367
     368      if (prepared) {
     369        // replay datastream until FitnessPartition.End
     370        //for (int i = 0; i < Datastream.FitnessPartition.End; i++) {
     371        //  var val = problemData.Dataset.GetDoubleValue(targetVarName, i);
     372        //  ResultsTargets.Rows[ResultsTargetsReal].Values.Add(val);
     373        //}
     374        //replayedIndex = Datastream.FitnessPartition.End;
     375        replayedIndex = 0;
     376        prepared = false;
     377      }
     378
     379
    309380      Random rnd = new Random();
    310381
    311382      try {
    312         while (Datastream.SlidingWindowMovementPossible) {
    313           cancellationToken.ThrowIfCancellationRequested();
    314 
    315           Task.Delay(Datastream.SlidingWindowMovementInterval.Value);
    316 
    317           Datastream.MoveSlidingWindow();
    318 
    319           // TODO do the window evaluation
    320 
    321           // TODO: collect results and display them
    322 
    323           curLoss.Value = rnd.Next(100);
    324           qtable.Rows["R²"].Values.Add(curLoss.Value);
    325           qtable.Rows["Pearson"].Values.Add(curLoss.Value % 10);
    326 
    327           slidingWindowMovements.Value++;
    328         }
    329 
    330         // TODO: collect runs (c.f. goal seeking)
     383        do {
     384          do {
     385            cancellationToken.ThrowIfCancellationRequested();
     386
     387            Thread.Sleep(Datastream.SlidingWindowMovementInterval.Value);
     388            Datastream.MoveSlidingWindow();
     389
     390            if (Datastream.SlidingWindowEvaluationPossible) {
     391              foreach (var ensemble in Ensembles) {
     392                // TODO do the window evaluation
     393                double estimatedVal = problemData.Dataset.GetDoubleValue(targetVarName, replayedIndex)
     394                                      * (1.0 + (((double)rnd.Next(0, 30)) / 100));
     395                for (int i = replayedIndex; i < Datastream.FitnessPartition.End; i++) {
     396                  ResultsTargets.Rows[ensemble.Name].Values.Add(estimatedVal);
     397                }
     398              }
     399            }
     400
     401            // replay datastream until FitnessPartition.End
     402            for (int i = replayedIndex; i < Datastream.FitnessPartition.End; i++) {
     403              var val = problemData.Dataset.GetDoubleValue(targetVarName, i);
     404              ResultsTargets.Rows[ResultsTargetsReal].Values.Add(val);
     405            }
     406            replayedIndex = Datastream.FitnessPartition.End;
     407
     408
     409            // TODO: collect results and display them
     410
     411            int exp = rnd.Next(100);
     412            ResultsQualities.Rows[ResultsQualitiesR2].Values.Add(exp);
     413            ResultsQualities.Rows[ResultsQualitiesPearson].Values.Add((double)exp / 10);
     414            ResultsSlidingWindowMovements++;
     415            ResultsBestQuality = (double)exp / 42;
     416
     417          } while (Datastream.SlidingWindowMovementPossible);
     418        } while (Datastream.UpdateAvailable);
     419        finished = true;
    331420      }
    332421      catch (Exception ex) {
     
    349438    }
    350439
     440    public void CollectParameterValues(IDictionary<string, IItem> values) {
     441      values.Add("Datastream Analysis Name", new StringValue(Name));
     442      if (Datastream != null) {
     443        Datastream.CollectParameterValues(values);
     444        values.Add("Datastream Name", new StringValue(Datastream.Name));
     445      }
     446    }
     447
    351448    public void CollectResultValues(IDictionary<string, IItem> values) {
    352449      values.Add("Execution Time", new TimeSpanValue(ExecutionTime));
    353450      Results.CollectResultValues(values);
    354451    }
     452    #endregion
    355453
    356454    #region events
     455
     456    #region events registration
    357457
    358458    public EventHandler EnsemblesChanged;
     
    367467    }
    368468
     469    protected virtual void RegisterDatastreamEvents() {
     470      datastream.Reset += new EventHandler(Datastream_Reset);
     471      datastream.ProblemDataChanged += new EventHandler(Datastream_ProblemDataChanged);
     472    }
     473
     474    protected virtual void DeregisterDatastreamEvents() {
     475      datastream.Reset -= new EventHandler(Datastream_Reset);
     476      datastream.ProblemDataChanged -= new EventHandler(Datastream_ProblemDataChanged);
     477    }
     478
     479    protected virtual void RegisterEnsembleEvents() {
     480      ensembles.ItemsAdded += new CollectionItemsChangedEventHandler<IndexedItem<RegressionEnsembleModel>>(Ensembles_ItemsChanged);
     481      ensembles.ItemsMoved += new CollectionItemsChangedEventHandler<IndexedItem<RegressionEnsembleModel>>(Ensembles_ItemsChanged);
     482      ensembles.ItemsRemoved += new CollectionItemsChangedEventHandler<IndexedItem<RegressionEnsembleModel>>(Ensembles_ItemsChanged);
     483      ensembles.ItemsReplaced += new CollectionItemsChangedEventHandler<IndexedItem<RegressionEnsembleModel>>(Ensembles_ItemsChanged);
     484      ensembles.CollectionReset += new CollectionItemsChangedEventHandler<IndexedItem<RegressionEnsembleModel>>(Ensembles_Reset);
     485    }
     486
     487    protected virtual void DeregisterEnsembleEvents() {
     488      ensembles.ItemsAdded -= new CollectionItemsChangedEventHandler<IndexedItem<RegressionEnsembleModel>>(Ensembles_ItemsChanged);
     489      ensembles.ItemsMoved -= new CollectionItemsChangedEventHandler<IndexedItem<RegressionEnsembleModel>>(Ensembles_ItemsChanged);
     490      ensembles.ItemsRemoved -= new CollectionItemsChangedEventHandler<IndexedItem<RegressionEnsembleModel>>(Ensembles_ItemsChanged);
     491      ensembles.ItemsReplaced -= new CollectionItemsChangedEventHandler<IndexedItem<RegressionEnsembleModel>>(Ensembles_ItemsChanged);
     492      ensembles.CollectionReset -= new CollectionItemsChangedEventHandler<IndexedItem<RegressionEnsembleModel>>(Ensembles_Reset);
     493    }
     494    #endregion
     495
     496    #region event handling
     497
    369498    protected virtual void Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
    370499      runsCounter = runs.Count;
    371500    }
    372501
    373     #region event handling
     502    protected virtual void Datastream_Reset(object sender, EventArgs e) {
     503      Prepare();
     504    }
     505
     506    protected virtual void Datastream_ProblemDataChanged(object sender, EventArgs e) {
     507      Prepare();
     508    }
     509
     510    protected virtual void Ensembles_Reset(object sender, EventArgs e) {
     511      Prepare();
     512    }
     513
     514    protected virtual void Ensembles_ItemsChanged(object sender, EventArgs e) {
     515      Prepare();
     516    }
    374517
    375518    private void OnEnsemblesChanged() {
     
    389532    #endregion
    390533
    391     #region nameditem
    392 
    393     [Storable] protected string name;
     534    #region NamedItem
     535
     536    [Storable]
     537    protected string name;
    394538
    395539    /// <inheritdoc/>
  • branches/HeuristicLab.DatastreamAnalysis/HeuristicLab.DatastreamAnalysis/3.4/IDatastream.cs

    r14536 r14538  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using HeuristicLab.Common;
    2425using HeuristicLab.Core;
    2526
    2627namespace HeuristicLab.DatastreamAnalysis {
    27   public interface IDatastream : IParameterizedNamedItem, INamedItem, IItem, IContent, IDeepCloneable, ICloneable, IParameterizedItem {
     28  /// <summary>
     29  /// Interface to represent a datastream.
     30  /// </summary>
     31  public interface IDatastream : IParameterizedNamedItem {
     32    IEnumerable<IParameterizedItem> ExecutionContextItems { get; }
     33    event EventHandler Reset;
     34    event EventHandler ProblemDataChanged;
    2835  }
    2936}
  • branches/HeuristicLab.DatastreamAnalysis/HeuristicLab.DatastreamAnalysis/3.4/Plugin.cs

    r14536 r14538  
    2323
    2424namespace HeuristicLab.DatastreamAnalysis {
    25   [Plugin("HeuristicLab.DatastreamAnalysis", "3.4.14.14491")]
     25  [Plugin("HeuristicLab.DatastreamAnalysis", "3.4.14.14536")]
    2626  [PluginFile("HeuristicLab.DatastreamAnalysis-3.4.dll", PluginFileType.Assembly)]
    2727  [PluginDependency("HeuristicLab.Collections", "3.3")]
  • branches/HeuristicLab.DatastreamAnalysis/HeuristicLab.DatastreamAnalysis/3.4/Properties/AssemblyInfo.cs

    r14536 r14538  
    5454// [assembly: AssemblyVersion("1.0.*")]
    5555[assembly: AssemblyVersion("3.4.0.0")]
    56 [assembly: AssemblyFileVersion("3.4.14.14491")]
     56[assembly: AssemblyFileVersion("3.4.14.14536")]
Note: See TracChangeset for help on using the changeset viewer.