Last change
on this file since 13229 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 | |
---|
1 | using System;
|
---|
2 | using System.Linq;
|
---|
3 | using System.Collections.Generic;
|
---|
4 | using HeuristicLab.Common;
|
---|
5 | using HeuristicLab.Core;
|
---|
6 | using HeuristicLab.Data;
|
---|
7 | using HeuristicLab.Optimization;
|
---|
8 |
|
---|
9 | namespace 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.