Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/07/15 09:19:43 (10 years ago)
Author:
abeham
Message:

#1985:

  • Merged trunk changes
  • Modified creatable attribute of timelimit run
Location:
branches/TimeLimitRunOptimizer/HeuristicLab.Optimization
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/TimeLimitRunOptimizer/HeuristicLab.Optimization

  • branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/Algorithms/UserDefinedAlgorithm.cs

    r12118 r12625  
    3030  /// </summary>
    3131  [Item("User-Defined Algorithm", "An algorithm which can be defined by the user.")]
    32   [Creatable("Algorithms")]
     32  [Creatable(CreatableAttribute.Categories.Algorithms, Priority = 100)]
    3333  [StorableClass]
    3434  public sealed class UserDefinedAlgorithm : EngineAlgorithm, IParameterizedItem, IStorableContent {
  • branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiObjectiveEvaluator.cs

    r12012 r12625  
    3131  [Item("Multi-objective Evaluator", "Calls the Evaluate method of the problem definition and writes the return value into the scope.")]
    3232  [StorableClass]
    33   public class MultiObjectiveEvaluator : SingleSuccessorOperator, IMultiObjectiveEvaluationOperator, IStochasticOperator {
     33  public class MultiObjectiveEvaluator : InstrumentedOperator, IMultiObjectiveEvaluationOperator, IStochasticOperator {
    3434
    3535    public ILookupParameter<IRandom> RandomParameter {
     
    6060    }
    6161
    62     public override IOperation Apply() {
     62    public override IOperation InstrumentedApply() {
    6363      var random = RandomParameter.ActualValue;
    6464      var encoding = EncodingParameter.ActualValue;
    6565      var individual = encoding.GetIndividual(ExecutionContext.Scope);
    6666      QualitiesParameter.ActualValue = new DoubleArray(EvaluateFunc(individual, random));
    67       return base.Apply();
     67      return base.InstrumentedApply();
    6868    }
    6969  }
  • branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveEvaluator.cs

    r12012 r12625  
    3131  [Item("Single-objective Evaluator", "Calls the script's Evaluate method to get the quality value of the parameter vector.")]
    3232  [StorableClass]
    33   public sealed class SingleObjectiveEvaluator : SingleSuccessorOperator, ISingleObjectiveEvaluationOperator, IStochasticOperator {
     33  public sealed class SingleObjectiveEvaluator : InstrumentedOperator, ISingleObjectiveEvaluationOperator, IStochasticOperator {
    3434
    3535    public ILookupParameter<IRandom> RandomParameter {
     
    5858    public override IDeepCloneable Clone(Cloner cloner) { return new SingleObjectiveEvaluator(this, cloner); }
    5959
    60     public override IOperation Apply() {
     60    public override IOperation InstrumentedApply() {
    6161      var random = RandomParameter.ActualValue;
    6262      var encoding = EncodingParameter.ActualValue;
    6363      var individual = encoding.GetIndividual(ExecutionContext.Scope);
    6464      QualityParameter.ActualValue = new DoubleValue(EvaluateFunc(individual, random));
    65       return base.Apply();
     65      return base.InstrumentedApply();
    6666    }
    6767  }
  • branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/MetaOptimizers/BatchRun.cs

    r12118 r12625  
    3636  /// </summary>
    3737  [Item("Batch Run", "A run in which an optimizer is executed a given number of times.")]
    38   [Creatable("Testing & Analysis")]
     38  [Creatable(CreatableAttribute.Categories.TestingAndAnalysis, Priority = 110)]
    3939  [StorableClass]
    4040  public sealed class BatchRun : NamedItem, IOptimizer, IStorableContent {
     
    237237        batchRunAction = BatchRunAction.Prepare;
    238238        // a race-condition may occur when the optimizer has changed the state by itself in the meantime
    239         try { Optimizer.Prepare(clearRuns); } catch (InvalidOperationException) { }
     239        try { Optimizer.Prepare(clearRuns); }
     240        catch (InvalidOperationException) { }
    240241      } else {
    241242        ExecutionState = ExecutionState.Stopped;
     
    249250      if (Optimizer.ExecutionState == ExecutionState.Stopped) Optimizer.Prepare();
    250251      // a race-condition may occur when the optimizer has changed the state by itself in the meantime
    251       try { Optimizer.Start(); } catch (InvalidOperationException) { }
     252      try { Optimizer.Start(); }
     253      catch (InvalidOperationException) { }
    252254    }
    253255    public void Pause() {
     
    258260      if (Optimizer.ExecutionState != ExecutionState.Started) return;
    259261      // a race-condition may occur when the optimizer has changed the state by itself in the meantime
    260       try { Optimizer.Pause(); } catch (InvalidOperationException) { }
     262      try { Optimizer.Pause(); }
     263      catch (InvalidOperationException) { }
    261264    }
    262265    public void Stop() {
     
    270273      }
    271274      // a race-condition may occur when the optimizer has changed the state by itself in the meantime
    272       try { Optimizer.Stop(); } catch (InvalidOperationException) { }
     275      try { Optimizer.Stop(); }
     276      catch (InvalidOperationException) { }
    273277    }
    274278
  • branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/MetaOptimizers/Experiment.cs

    r12118 r12625  
    3434  /// </summary>
    3535  [Item("Experiment", "An experiment which contains multiple algorithms, batch runs or other experiments.")]
    36   [Creatable("Testing & Analysis")]
     36  [Creatable(CreatableAttribute.Categories.TestingAndAnalysis, Priority = 100)]
    3737  [StorableClass]
    3838  public sealed class Experiment : NamedItem, IOptimizer, IStorableContent {
     
    180180      foreach (IOptimizer optimizer in Optimizers.Where(x => x.ExecutionState != ExecutionState.Started)) {
    181181        // a race-condition may occur when the optimizer has changed the state by itself in the meantime
    182         try { optimizer.Prepare(clearRuns); } catch (InvalidOperationException) { }
     182        try { optimizer.Prepare(clearRuns); }
     183        catch (InvalidOperationException) { }
    183184      }
    184185    }
     
    193194      if (optimizer != null) {
    194195        // a race-condition may occur when the optimizer has changed the state by itself in the meantime
    195         try { optimizer.Start(); } catch (InvalidOperationException) { }
     196        try { optimizer.Start(); }
     197        catch (InvalidOperationException) { }
    196198      }
    197199    }
     
    205207      foreach (IOptimizer optimizer in Optimizers.Where(x => x.ExecutionState == ExecutionState.Started)) {
    206208        // a race-condition may occur when the optimizer has changed the state by itself in the meantime
    207         try { optimizer.Pause(); } catch (InvalidOperationException) { }
     209        try { optimizer.Pause(); }
     210        catch (InvalidOperationException) { }
    208211      }
    209212    }
     
    218221        foreach (var optimizer in Optimizers.Where(x => (x.ExecutionState == ExecutionState.Started) || (x.ExecutionState == ExecutionState.Paused))) {
    219222          // a race-condition may occur when the optimizer has changed the state by itself in the meantime
    220           try { optimizer.Stop(); } catch (InvalidOperationException) { }
     223          try { optimizer.Stop(); }
     224          catch (InvalidOperationException) { }
    221225        }
    222226      } else {
  • branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/MetaOptimizers/TimeLimitRun.cs

    r12128 r12625  
    3636  /// A run in which an algorithm is executed for a certain maximum time only.
    3737  /// </summary>
    38   [Item("TimeLimit Run", "A run in which an optimizer is executed a certain maximum time.")]
    39   [Creatable("Testing & Analysis")]
     38  [Item("Timelimit Run", "A run in which an optimizer is executed a certain maximum time.")]
     39  [Creatable(CreatableAttribute.Categories.TestingAndAnalysis, Priority = 115)]
    4040  [StorableClass]
    4141  public sealed class TimeLimitRun : NamedItem, IOptimizer, IStorableContent, INotifyPropertyChanged {
  • branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/Problems/SingleObjectiveHeuristicOptimizationProblem.cs

  • branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/Problems/UserDefinedProblem.cs

    r12118 r12625  
    3838  /// </summary>
    3939  [Item("User-Defined Problem", "A problem which can be defined by the user.")]
    40   [Creatable("Problems")]
     40  [Creatable(CreatableAttribute.Categories.Problems, Priority = 120)]
    4141  [StorableClass]
    4242  public sealed class UserDefinedProblem : ParameterizedNamedItem, ISingleObjectiveHeuristicOptimizationProblem, IStorableContent {
  • branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/RunCollection.cs

    r12118 r12625  
    3232namespace HeuristicLab.Optimization {
    3333  [Item("Run Collection", "Represents a collection of runs.")]
    34   [Creatable("Testing & Analysis")]
     34  [Creatable(CreatableAttribute.Categories.TestingAndAnalysis, Priority = 120)]
    3535  [StorableClass]
    3636  public class RunCollection : ItemCollection<IRun>, IStringConvertibleMatrix, IStorableContent {
  • branches/TimeLimitRunOptimizer/HeuristicLab.Optimization/3.3/RunCollectionModification/RunCollectionFormulaModifer.cs

    r12118 r12625  
    6868variables (run parameters or results):
    6969  unquoted or in double quotes if they contain special characters or whitespace
    70 mathematical functions:
    71   +, -, /, ^ (power), log
     70mathematical functions (resulting in double values):
     71  +, -, *, /, ^ (power), log
    7272predicates:
    7373  ==, <, >, isnull, not
     74conversions:
     75  toint, todouble
     76array indexing:
     77  []
    7478stack manipulation:
    7579  drop swap dup
Note: See TracChangeset for help on using the changeset viewer.