Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/07/13 12:57:40 (11 years ago)
Author:
ascheibe
Message:

#1886 added basic dialog for configuring a RunCollectionModifierTask

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/RunCollectionModifiers/RunCollectionModifierTask.cs

    r10111 r10113  
    3030using HeuristicLab.Hive;
    3131using HeuristicLab.Optimization;
     32using HeuristicLab.Parameters;
    3233using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3334
     
    3536  [Item("RunCollectionModifierTask", "An item that runs RunCollectionModifiers on RunCollections with Hive support.")]
    3637  [StorableClass]
    37   public class RunCollectionModifierTask : NamedItem, ITask {
     38  public class RunCollectionModifierTask : ParameterizedNamedItem, ITask {
    3839    public virtual bool IsParallelizable {
    3940      get { return false; }
     
    7172    }
    7273
    73     [Storable]
    74     protected ItemList<IRunCollectionModifier> runCollectionModifiers;
     74    public ValueParameter<ItemList<IRunCollectionModifier>> RunCollectionModifiersParameter {
     75      get { return (ValueParameter<ItemList<IRunCollectionModifier>>)Parameters["RunCollectionModifiers"]; }
     76    }
    7577    public ItemList<IRunCollectionModifier> RunCollectionModifiers {
    76       get { return runCollectionModifiers; }
     78      get { return RunCollectionModifiersParameter.Value; }
    7779    }
    7880
     
    100102    #region Constructors and Cloning
    101103    public RunCollectionModifierTask() {
    102       runCollectionModifiers = new ItemList<IRunCollectionModifier>();
     104      Parameters.Add(new ValueParameter<ItemList<IRunCollectionModifier>>("RunCollectionModifiers", "List of RunCollectionModifiers that are executed. ", new ItemList<IRunCollectionModifier>()));
    103105      executionStack = new Stack<IRunCollectionModifier>();
     106      runCollection = new RunCollection();
    104107      log = new Log();
    105108    }
     
    110113      executionTime = original.executionTime;
    111114      executionState = original.executionState;
    112       runCollectionModifiers = (ItemList<IRunCollectionModifier>)original.RunCollectionModifiers.Clone(cloner);
    113115      runCollection = (RunCollection)original.runCollection.Clone(cloner);
    114116      executionStack = new Stack<IRunCollectionModifier>();
     
    172174
    173175    public virtual void AddRunCollectionModifiers(IRunCollectionModifier modifier) {
    174       runCollectionModifiers.Add(modifier);
     176      RunCollectionModifiers.Add(modifier);
    175177    }
    176178
Note: See TracChangeset for help on using the changeset viewer.