Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/29/14 17:39:19 (10 years ago)
Author:
abeham
Message:

#2174: Made single-objective programmable problem compatible with scatter search

File:
1 edited

Legend:

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

    r11399 r11405  
    171171        UpdateMultiVectorEncodingOperators(solutionCreators, configuration);
    172172      }
     173      UpdateImprovementOperators();
    173174      UpdateMoveOperators();
    174175    }
     
    852853    }
    853854
     855    protected virtual void UpdateImprovementOperators() {
     856      if (!Operators.Any(x => x is SingleObjectiveParameterVectorImprover))
     857        Operators.Add(new SingleObjectiveParameterVectorImprover());
     858      foreach (var improver in Operators.OfType<SingleObjectiveParameterVectorImprover>()) {
     859        improver.ConfigurationParameter.ActualName = ConfigurationParameter.Name;
     860        improver.MaximizationParameter.ActualName = MaximizationParameter.Name;
     861        improver.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
     862        improver.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
     863      }
     864    }
     865
    854866    protected virtual void UpdateMoveOperators() {
    855867      Operators.RemoveAll(x => x is IParameterVectorMoveOperator);
Note: See TracChangeset for help on using the changeset viewer.