Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/03/19 15:37:38 (6 years ago)
Author:
mkommend
Message:

#2521: Renamed Solution to EncodedSolution.

Location:
branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable/CompiledMultiObjectiveOptimizationSupport.cs

    r13372 r16751  
    55  public class CompiledMultiObjectiveOptimizationSupport : CompiledOptimizationSupport, IMultiObjectiveOptimizationSupport {
    66
    7     public void Analyze(ISolution[] individuals, double[][] qualities, ResultCollection results, IRandom random) {
     7    public void Analyze(IEncodedSolution[] individuals, double[][] qualities, ResultCollection results, IRandom random) {
    88      // Use vars.yourVariable to access variables in the variable store i.e. yourVariable
    99      // Write or update results given the range of vectors and resulting qualities
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable/CompiledSingleObjectiveOptimizationSupport.cs

    r13372 r16751  
    66  public class CompiledSingleObjectiveOptimizationSupport : CompiledOptimizationSupport, ISingleObjectiveOptimizationSupport {
    77
    8     public void Analyze(ISolution[] individuals, double[] qualities, ResultCollection results, IRandom random) {
     8    public void Analyze(IEncodedSolution[] individuals, double[] qualities, ResultCollection results, IRandom random) {
    99      // Use vars.yourVariable to access variables in the variable store i.e. yourVariable
    1010      // Write or update results given the range of vectors and resulting qualities
     
    1717    }
    1818
    19     public IEnumerable<ISolution> GetNeighbors(ISolution individual, IRandom random) {
     19    public IEnumerable<IEncodedSolution> GetNeighbors(IEncodedSolution individual, IRandom random) {
    2020      // Use vars.yourVariable to access variables in the variable store i.e. yourVariable
    2121      // Create new vectors, based on the given one that represent small changes
     
    2424        // Algorithm will draw only a finite amount of samples
    2525        // Change to a for-loop to return a concrete amount of neighbors
    26         var neighbor = (ISolution)individual.Clone();
     26        var neighbor = (IEncodedSolution)individual.Clone();
    2727        // For instance, perform a single bit-flip in a binary parameter
    2828        //var bIndex = random.Next(neighbor.BinaryVector("b").Length);
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable/MultiObjectiveOptimizationSupportScript.cs

    r16723 r16751  
    3939    }
    4040
    41     void IMultiObjectiveOptimizationSupport.Analyze(ISolution[] individuals, double[][] qualities, ResultCollection results, IRandom random) {
     41    void IMultiObjectiveOptimizationSupport.Analyze(IEncodedSolution[] individuals, double[][] qualities, ResultCollection results, IRandom random) {
    4242      CompiledInstance.Analyze(individuals, qualities, results, random);
    4343    }
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable/SingleObjectiveOptimizationSupportScript.cs

    r16723 r16751  
    4040    }
    4141
    42     void ISingleObjectiveOptimizationSupport.Analyze(ISolution[] individuals, double[] qualities, ResultCollection results, IRandom random) {
     42    void ISingleObjectiveOptimizationSupport.Analyze(IEncodedSolution[] individuals, double[] qualities, ResultCollection results, IRandom random) {
    4343      CompiledInstance.Analyze(individuals, qualities, results, random);
    4444    }
    4545
    46     IEnumerable<ISolution> ISingleObjectiveOptimizationSupport.GetNeighbors(ISolution individual, IRandom random) {
     46    IEnumerable<IEncodedSolution> ISingleObjectiveOptimizationSupport.GetNeighbors(IEncodedSolution individual, IRandom random) {
    4747      return CompiledInstance.GetNeighbors(individual, random);
    4848    }
Note: See TracChangeset for help on using the changeset viewer.