Changeset 12018 for branches/ALPS/HeuristicLab.Problems.Programmable
- Timestamp:
- 02/16/15 20:14:52 (10 years ago)
- Location:
- branches/ALPS
- Files:
-
- 12 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/CompiledProblemDefinition.cs
r11949 r12018 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/ALPS/HeuristicLab.Problems.Programmable/3.3/HeuristicLab.Problems.Programmable-3.3.csproj
r11961 r12018 111 111 </ItemGroup> 112 112 <ItemGroup> 113 <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj"> 114 <Project>{887425b4-4348-49ed-a457-b7d2c26ddbf9}</Project> 115 <Name>HeuristicLab.Analysis-3.3</Name> 116 <Private>False</Private> 117 </ProjectReference> 113 118 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj"> 114 119 <Project>{958b43bc-cc5c-4fa2-8628-2b3b01d890b6}</Project> -
branches/ALPS/HeuristicLab.Problems.Programmable/3.3/MultiObjectiveProblemDefinitionScript.cs
r11949 r12018 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/ALPS/HeuristicLab.Problems.Programmable/3.3/MultiObjectiveProgrammableProblem.cs
r11961 r12018 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 24 24 using HeuristicLab.Common.Resources; 25 25 using HeuristicLab.Core; 26 using HeuristicLab.Data; 26 27 using HeuristicLab.Optimization; 27 28 using HeuristicLab.Parameters; … … 73 74 74 75 private void OnProblemDefinitionChanged() { 76 Parameters.Remove("Maximization"); 77 Parameters.Add(new ValueParameter<BoolArray>("Maximization", "Set to false if the problem should be minimized.", (BoolArray)new BoolArray(Maximization).AsReadOnly()) { Hidden = true }); 78 75 79 Encoding = ProblemDefinition.Encoding; 76 80 OnOperatorsChanged(); … … 79 83 80 84 public override bool[] Maximization { 81 get { return P roblemDefinition.Maximization; }85 get { return Parameters.ContainsKey("ProblemScript") ? ProblemDefinition.Maximization : new[] { false }; } 82 86 } 83 87 -
branches/ALPS/HeuristicLab.Problems.Programmable/3.3/Plugin.cs.frame
r11961 r12018 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 24 24 namespace HeuristicLab.Problems.Programmable { 25 [Plugin("HeuristicLab.Problems.Programmable", "Programmable problem for defining custom representation and evaluation function.", "3.3. 9.$WCREV$")]25 [Plugin("HeuristicLab.Problems.Programmable", "Programmable problem for defining custom representation and evaluation function.", "3.3.11.$WCREV$")] 26 26 [PluginFile("HeuristicLab.Problems.Programmable-3.3.dll", PluginFileType.Assembly)] 27 [PluginDependency("HeuristicLab.Analysis", "3.3")] 27 28 [PluginDependency("HeuristicLab.Collections", "3.3")] 28 29 [PluginDependency("HeuristicLab.Common", "3.3")] 29 30 [PluginDependency("HeuristicLab.Common.Resources", "3.3")] 30 31 [PluginDependency("HeuristicLab.Core", "3.3")] 32 [PluginDependency("HeuristicLab.Data", "3.3")] 31 33 [PluginDependency("HeuristicLab.Optimization", "3.3")] 32 34 [PluginDependency("HeuristicLab.Parameters", "3.3")] -
branches/ALPS/HeuristicLab.Problems.Programmable/3.3/ProblemDefinitionScript.cs
r11949 r12018 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/ALPS/HeuristicLab.Problems.Programmable/3.3/ProblemDefinitionScriptException.cs
r11949 r12018 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/ALPS/HeuristicLab.Problems.Programmable/3.3/Properties/AssemblyInfo.cs.frame
r10753 r12018 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 31 31 [assembly: AssemblyCompany("HEAL")] 32 32 [assembly: AssemblyProduct("HeuristicLab")] 33 [assembly: AssemblyCopyright("(c) 2002 - 2014HEAL")]33 [assembly: AssemblyCopyright("(c) 2002-2015 HEAL")] 34 34 [assembly: AssemblyTrademark("")] 35 35 [assembly: AssemblyCulture("")] … … 54 54 // [assembly: AssemblyVersion("1.0.*")] 55 55 [assembly: AssemblyVersion("3.3.0.0")] 56 [assembly: AssemblyFileVersion("3.3. 9.$WCREV$")]56 [assembly: AssemblyFileVersion("3.3.11.$WCREV$")] -
branches/ALPS/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProblemDefinitionScript.cs
r11949 r12018 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/ALPS/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs
r11961 r12018 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 22 22 using System.Collections.Generic; 23 23 using System.Drawing; 24 using HeuristicLab.Analysis; 24 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Common.Resources; 26 27 using HeuristicLab.Core; 28 using HeuristicLab.Data; 27 29 using HeuristicLab.Optimization; 28 30 using HeuristicLab.Parameters; … … 61 63 : base() { 62 64 Parameters.Add(new FixedValueParameter<SingleObjectiveProblemDefinitionScript>("ProblemScript", "Defines the problem.", new SingleObjectiveProblemDefinitionScript() { Name = Name })); 65 Operators.Add(new BestScopeSolutionAnalyzer()); 63 66 RegisterEvents(); 64 67 } … … 74 77 75 78 private void OnProblemDefinitionChanged() { 79 Parameters.Remove("Maximization"); 80 Parameters.Add(new FixedValueParameter<BoolValue>("Maximization", "Set to false if the problem should be minimized.", (BoolValue)new BoolValue(Maximization).AsReadOnly()) { Hidden = true }); 81 76 82 Encoding = ProblemDefinition.Encoding; 83 OnOperatorsChanged(); 84 OnReset(); 77 85 } 78 86 79 87 public override bool Maximization { 80 get { return P roblemDefinition.Maximization; }88 get { return Parameters.ContainsKey("ProblemScript") ? ProblemDefinition.Maximization : false; } 81 89 } 82 90 -
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.