Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/18/15 16:19:19 (9 years ago)
Author:
pfleck
Message:

#1674

  • Adapted ItemName from ExternalEvaluationProblem and MultiObjectiveExternalEvaluationProblem.
  • Removed/Fixed the support script code in from the comments.
Location:
trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable/CompiledMultiObjectiveOptimizationSupport.cs

    r13183 r13257  
    1 using System;
    2 using System.Linq;
    3 using System.Collections.Generic;
    4 using HeuristicLab.Common;
    5 using HeuristicLab.Core;
    6 using HeuristicLab.Data;
     1using HeuristicLab.Core;
    72using HeuristicLab.Optimization;
    83
     
    138      // Use vars.yourVariable to access variables in the variable store i.e. yourVariable
    149      // Write or update results given the range of vectors and resulting qualities
    15       // Uncomment the following lines if you want to retrieve the best individual
    16       //var bestIndex = Maximization ?
    17       //         qualities.Select((v, i) => Tuple.Create(i, v)).OrderByDescending(x => x.Item2).First().Item1
    18       //       : qualities.Select((v, i) => Tuple.Create(i, v)).OrderBy(x => x.Item2).First().Item1;
    19       //var best = individuals[bestIndex];
    2010    }
    2111
  • trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable/CompiledSingleObjectiveOptimizationSupport.cs

    r11961 r13257  
    1 using System;
    2 using System.Linq;
    3 using System.Collections.Generic;
    4 using HeuristicLab.Common;
     1using System.Collections.Generic;
    52using HeuristicLab.Core;
    6 using HeuristicLab.Data;
    73using HeuristicLab.Optimization;
    84
     
    1410      // Write or update results given the range of vectors and resulting qualities
    1511      // Uncomment the following lines if you want to retrieve the best individual
    16       //var bestIndex = Maximization ?
    17       //         qualities.Select((v, i) => Tuple.Create(i, v)).OrderByDescending(x => x.Item2).First().Item1
    18       //       : qualities.Select((v, i) => Tuple.Create(i, v)).OrderBy(x => x.Item2).First().Item1;
    19       //var best = individuals[bestIndex];
     12      // Maximization:
     13      // var bestIndex = qualities.Select((v, i) => Tuple.Create(i, v)).OrderByDescending(x => x.Item2).First().Item1;
     14      // Minimization:
     15      // var bestIndex = qualities.Select((v, i) => Tuple.Create(i, v)).OrderBy(x => x.Item2).First().Item1;
     16      // var best = individuals[bestIndex];
    2017    }
    2118
     
    3835  }
    3936}
    40 
Note: See TracChangeset for help on using the changeset viewer.