Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/04/15 00:03:14 (9 years ago)
Author:
abeham
Message:

#2174:

  • Added IImprovmentOperator interface to SingleObjectiveImprover
  • Added Random parameter to Analyze method and IStochasticOperator interface to the resp. analyzer
  • Updated code template text of the compiled single- and multi-objective problem definitions
  • Prevent ProblemDefinitionScript from silently ignoring exceptions
  • Added equality comparer in Encoding's cloning constructor
  • Small adaption of ProblemDefinitionScriptView to changes in new code editor
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/MultiObjectiveAnalyzer.cs

    r11739 r11880  
    1313  [Item("Multi-objective Analyzer", "Calls the Analyze method of the problem definition.")]
    1414  [StorableClass]
    15   public class MultiObjectiveAnalyzer : SingleSuccessorOperator, IMultiObjectiveAnalysisOperator {
     15  public class MultiObjectiveAnalyzer : SingleSuccessorOperator, IMultiObjectiveAnalysisOperator, IStochasticOperator {
    1616    public bool EnabledByDefault { get { return true; } }
    1717
     
    2828    }
    2929
    30     public Action<Individual[], double[][], ResultCollection> AnalyzeAction { get; set; }
     30    public ILookupParameter<IRandom> RandomParameter {
     31      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
     32    }
     33
     34    public Action<Individual[], double[][], ResultCollection, IRandom> AnalyzeAction { get; set; }
    3135
    3236    [StorableConstructor]
     
    4751      var encoding = EncodingParameter.ActualValue;
    4852      var results = ResultsParameter.ActualValue;
     53      var random = RandomParameter.ActualValue;
    4954
    5055      IEnumerable<IScope> scopes = new[] { ExecutionContext.Scope };
     
    5358
    5459      var individuals = scopes.Select(encoding.GetIndividual).ToArray();
    55       AnalyzeAction(individuals, QualitiesParameter.ActualValue.Select(x => x.ToArray()).ToArray(), results);
     60      AnalyzeAction(individuals, QualitiesParameter.ActualValue.Select(x => x.ToArray()).ToArray(), results, random);
    5661      return base.Apply();
    5762    }
Note: See TracChangeset for help on using the changeset viewer.