Changeset 12018 for branches/ALPS/HeuristicLab.Problems.Programmable/3.3/Templates/CompiledSingleObjectiveProblemDefinition.cs
- Timestamp:
- 02/16/15 20:14:52 (10 years ago)
- Location:
- branches/ALPS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ALPS
- Property svn:mergeinfo changed
/stable merged: 12008-12010 /trunk/sources merged: 11978,11982-11984,11987-11994,11996,11998-12004,12012,12015-12016
- Property svn:mergeinfo changed
-
branches/ALPS/HeuristicLab.Problems.Programmable/3.3/Templates/CompiledSingleObjectiveProblemDefinition.cs
r11949 r12018 44 44 // Write or update results given the range of vectors and resulting qualities 45 45 // Uncomment the following lines if you want to retrieve the best individual 46 //var bestIndex = Maximization ? 47 // qualities.Select((v, i) => Tuple.Create(i, v)).OrderByDescending(x => x.Item2).First().Item1 48 // : qualities.Select((v, i) => Tuple.Create(i, v)).OrderBy(x => x.Item2).First().Item1; 49 //var best = individuals[bestIndex]; 46 47 //var orderedIndividuals = individuals.Zip(qualities, (i, q) => new { Individual = i, Quality = q }).OrderBy(z => z.Quality); 48 //var best = Maximization ? orderedIndividuals.Last().Individual : orderedIndividuals.First().Individual; 49 50 //if (!results.ContainsKey("Best Solution")) { 51 // results.Add(new Result("Best Solution", typeof(RealVector))); 52 //} 53 //results["Best Solution"].Value = (IItem)best.RealVector("r").Clone(); 50 54 } 51 55
Note: See TracChangeset
for help on using the changeset viewer.