- Timestamp:
- 11/18/15 16:19:19 (9 years ago)
- 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; 1 using HeuristicLab.Core; 7 2 using HeuristicLab.Optimization; 8 3 … … 13 8 // Use vars.yourVariable to access variables in the variable store i.e. yourVariable 14 9 // Write or update results given the range of vectors and resulting qualities 15 // Uncomment the following lines if you want to retrieve the best individual16 //var bestIndex = Maximization ?17 // qualities.Select((v, i) => Tuple.Create(i, v)).OrderByDescending(x => x.Item2).First().Item118 // : qualities.Select((v, i) => Tuple.Create(i, v)).OrderBy(x => x.Item2).First().Item1;19 //var best = individuals[bestIndex];20 10 } 21 11 -
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; 1 using System.Collections.Generic; 5 2 using HeuristicLab.Core; 6 using HeuristicLab.Data;7 3 using HeuristicLab.Optimization; 8 4 … … 14 10 // Write or update results given the range of vectors and resulting qualities 15 11 // 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]; 20 17 } 21 18 … … 38 35 } 39 36 } 40
Note: See TracChangeset
for help on using the changeset viewer.