Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10291 for trunk


Ignore:
Timestamp:
01/07/14 11:14:18 (11 years ago)
Author:
mkommend
Message:

#2119: Added interface for instrumented operators and adapted problem and encoding specific operators to provide instrumentation capabilities.

Location:
trunk/sources
Files:
1 added
67 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptySolutionCreator.cs

    r9456 r10291  
    3232  [StorableClass]
    3333  [NonDiscoverableType]
    34   public sealed class EmptySolutionCreator : Operator, ISolutionCreator {
     34  public sealed class EmptySolutionCreator : SingleSuccessorOperator, ISolutionCreator {
    3535    private string exceptionMessage;
    3636
  • trunk/sources/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj

    r9178 r10291  
    150150    <Compile Include="Interfaces\ICheckedMultiOperator.cs" />
    151151    <Compile Include="Interfaces\IConstrainedValueParameter.cs" />
     152    <Compile Include="Interfaces\IInstrumentedOperator.cs" />
    152153    <Compile Include="Interfaces\IMultiOperator.cs" />
    153154    <Compile Include="Interfaces\IFixedValueParameter.cs" />
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorCreator.cs

    r9456 r10291  
    3434  [Item("BinaryVectorCreator", "A base class for operators creating bool-valued vectors.")]
    3535  [StorableClass]
    36   public abstract class BinaryVectorCreator : SingleSuccessorOperator, IBinaryVectorCreator, IStochasticOperator {
     36  public abstract class BinaryVectorCreator : InstrumentedOperator, IBinaryVectorCreator, IStochasticOperator {
    3737    public override bool CanChangeName {
    3838      get { return false; }
     
    5858    }
    5959
    60     public sealed override IOperation Apply() {
     60    public sealed override IOperation InstrumentedApply() {
    6161      BinaryVectorParameter.ActualValue = Create(RandomParameter.ActualValue, LengthParameter.ActualValue);
    62       return base.Apply();
     62      return base.InstrumentedApply();
    6363    }
    6464
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorCrossover.cs

    r9456 r10291  
    3333  [Item("BinaryVectorCrossover", "A base class for operators that perform a crossover of bool-valued vectors.")]
    3434  [StorableClass]
    35   public abstract class BinaryVectorCrossover : SingleSuccessorOperator, IBinaryVectorCrossover, IStochasticOperator {
     35  public abstract class BinaryVectorCrossover : InstrumentedOperator, IBinaryVectorCrossover, IStochasticOperator {
    3636    public override bool CanChangeName {
    3737      get { return false; }
     
    5959    }
    6060
    61     public sealed override IOperation Apply() {
     61    public sealed override IOperation InstrumentedApply() {
    6262      ChildParameter.ActualValue = Cross(RandomParameter.ActualValue, ParentsParameter.ActualValue);
    63       return base.Apply();
     63      return base.InstrumentedApply();
    6464    }
    6565
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorManipulator.cs

    r9456 r10291  
    3333  [Item("BinaryVectorManipulator", "A base class for operators that manipulate bool-valued vectors.")]
    3434  [StorableClass]
    35   public abstract class BinaryVectorManipulator : SingleSuccessorOperator, IBinaryVectorManipulator, IStochasticOperator {
     35  public abstract class BinaryVectorManipulator : InstrumentedOperator, IBinaryVectorManipulator, IStochasticOperator {
    3636    public override bool CanChangeName {
    3737      get { return false; }
     
    5353    }
    5454
    55     public sealed override IOperation Apply() {
     55    public sealed override IOperation InstrumentedApply() {
    5656      Manipulate(RandomParameter.ActualValue, BinaryVectorParameter.ActualValue);
    57       return base.Apply();
     57      return base.InstrumentedApply();
    5858    }
    5959
  • trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorCreator.cs

    r9456 r10291  
    3434  [Item("IntegerVectorCreator", "A base class for operators creating int-valued vectors.")]
    3535  [StorableClass]
    36   public abstract class IntegerVectorCreator : SingleSuccessorOperator, IIntegerVectorCreator, IStochasticOperator {
     36  public abstract class IntegerVectorCreator : InstrumentedOperator, IIntegerVectorCreator, IStochasticOperator {
    3737    public override bool CanChangeName {
    3838      get { return false; }
     
    7979    #endregion
    8080
    81     public sealed override IOperation Apply() {
     81    public sealed override IOperation InstrumentedApply() {
    8282      IntegerVectorParameter.ActualValue = Create(RandomParameter.ActualValue, LengthParameter.ActualValue, BoundsParameter.ActualValue);
    83       return base.Apply();
     83      return base.InstrumentedApply();
    8484    }
    8585
  • trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorCrossover.cs

    r9456 r10291  
    5858    }
    5959
    60     public sealed override IOperation Apply() {
     60    public sealed override IOperation InstrumentedApply() {
    6161      ChildParameter.ActualValue = Cross(RandomParameter.ActualValue, ParentsParameter.ActualValue);
    62       return base.Apply();
     62      return base.InstrumentedApply();
    6363    }
    6464
  • trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorManipulator.cs

    r9456 r10291  
    5252    }
    5353
    54     public sealed override IOperation Apply() {
     54    public sealed override IOperation InstrumentedApply() {
    5555      Manipulate(RandomParameter.ActualValue, IntegerVectorParameter.ActualValue);
    56       return base.Apply();
     56      return base.InstrumentedApply();
    5757    }
    5858
  • trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorOperator.cs

    r9456 r10291  
    2929  [Item("IntegerVectorOperator", "Base class for integer vectoro operators.")]
    3030  [StorableClass]
    31   public abstract class IntegerVectorOperator : SingleSuccessorOperator, IIntegerVectorOperator {
     31  public abstract class IntegerVectorOperator : InstrumentedOperator, IIntegerVectorOperator {
    3232
    3333    [StorableConstructor]
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Creators/RandomPermutationCreator.cs

    r9456 r10291  
    3434  [Item("RandomPermutationCreator", "An operator which creates a new random permutation of integer values.")]
    3535  [StorableClass]
    36   public sealed class RandomPermutationCreator : SingleSuccessorOperator, IPermutationCreator, IStochasticOperator {
     36  public sealed class RandomPermutationCreator : InstrumentedOperator, IPermutationCreator, IStochasticOperator {
    3737    public override bool CanChangeName {
    3838      get { return false; }
     
    7272    }
    7373
    74     public override IOperation Apply() {
     74    public override IOperation InstrumentedApply() {
    7575      PermutationParameter.ActualValue = new Permutation(PermutationType, LengthParameter.ActualValue.Value, RandomParameter.ActualValue);
    76       return base.Apply();
     76      return base.InstrumentedApply();
    7777    }
    7878  }
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationCrossover.cs

    r9456 r10291  
    3333  [Item("PermutationCrossover", "A base class for permutation crossover operators.")]
    3434  [StorableClass]
    35   public abstract class PermutationCrossover : SingleSuccessorOperator, IPermutationCrossover, IStochasticOperator {
     35  public abstract class PermutationCrossover : InstrumentedOperator, IPermutationCrossover, IStochasticOperator {
    3636    public override bool CanChangeName {
    3737      get { return false; }
     
    6060    }
    6161
    62     public sealed override IOperation Apply() {
     62    public sealed override IOperation InstrumentedApply() {
    6363      ChildParameter.ActualValue = Cross(RandomParameter.ActualValue, ParentsParameter.ActualValue);
    64       return base.Apply();
     64      return base.InstrumentedApply();
    6565    }
    6666
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationManipulator.cs

    r9456 r10291  
    3333  [Item("PermutationManipulator", "A base class for permutation manipulation operators.")]
    3434  [StorableClass]
    35   public abstract class PermutationManipulator : SingleSuccessorOperator, IPermutationManipulator, IStochasticOperator {
     35  public abstract class PermutationManipulator : InstrumentedOperator, IPermutationManipulator, IStochasticOperator {
    3636    public override bool CanChangeName {
    3737      get { return false; }
     
    5454    }
    5555
    56     public sealed override IOperation Apply() {
     56    public sealed override IOperation InstrumentedApply() {
    5757      Manipulate(RandomParameter.ActualValue, PermutationParameter.ActualValue);
    58       return base.Apply();
     58      return base.InstrumentedApply();
    5959    }
    6060
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorCreator.cs

    r9456 r10291  
    3434  [Item("RealVectorCreator", "A base class for operators creating real-valued vectors.")]
    3535  [StorableClass]
    36   public abstract class RealVectorCreator : SingleSuccessorOperator, IRealVectorCreator, IStochasticOperator {
     36  public abstract class RealVectorCreator : InstrumentedOperator, IRealVectorCreator, IStochasticOperator {
    3737    public override bool CanChangeName {
    3838      get { return false; }
     
    6363    }
    6464
    65     public sealed override IOperation Apply() {
     65    public sealed override IOperation InstrumentedApply() {
    6666      RealVectorParameter.ActualValue = Create(RandomParameter.ActualValue, LengthParameter.ActualValue, BoundsParameter.ActualValue);
    67       return base.Apply();
     67      return base.InstrumentedApply();
    6868    }
    6969
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorCrossover.cs

    r9456 r10291  
    3535  [Item("RealVectorCrossover", "A base class for operators that perform a crossover of real-valued vectors.")]
    3636  [StorableClass]
    37   public abstract class RealVectorCrossover : SingleSuccessorOperator, IRealVectorCrossover, IStochasticOperator {
     37  public abstract class RealVectorCrossover : InstrumentedOperator, IRealVectorCrossover, IStochasticOperator {
    3838    public override bool CanChangeName {
    3939      get { return false; }
     
    9696    }
    9797
    98     public sealed override IOperation Apply() {
     98    public sealed override IOperation InstrumentedApply() {
    9999      RealVector result = Cross(RandomParameter.ActualValue, ParentsParameter.ActualValue);
    100100      ChildParameter.ActualValue = result;
    101101
    102       IOperation successor = base.Apply();
     102      IOperation successor = base.InstrumentedApply();
    103103      if (BoundsChecker != null) {
    104104        IOperation checkerOperation = ExecutionContext.CreateChildOperation(BoundsChecker);
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorManipulator.cs

    r9456 r10291  
    3535  [Item("RealVectorManipulator", "A base class for operators that manipulate real-valued vectors.")]
    3636  [StorableClass]
    37   public abstract class RealVectorManipulator : SingleSuccessorOperator, IRealVectorManipulator, IStochasticOperator {
     37  public abstract class RealVectorManipulator : InstrumentedOperator, IRealVectorManipulator, IStochasticOperator {
    3838    public override bool CanChangeName {
    3939      get { return false; }
     
    9090    }
    9191
    92     public sealed override IOperation Apply() {
     92    public sealed override IOperation InstrumentedApply() {
    9393      RealVector vector = RealVectorParameter.ActualValue;
    9494      Manipulate(RandomParameter.ActualValue, vector);
    9595
    96       IOperation successor = base.Apply();
     96      IOperation successor = base.InstrumentedApply();
    9797      if (BoundsChecker != null) {
    9898        IOperation checkerOperation = ExecutionContext.CreateChildOperation(BoundsChecker);
  • trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/Crossovers/JSMCrossover.cs

    r9456 r10291  
    4040    public abstract JSMEncoding Cross(IRandom random, JSMEncoding parent1, JSMEncoding parent2);
    4141
    42     public override IOperation Apply() {
     42    public override IOperation InstrumentedApply() {
    4343      var parents = ParentsParameter.ActualValue;
    4444
     
    4646        Cross(RandomParameter.ActualValue, parents[0] as JSMEncoding, parents[1] as JSMEncoding);
    4747
    48       return base.Apply();
     48      return base.InstrumentedApply();
    4949    }
    5050  }
  • trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/Manipulators/JSMManipulator.cs

    r9456 r10291  
    3939    protected abstract void Manipulate(IRandom random, IScheduleEncoding individual);
    4040
    41     public override IOperation Apply() {
     41    public override IOperation InstrumentedApply() {
    4242      var solution = ScheduleEncodingParameter.ActualValue as JSMEncoding;
    4343      if (solution == null) throw new InvalidOperationException("ScheduleEncoding was not found or is not of type JSMEncoding.");
    4444      Manipulate(RandomParameter.ActualValue, solution);
    45       return base.Apply();
     45      return base.InstrumentedApply();
    4646    }
    4747
  • trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/Crossovers/PWRCrossover.cs

    r9456 r10291  
    4040    public abstract PWREncoding Cross(IRandom random, PWREncoding parent1, PWREncoding parent2);
    4141
    42     public override IOperation Apply() {
     42    public override IOperation InstrumentedApply() {
    4343      var parents = ParentsParameter.ActualValue;
    4444
     
    4646        Cross(RandomParameter.ActualValue, parents[0] as PWREncoding, parents[1] as PWREncoding);
    4747
    48       return base.Apply();
     48      return base.InstrumentedApply();
    4949    }
    5050  }
  • trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/Manipulators/PWRManipulator.cs

    r9456 r10291  
    4040    protected abstract void Manipulate(IRandom random, PWREncoding individual);
    4141
    42     public override IOperation Apply() {
     42    public override IOperation InstrumentedApply() {
    4343      var solution = ScheduleEncodingParameter.ActualValue as PWREncoding;
    4444      if (solution == null) throw new InvalidOperationException("ScheduleEncoding was not found or is not of type PWREncoding.");
    4545      Manipulate(RandomParameter.ActualValue, solution);
    46       return base.Apply();
     46      return base.InstrumentedApply();
    4747    }
    4848
  • trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/Crossovers/PRVCrossover.cs

    r9456 r10291  
    4040    public abstract PRVEncoding Cross(IRandom random, PRVEncoding parent1, PRVEncoding parent2);
    4141
    42     public override IOperation Apply() {
     42    public override IOperation InstrumentedApply() {
    4343      var parents = ParentsParameter.ActualValue;
    4444      ChildParameter.ActualValue =
    4545        Cross(RandomParameter.ActualValue, parents[0] as PRVEncoding, parents[1] as PRVEncoding);
    46       return base.Apply();
     46      return base.InstrumentedApply();
    4747    }
    4848  }
  • trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/Manipulators/PRVManipulator.cs

    r9456 r10291  
    3939    protected abstract void Manipulate(IRandom random, PRVEncoding individual);
    4040
    41     public override IOperation Apply() {
     41    public override IOperation InstrumentedApply() {
    4242      var solution = ScheduleEncodingParameter.ActualValue as PRVEncoding;
    4343      if (solution == null) throw new InvalidOperationException("ScheduleEncoding was not found or is not of type PRVEncoding.");
    4444      Manipulate(RandomParameter.ActualValue, solution);
    45       return base.Apply();
     45      return base.InstrumentedApply();
    4646    }
    4747
  • trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleCreator.cs

    r9456 r10291  
    2929  [Item("ScheduleCreator", "Represents the generalized form of creators for Scheduling Problems.")]
    3030  [StorableClass]
    31   public abstract class ScheduleCreator : SingleSuccessorOperator, IScheduleCreator {
     31  public abstract class ScheduleCreator : InstrumentedOperator, IScheduleCreator {
    3232
    3333    public ILookupParameter<IScheduleEncoding> ScheduleEncodingParameter {
     
    4343    }
    4444
    45     public override IOperation Apply() {
     45    public override IOperation InstrumentedApply() {
    4646      ScheduleEncodingParameter.ActualValue = CreateSolution();
    47       return base.Apply();
     47      return base.InstrumentedApply();
    4848    }
    4949
  • trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleCrossover.cs

    r9456 r10291  
    3030  [Item("ScheduleCrossover", "A scheduling crossover operation.")]
    3131  [StorableClass]
    32   public abstract class ScheduleCrossover : SingleSuccessorOperator, IScheduleCrossover, IStochasticOperator {
     32  public abstract class ScheduleCrossover : InstrumentedOperator, IScheduleCrossover, IStochasticOperator {
    3333
    3434    public ILookupParameter<IScheduleEncoding> ChildParameter {
  • trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Crossovers/DirectScheduleCrossover.cs

    r9456 r10291  
    4545    public abstract Schedule Cross(IRandom random, Schedule parent1, Schedule parent2);
    4646
    47     public override IOperation Apply() {
     47    public override IOperation InstrumentedApply() {
    4848      var parents = ParentsParameter.ActualValue;
    4949      ChildParameter.ActualValue =
    5050        Cross(RandomParameter.ActualValue, parents[0] as Schedule, parents[1] as Schedule);
    51       return base.Apply();
     51      return base.InstrumentedApply();
    5252    }
    5353  }
  • trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Manipulators/DirectScheduleManipulator.cs

    r9456 r10291  
    4040    protected abstract void Manipulate(IRandom random, Schedule individual);
    4141
    42     public override IOperation Apply() {
     42    public override IOperation InstrumentedApply() {
    4343      var schedule = ScheduleEncodingParameter.ActualValue as Schedule;
    4444      if (schedule == null) throw new InvalidOperationException("ScheduleEncoding was not found or is not of type Schedule.");
    4545      Manipulate(RandomParameter.ActualValue, schedule);
    46       return base.Apply();
     46      return base.InstrumentedApply();
    4747    }
    4848
  • trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleManipulator.cs

    r9456 r10291  
    3030  [Item("ScheduleManipulator", "A scheduling manipulation operation.")]
    3131  [StorableClass]
    32   public abstract class ScheduleManipulator : SingleSuccessorOperator, IScheduleManipulator, IStochasticOperator {
     32  public abstract class ScheduleManipulator : InstrumentedOperator, IScheduleManipulator, IStochasticOperator {
    3333
    3434    public ILookupParameter<IScheduleEncoding> ScheduleEncodingParameter {
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/FullTreeCreator.cs

    r9456 r10291  
    9494    }
    9595
    96     public override IOperation Apply() {
     96    public override IOperation InstrumentedApply() {
    9797      if (ClonedSymbolicExpressionTreeGrammarParameter.ActualValue == null) {
    9898        SymbolicExpressionTreeGrammarParameter.ActualValue.ReadOnly = true;
     
    104104          (ISymbolicExpressionGrammar)SymbolicExpressionTreeGrammarParameter.ActualValue.Clone()));
    105105      }
    106       return base.Apply();
     106      return base.InstrumentedApply();
    107107    }
    108108
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/GrowTreeCreator.cs

    r9456 r10291  
    9494    }
    9595
    96     public override IOperation Apply() {
     96    public override IOperation InstrumentedApply() {
    9797      if (ClonedSymbolicExpressionTreeGrammarParameter.ActualValue == null) {
    9898        SymbolicExpressionTreeGrammarParameter.ActualValue.ReadOnly = true;
     
    104104          (ISymbolicExpressionGrammar)SymbolicExpressionTreeGrammarParameter.ActualValue.Clone()));
    105105      }
    106       return base.Apply();
     106      return base.InstrumentedApply();
    107107    }
    108108
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/ProbabilisticTreeCreator.cs

    r9456 r10291  
    8787    }
    8888
    89     public override IOperation Apply() {
     89    public override IOperation InstrumentedApply() {
    9090      if (ClonedSymbolicExpressionTreeGrammarParameter.ActualValue == null) {
    9191        SymbolicExpressionTreeGrammarParameter.ActualValue.ReadOnly = true;
     
    9696        globalScope.Variables.Add(new Variable(ClonedSymbolicExpressionTreeGrammarParameterName, (ISymbolicExpressionGrammar)SymbolicExpressionTreeGrammarParameter.ActualValue.Clone()));
    9797      }
    98       return base.Apply();
     98      return base.InstrumentedApply();
    9999    }
    100100
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/RampedHalfAndHalfTreeCreator.cs

    r9456 r10291  
    9595    }
    9696
    97     public override IOperation Apply() {
     97    public override IOperation InstrumentedApply() {
    9898      if (ClonedSymbolicExpressionTreeGrammarParameter.ActualValue == null) {
    9999        SymbolicExpressionTreeGrammarParameter.ActualValue.ReadOnly = true;
     
    105105          (ISymbolicExpressionGrammar)SymbolicExpressionTreeGrammarParameter.ActualValue.Clone()));
    106106      }
    107       return base.Apply();
     107      return base.InstrumentedApply();
    108108    }
    109109
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/SymbolicExpressionTreeCreator.cs

    r9456 r10291  
    5454    }
    5555
    56     public override IOperation Apply() {
     56    public override IOperation InstrumentedApply() {
    5757      SymbolicExpressionTree = Create(Random);
    58       return base.Apply();
     58      return base.InstrumentedApply();
    5959    }
    6060
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SymbolicExpressionTreeCrossover.cs

    r9456 r10291  
    6363    }
    6464
    65     public sealed override IOperation Apply() {
     65    public sealed override IOperation InstrumentedApply() {
    6666      if (Parents.Length != 2)
    6767        throw new ArgumentException("Number of parents must be exactly two for symbolic expression tree crossover operators.");
     
    7070
    7171      Child = result;
    72       return base.Apply();
     72      return base.InstrumentedApply();
    7373    }
    7474
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/SymbolicExpressionTreeManipulator.cs

    r9456 r10291  
    2222using HeuristicLab.Common;
    2323using HeuristicLab.Core;
    24 using HeuristicLab.Data;
    2524using HeuristicLab.Parameters;
    2625using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    5554    }
    5655
    57     public sealed override IOperation Apply() {
     56    public sealed override IOperation InstrumentedApply() {
    5857      ISymbolicExpressionTree tree = SymbolicExpressionTreeParameter.ActualValue;
    5958      Manipulate(RandomParameter.ActualValue, tree);
    6059
    61       return base.Apply();
     60      return base.InstrumentedApply();
    6261    }
    6362
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeOperator.cs

    r9456 r10291  
    3434  [Item("SymbolicExpressionTreeOperator", "A base class for operators for symbolic expression trees.")]
    3535  [StorableClass]
    36   public abstract class SymbolicExpressionTreeOperator : SingleSuccessorOperator, IStochasticOperator, ISymbolicExpressionTreeOperator {
     36  public abstract class SymbolicExpressionTreeOperator : InstrumentedOperator, IStochasticOperator, ISymbolicExpressionTreeOperator {
    3737    private const string RandomParameterName = "Random";
    3838
  • trunk/sources/HeuristicLab.Operators/3.3/InstrumentedOperator.cs

    r10261 r10291  
    2020#endregion
    2121
     22using System.Collections.Generic;
    2223using System.Linq;
    2324using HeuristicLab.Common;
     
    2930  [Item("InstrumentedOperator", "A operator that can execute pre- and post actions.")]
    3031  [StorableClass]
    31   public abstract class InstrumentedOperator : SingleSuccessorOperator {
     32  public abstract class InstrumentedOperator : SingleSuccessorOperator, IInstrumentedOperator {
    3233    private const string BeforeExecutionOperatorsParameterName = "BeforeExecutionOperators";
    3334    private const string AfterExecutionOperatorsParameterName = "AfterExecutionOperators";
     
    4041    }
    4142
     43
     44    IEnumerable<IOperator> IInstrumentedOperator.BeforeExecutionOperators { get { return BeforeExecutionOperators; } }
    4245    public OperatorList BeforeExecutionOperators {
    4346      get { return BeforeExecutionOperatorsParameter.Value; }
    4447    }
     48    IEnumerable<IOperator> IInstrumentedOperator.AfterExecutionOperators { get { return AfterExecutionOperators; } }
    4549    public OperatorList AfterExecutionOperators {
    4650      get { return AfterExecutionOperatorsParameter.Value; }
  • trunk/sources/HeuristicLab.Optimization.Operators/3.3/ParentCopyCrossover.cs

    r9456 r10291  
    2929  [Item("ParentCopyCrossover", "This operator creates an offspring by creating a clone of a randomly chosen parent. It can be used in situations where no crossover should occur after selection.")]
    3030  [StorableClass]
    31   public class ParentCopyCrossover : SingleSuccessorOperator, ICrossover, IStochasticOperator {
     31  public class ParentCopyCrossover : InstrumentedOperator, ICrossover, IStochasticOperator {
    3232    public ILookupParameter<IRandom> RandomParameter {
    3333      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
     
    4343    }
    4444
    45     public override IOperation Apply() {
     45    public override IOperation InstrumentedApply() {
    4646      IScope scope = ExecutionContext.Scope;
    4747      int index = RandomParameter.ActualValue.Next(scope.SubScopes.Count);
     
    5151        scope.Variables.Add((IVariable)var.Clone());
    5252
    53       return base.Apply();
     53      return base.InstrumentedApply();
    5454    }
    5555
  • trunk/sources/HeuristicLab.Optimization/3.3/Problems/UserDefinedProblem.cs

    r9456 r10291  
    235235    private sealed class EmptyUserDefinedProblemEvaluator : ParameterizedNamedItem, ISingleObjectiveEvaluator {
    236236
     237      public IEnumerable<IOperator> BeforeExecutionOperators { get { throw new NotSupportedException(); } }
     238      public IEnumerable<IOperator> AfterExecutionOperators { get { throw new NotSupportedException(); } }
     239
    237240      [StorableConstructor]
    238241      private EmptyUserDefinedProblemEvaluator(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.4/Evaluator.cs

    r9456 r10291  
    3232  [Item("ArtificialAntEvaluator", "Evaluates an artificial ant solution.")]
    3333  [StorableClass]
    34   public class Evaluator : SingleSuccessorOperator, ISingleObjectiveEvaluator {
     34  public class Evaluator : InstrumentedOperator, ISingleObjectiveEvaluator {
    3535
    3636    public ILookupParameter<DoubleValue> QualityParameter {
     
    6060    }
    6161
    62     public sealed override IOperation Apply() {
     62    public sealed override IOperation InstrumentedApply() {
    6363      SymbolicExpressionTree expression = SymbolicExpressionTreeParameter.ActualValue;
    6464      BoolMatrix world = WorldParameter.ActualValue;
     
    7272
    7373      QualityParameter.ActualValue = new DoubleValue(interpreter.FoodEaten);
    74       return null;
     74      return base.InstrumentedApply();
    7575    }
    7676  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs

    r9456 r10291  
    4444    public override IEnumerable<bool> Maximization { get { return new bool[2] { false, false }; } }
    4545
    46     public override IOperation Apply() {
     46    public override IOperation InstrumentedApply() {
    4747      IEnumerable<int> rows = GenerateRowsToEvaluate();
    4848      var solution = SymbolicExpressionTreeParameter.ActualValue;
    4949      double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    5050      QualitiesParameter.ActualValue = new DoubleArray(qualities);
    51       return base.Apply();
     51      return base.InstrumentedApply();
    5252    }
    5353
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs

    r9456 r10291  
    4444    public override IEnumerable<bool> Maximization { get { return new bool[2] { true, false }; } }
    4545
    46     public override IOperation Apply() {
     46    public override IOperation InstrumentedApply() {
    4747      IEnumerable<int> rows = GenerateRowsToEvaluate();
    4848      var solution = SymbolicExpressionTreeParameter.ActualValue;
    4949      double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows, ApplyLinearScalingParameter.ActualValue.Value);
    5050      QualitiesParameter.ActualValue = new DoubleArray(qualities);
    51       return base.Apply();
     51      return base.InstrumentedApply();
    5252    }
    5353
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs

    r9456 r10291  
    4444    public override bool Maximization { get { return false; } }
    4545
    46     public override IOperation Apply() {
     46    public override IOperation InstrumentedApply() {
    4747      IEnumerable<int> rows = GenerateRowsToEvaluate();
    4848      var solution = SymbolicExpressionTreeParameter.ActualValue;
    4949      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows, ApplyLinearScalingParameter.ActualValue.Value);
    5050      QualityParameter.ActualValue = new DoubleValue(quality);
    51       return base.Apply();
     51      return base.InstrumentedApply();
    5252    }
    5353
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs

    r9456 r10291  
    4545    public override bool Maximization { get { return false; } }
    4646
    47     public override IOperation Apply() {
     47    public override IOperation InstrumentedApply() {
    4848      IEnumerable<int> rows = GenerateRowsToEvaluate();
    4949      var solution = SymbolicExpressionTreeParameter.ActualValue;
    5050      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows, ApplyLinearScalingParameter.ActualValue.Value);
    5151      QualityParameter.ActualValue = new DoubleValue(quality);
    52       return base.Apply();
     52      return base.InstrumentedApply();
    5353    }
    5454
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs

    r9456 r10291  
    4444    public override bool Maximization { get { return true; } }
    4545
    46     public override IOperation Apply() {
     46    public override IOperation InstrumentedApply() {
    4747      IEnumerable<int> rows = GenerateRowsToEvaluate();
    4848      var solution = SymbolicExpressionTreeParameter.ActualValue;
    4949      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows, ApplyLinearScalingParameter.ActualValue.Value);
    5050      QualityParameter.ActualValue = new DoubleValue(quality);
    51       return base.Apply();
     51      return base.InstrumentedApply();
    5252    }
    5353
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePenaltyScoreEvaluator.cs

    r9456 r10291  
    6464
    6565
    66     public override IOperation Apply() {
     66    public override IOperation InstrumentedApply() {
    6767      double quality = Evaluate(ExecutionContext, SymbolicExpressionTreeParameter.ActualValue, ProblemDataParameter.ActualValue, GenerateRowsToEvaluate());
    6868      QualityParameter.ActualValue = new DoubleValue(quality);
    69       return base.Apply();
     69      return base.InstrumentedApply();
    7070    }
    7171
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs

    r9456 r10291  
    4444    public override IEnumerable<bool> Maximization { get { return new bool[2] { false, false }; } }
    4545
    46     public override Core.IOperation Apply() {
     46    public override IOperation InstrumentedApply() {
    4747      IEnumerable<int> rows = GenerateRowsToEvaluate();
    4848      var solution = SymbolicExpressionTreeParameter.ActualValue;
    4949      double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows, ApplyLinearScalingParameter.ActualValue.Value);
    5050      QualitiesParameter.ActualValue = new DoubleArray(qualities);
    51       return base.Apply();
     51      return base.InstrumentedApply();
    5252    }
    5353
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs

    r9456 r10291  
    4444    public override IEnumerable<bool> Maximization { get { return new bool[2] { true, false }; } }
    4545
    46     public override IOperation Apply() {
     46    public override IOperation InstrumentedApply() {
    4747      IEnumerable<int> rows = GenerateRowsToEvaluate();
    4848      var solution = SymbolicExpressionTreeParameter.ActualValue;
    4949      double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows, ApplyLinearScalingParameter.ActualValue.Value);
    5050      QualitiesParameter.ActualValue = new DoubleArray(qualities);
    51       return base.Apply();
     51      return base.InstrumentedApply();
    5252    }
    5353
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs

    r9456 r10291  
    102102    }
    103103
    104     public override IOperation Apply() {
     104    public override IOperation InstrumentedApply() {
    105105      var solution = SymbolicExpressionTreeParameter.ActualValue;
    106106      double quality;
     
    121121      QualityParameter.ActualValue = new DoubleValue(quality);
    122122
    123       if (Successor != null)
    124         return ExecutionContext.CreateOperation(Successor);
    125       else
    126         return null;
     123      return base.InstrumentedApply();
    127124    }
    128125
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveMaxAbsoluteErrorEvaluator.cs

    r9456 r10291  
    4242    public SymbolicRegressionSingleObjectiveMaxAbsoluteErrorEvaluator() : base() { }
    4343
    44     public override IOperation Apply() {
     44    public override IOperation InstrumentedApply() {
    4545      var solution = SymbolicExpressionTreeParameter.ActualValue;
    4646      IEnumerable<int> rows = GenerateRowsToEvaluate();
     
    4949      QualityParameter.ActualValue = new DoubleValue(quality);
    5050
    51       return base.Apply();
     51      return base.InstrumentedApply();
    5252    }
    5353
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveMeanAbsoluteErrorEvaluator.cs

    r9456 r10291  
    4242    public SymbolicRegressionSingleObjectiveMeanAbsoluteErrorEvaluator() : base() { }
    4343
    44     public override IOperation Apply() {
     44    public override IOperation InstrumentedApply() {
    4545      var solution = SymbolicExpressionTreeParameter.ActualValue;
    4646      IEnumerable<int> rows = GenerateRowsToEvaluate();
     
    4949      QualityParameter.ActualValue = new DoubleValue(quality);
    5050
    51       return base.Apply();
     51      return base.InstrumentedApply();
    5252    }
    5353
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs

    r9456 r10291  
    4242    public SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator() : base() { }
    4343
    44     public override IOperation Apply() {
     44    public override IOperation InstrumentedApply() {
    4545      var solution = SymbolicExpressionTreeParameter.ActualValue;
    4646      IEnumerable<int> rows = GenerateRowsToEvaluate();
     
    4949      QualityParameter.ActualValue = new DoubleValue(quality);
    5050
    51       return base.Apply();
     51      return base.InstrumentedApply();
    5252    }
    5353
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs

    r9456 r10291  
    4444    public override bool Maximization { get { return true; } }
    4545
    46     public override IOperation Apply() {
     46    public override IOperation InstrumentedApply() {
    4747      var solution = SymbolicExpressionTreeParameter.ActualValue;
    4848      IEnumerable<int> rows = GenerateRowsToEvaluate();
     
    5151      QualityParameter.ActualValue = new DoubleValue(quality);
    5252
    53       return base.Apply();
     53      return base.InstrumentedApply();
    5454    }
    5555
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveMeanSquaredErrorEvaluator.cs

    r9462 r10291  
    4444    public override bool Maximization { get { return false; } }
    4545
    46     public override IOperation Apply() {
     46    public override IOperation InstrumentedApply() {
    4747      var solution = SymbolicExpressionTreeParameter.ActualValue;
    4848      IEnumerable<int> rows = GenerateRowsToEvaluate();
     
    5656      QualityParameter.ActualValue = new DoubleValue(quality);
    5757
    58       return base.Apply();
     58      return base.InstrumentedApply();
    5959    }
    6060
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisEvaluator.cs

    r9456 r10291  
    3535namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    3636  [StorableClass]
    37   public abstract class SymbolicDataAnalysisEvaluator<T> : SingleSuccessorOperator,
     37  public abstract class SymbolicDataAnalysisEvaluator<T> : InstrumentedOperator,
    3838    ISymbolicDataAnalysisEvaluator<T>, ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator, IStochasticOperator
    3939  where T : class, IDataAnalysisProblemData {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Symbolic/SingleObjective/ProfitEvaluator.cs

    r9989 r10291  
    4747    public override bool Maximization { get { return true; } }
    4848
    49     public override IOperation Apply() {
     49    public override IOperation InstrumentedApply() {
    5050      var solution = SymbolicExpressionTreeParameter.ActualValue;
    5151      IEnumerable<int> rows = GenerateRowsToEvaluate();
     
    5454      QualityParameter.ActualValue = new DoubleValue(quality);
    5555
    56       return base.Apply();
     56      return base.InstrumentedApply();
    5757    }
    5858
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Symbolic/SingleObjective/SharpeRatioEvaluator.cs

    r9989 r10291  
    4747    public override bool Maximization { get { return true; } }
    4848
    49     public override IOperation Apply() {
     49    public override IOperation InstrumentedApply() {
    5050      var solution = SymbolicExpressionTreeParameter.ActualValue;
    5151      IEnumerable<int> rows = GenerateRowsToEvaluate();
     
    5454      QualityParameter.ActualValue = new DoubleValue(quality);
    5555
    56       return base.Apply();
     56      return base.InstrumentedApply();
    5757    }
    5858
  • trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Evaluators/KnapsackEvaluator.cs

    r9456 r10291  
    3535  [Item("KnapsackEvaluator", "Evaluates solutions for the Knapsack problem.")]
    3636  [StorableClass]
    37   public class KnapsackEvaluator : SingleSuccessorOperator, IKnapsackEvaluator {
     37  public class KnapsackEvaluator : InstrumentedOperator, IKnapsackEvaluator {
    3838    public ILookupParameter<DoubleValue> QualityParameter {
    3939      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
     
    129129    }
    130130
    131     public sealed override IOperation Apply() {
     131    public sealed override IOperation InstrumentedApply() {
    132132      BinaryVector v = BinaryVectorParameter.ActualValue;
    133133
     
    143143      AppliedPenaltyParameter.ActualValue = evaluation.AppliedPenalty;
    144144
    145       return base.Apply();
     145      return base.InstrumentedApply();
    146146    }
    147147  }
  • trunk/sources/HeuristicLab.Problems.LawnMower/3.3/Evaluator.cs

    r9456 r10291  
    3232  [StorableClass]
    3333  [Item("Lawn Mower Evaluator", "Evaluator for the lawn mower demo GP problem.")]
    34   public class Evaluator : SingleSuccessorOperator, ISingleObjectiveEvaluator {
     34  public class Evaluator : InstrumentedOperator, ISingleObjectiveEvaluator {
    3535
    3636    private const string QualityParameterName = "Quality";
     
    7272      return new Evaluator(this, cloner);
    7373    }
    74     public override IOperation Apply() {
     74    public override IOperation InstrumentedApply() {
    7575      int length = LawnLengthParameter.ActualValue.Value;
    7676      int width = LawnWidthParameter.ActualValue.Value;
     
    8888
    8989      QualityParameter.ActualValue = new DoubleValue(numberOfMowedCells);
    90       return base.Apply();
     90      return base.InstrumentedApply();
    9191    }
    9292  }
  • trunk/sources/HeuristicLab.Problems.LinearAssignment/3.3/LAPEvaluator.cs

    r9456 r10291  
    3232  [Item("LAPEvaluator", "Evaluates a solution to the linear assignment problem.")]
    3333  [StorableClass]
    34   public class LAPEvaluator : SingleSuccessorOperator, ILAPEvaluator {
     34  public class LAPEvaluator : InstrumentedOperator, ILAPEvaluator {
    3535
    3636    public ILookupParameter<DoubleMatrix> CostsParameter {
     
    4747    protected LAPEvaluator(bool deserializing) : base(deserializing) { }
    4848    protected LAPEvaluator(LAPEvaluator original, Cloner cloner) : base(original, cloner) { }
    49     public LAPEvaluator() : base() {
     49    public LAPEvaluator()
     50      : base() {
    5051      Parameters.Add(new LookupParameter<DoubleMatrix>("Costs", LinearAssignmentProblem.CostsDescription));
    5152      Parameters.Add(new LookupParameter<Permutation>("Assignment", "The assignment solution to evaluate."));
     
    5758    }
    5859
    59     public override IOperation Apply() {
     60    public override IOperation InstrumentedApply() {
    6061      var costs = CostsParameter.ActualValue;
    6162      var assignment = AssignmentParameter.ActualValue;
     
    6970
    7071      QualityParameter.ActualValue = new DoubleValue(quality);
    71       return base.Apply();
     72      return base.InstrumentedApply();
    7273    }
    7374  }
  • trunk/sources/HeuristicLab.Problems.OneMax/3.3/Evaluators/OneMaxEvaluator.cs

    r9456 r10291  
    3434  [Item("OneMaxEvaluator", "Evaluates solutions for the OneMax problem.")]
    3535  [StorableClass]
    36   public class OneMaxEvaluator : SingleSuccessorOperator, IOneMaxEvaluator {
     36  public class OneMaxEvaluator : InstrumentedOperator, IOneMaxEvaluator {
    3737    public ILookupParameter<DoubleValue> QualityParameter {
    3838      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
     
    5656    }
    5757
    58     public sealed override IOperation Apply() {
     58    public sealed override IOperation InstrumentedApply() {
    5959      BinaryVector v = BinaryVectorParameter.ActualValue;
    6060
     
    6767      QualityParameter.ActualValue = new DoubleValue(quality);
    6868
    69       return base.Apply();
     69      return base.InstrumentedApply();
    7070    }
    7171  }
  • trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators/QAPEvaluator.cs

    r9456 r10291  
    3030namespace HeuristicLab.Problems.QuadraticAssignment {
    3131  [StorableClass]
    32   public class QAPEvaluator : SingleSuccessorOperator, IQAPEvaluator {
     32  public class QAPEvaluator : InstrumentedOperator, IQAPEvaluator {
    3333
    3434    public ILookupParameter<Permutation> PermutationParameter {
     
    7878    }
    7979
    80     public override IOperation Apply() {
     80    public override IOperation InstrumentedApply() {
    8181      Permutation assignment = PermutationParameter.ActualValue;
    8282      DoubleMatrix weights = WeightsParameter.ActualValue;
     
    8686      QualityParameter.ActualValue = new DoubleValue(quality);
    8787
    88       return base.Apply();
     88      return base.InstrumentedApply();
    8989    }
    9090  }
  • trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Evaluators/ScheduleEvaluator.cs

    r9456 r10291  
    3131  [Item("Schedule Evaluator", "Represents a base class for schedule evaluators.")]
    3232  [StorableClass]
    33   public abstract class ScheduleEvaluator : SingleSuccessorOperator, IScheduleEvaluator {
     33  public abstract class ScheduleEvaluator : InstrumentedOperator, IScheduleEvaluator {
    3434
    3535    public ILookupParameter<DoubleValue> QualityParameter {
     
    5151    protected abstract double Evaluate(Schedule schedule);
    5252
    53     public override IOperation Apply() {
     53    public override IOperation InstrumentedApply() {
    5454      QualityParameter.ActualValue = new DoubleValue(Evaluate(ScheduleParameter.ActualValue));
    55       return base.Apply();
     55      return base.InstrumentedApply();
    5656    }
    5757  }
  • trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Evaluators/SchedulingEvaluator.cs

    r9456 r10291  
    3232  [Item("SchedulingEvaluator", "First applies the decoder operator to obtain a schedule from an encoding and then applies the evaluator to obtain a quality.")]
    3333  [StorableClass]
    34   public class SchedulingEvaluator : SingleSuccessorOperator, ISchedulingEvaluator {
     34  public class SchedulingEvaluator : InstrumentedOperator, ISchedulingEvaluator {
    3535
    3636    public IValueLookupParameter<IScheduleDecoder> ScheduleDecoderParameter {
    37       get { return (IValueLookupParameter<IScheduleDecoder>) Parameters["ScheduleDecoder"]; }
     37      get { return (IValueLookupParameter<IScheduleDecoder>)Parameters["ScheduleDecoder"]; }
    3838    }
    3939    ILookupParameter<IScheduleDecoder> ISchedulingEvaluator.ScheduleDecoderParameter {
     
    4141    }
    4242    public IValueLookupParameter<IScheduleEvaluator> ScheduleEvaluatorParameter {
    43       get { return (IValueLookupParameter<IScheduleEvaluator>) Parameters["ScheduleEvaluator"]; }
     43      get { return (IValueLookupParameter<IScheduleEvaluator>)Parameters["ScheduleEvaluator"]; }
    4444    }
    4545    ILookupParameter<IScheduleEvaluator> ISchedulingEvaluator.ScheduleEvaluatorParameter {
     
    6565    }
    6666
    67     public override IOperation Apply() {
     67    public override IOperation InstrumentedApply() {
    6868      var decoder = ScheduleDecoderParameter.ActualValue;
    6969      var evaluator = ScheduleEvaluatorParameter.ActualValue;
    7070      if (evaluator == null) throw new InvalidOperationException("A ScheduleEvaluator could not be found.");
    7171
    72       var operations = new OperationCollection(base.Apply());
     72      var operations = new OperationCollection(base.InstrumentedApply());
    7373      operations.Insert(0, ExecutionContext.CreateChildOperation(evaluator));
    7474      if (decoder != null) // decode before evaluating
  • trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SingleObjectiveTestFunctionProblemEvaluator.cs

    r9980 r10291  
    3434  [Item("Evaluator", "Base calls for single objective test function evaluators.")]
    3535  [StorableClass]
    36   public abstract class SingleObjectiveTestFunctionProblemEvaluator : SingleSuccessorOperator, ISingleObjectiveTestFunctionProblemEvaluator {
     36  public abstract class SingleObjectiveTestFunctionProblemEvaluator : InstrumentedOperator, ISingleObjectiveTestFunctionProblemEvaluator {
    3737    /// <summary>
    3838    /// The name of the function
     
    8686    }
    8787
    88     public override IOperation Apply() {
     88    public override IOperation InstrumentedApply() {
    8989      RealVector point = PointParameter.ActualValue;
    9090      double quality = Evaluate(point);
    9191      QualityParameter.ActualValue = new DoubleValue(quality);
    92       return base.Apply();
     92      return base.InstrumentedApply();
    9393    }
    9494
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPCoordinatesPathEvaluator.cs

    r9456 r10291  
    8484    }
    8585
    86     public sealed override IOperation Apply() {
     86    public sealed override IOperation InstrumentedApply() {
    8787      if (UseDistanceMatrixParameter.ActualValue.Value) {
    8888        Permutation p = PermutationParameter.ActualValue;
     
    120120        QualityParameter.ActualValue = new DoubleValue(length);
    121121      }
    122       return base.Apply();
     122      return base.InstrumentedApply();
    123123    }
    124124
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPDistanceMatrixEvaluator.cs

    r9456 r10291  
    6969    }
    7070
    71     public override IOperation Apply() {
     71    public override IOperation InstrumentedApply() {
    7272      Permutation p = PermutationParameter.ActualValue;
    7373      DistanceMatrix dm = DistanceMatrixParameter.ActualValue;
    7474
    7575      QualityParameter.ActualValue = new DoubleValue(Apply(dm, p));
    76       return base.Apply();
     76      return base.InstrumentedApply();
    7777    }
    7878  }
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPEvaluator.cs

    r9456 r10291  
    3333  [Item("TSPEvaluator", "A base class for operators which evaluate TSP solutions.")]
    3434  [StorableClass]
    35   public abstract class TSPEvaluator : SingleSuccessorOperator, ITSPEvaluator {
     35  public abstract class TSPEvaluator : InstrumentedOperator, ITSPEvaluator {
    3636    public override bool CanChangeName {
    3737      get { return false; }
  • trunk/sources/HeuristicLab.Selection/3.3/Selector.cs

    r9456 r10291  
    3333  [Item("Selector", "A base class for selection operators.")]
    3434  [StorableClass]
    35   public abstract class Selector : SingleSuccessorOperator {
     35  public abstract class Selector : InstrumentedOperator {
    3636    public override bool CanChangeName {
    3737      get { return false; }
     
    5454    }
    5555
    56     public sealed override IOperation Apply() {
     56    public sealed override IOperation InstrumentedApply() {
    5757      List<IScope> scopes = new List<IScope>(CurrentScope.SubScopes);
    5858      IScope[] selected = Select(scopes);
     
    6666      CurrentScope.SubScopes.Add(selectedScope);
    6767
    68       return base.Apply();
     68      return base.InstrumentedApply();
    6969    }
    7070
Note: See TracChangeset for help on using the changeset viewer.