Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable/CompiledMultiObjectiveOptimizationSupport.cs @ 13253

Last change on this file since 13253 was 13183, checked in by pfleck, 9 years ago

#1674

  • Added a SupportScript for the MultiObjectiveExternalEvaluationProblem.
  • Extracted code from the SingleObjectiveOptimizationSupportScript into the OptimizationSupportScript to reuse code for the MultiObjectiveOptimizationSupportScript.
File size: 1.1 KB
Line 
1using System;
2using System.Linq;
3using System.Collections.Generic;
4using HeuristicLab.Common;
5using HeuristicLab.Core;
6using HeuristicLab.Data;
7using HeuristicLab.Optimization;
8
9namespace HeuristicLab.Problems.ExternalEvaluation {
10  public class CompiledMultiObjectiveOptimizationSupport : CompiledOptimizationSupport, IMultiObjectiveOptimizationSupport {
11
12    public void Analyze(Individual[] individuals, double[][] qualities, ResultCollection results, IRandom random) {
13      // Use vars.yourVariable to access variables in the variable store i.e. yourVariable
14      // 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];
20    }
21
22    // Implement further classes and methods
23  }
24}
Note: See TracBrowser for help on using the repository browser.