Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/15/14 10:23:34 (10 years ago)
Author:
abeham
Message:

#2174:

  • Removed SimSharp reference (not the purpose of this branch anymore)
  • Fixed bugs regarding parameter names when no parameter have been defined
  • Added a method to the problem definition to retrieve a neighborhood solution
    • Programmable problem now works with LocalSearch and SimulatedAnnealing
File:
1 edited

Legend:

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

    r10856 r11363  
    138138        UpdateMultiVectorEncodingOperators(solutionCreators, configuration);
    139139      }
     140      UpdateMoveOperators();
    140141    }
    141142
     
    597598    }
    598599
     600    protected virtual void UpdateMoveOperators() {
     601      Operators.RemoveAll(x => x is IParameterVectorMoveOperator);
     602      var generator = new ParameterVectorMoveGenerator();
     603      generator.ConfigurationParameter.ActualName = ConfigurationParameter.Name;
     604      generator.ScriptParameter.ActualName = ScriptParameter.Name;
     605
     606      var evaluator = new ParameterVectorMoveEvaluator();
     607      evaluator.ConfigurationParameter.ActualName = ConfigurationParameter.Name;
     608      evaluator.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
     609      evaluator.ScriptParameter.ActualName = ScriptParameter.Name;
     610
     611      var maker = new ParameterVectorMoveMaker();
     612      maker.ConfigurationParameter.ActualName = ConfigurationParameter.Name;
     613      maker.MoveQualityParameter.ActualName = evaluator.MoveQualityParameter.ActualName;
     614      maker.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
     615
     616      Operators.AddRange(new IItem[] { generator, evaluator, maker });
     617    }
     618
    599619    // ReSharper disable RedundantNameQualifier
    600620    protected virtual IBinaryVectorCrossover GetDefaultBinaryCrossover(string paramName, Configuration config) {
Note: See TracChangeset for help on using the changeset viewer.