Changeset 3467 for trunk/sources
- Timestamp:
- 04/21/10 18:33:42 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 6 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/HeuristicLab.Problems.Knapsack.Views-3.3.csproj
r3437 r3467 83 83 <ItemGroup> 84 84 <Compile Include="HeuristicLabProblemsKnapsackViewsPlugin.cs" /> 85 <Compile Include="KnapsackSolutionView.cs"> 86 <SubType>UserControl</SubType> 87 </Compile> 88 <Compile Include="KnapsackSolutionView.Designer.cs"> 89 <DependentUpon>KnapsackSolutionView.cs</DependentUpon> 90 </Compile> 85 91 <Compile Include="Properties\AssemblyInfo.cs" /> 92 <Compile Include="Properties\Resources.Designer.cs"> 93 <AutoGen>True</AutoGen> 94 <DesignTime>True</DesignTime> 95 <DependentUpon>Resources.resx</DependentUpon> 96 </Compile> 86 97 </ItemGroup> 87 98 <ItemGroup> … … 95 106 <Name>HeuristicLab.Collections-3.3</Name> 96 107 </ProjectReference> 108 <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.2\HeuristicLab.Common.Resources-3.2.csproj"> 109 <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project> 110 <Name>HeuristicLab.Common.Resources-3.2</Name> 111 </ProjectReference> 112 <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj"> 113 <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project> 114 <Name>HeuristicLab.Common-3.3</Name> 115 </ProjectReference> 97 116 <ProjectReference Include="..\..\HeuristicLab.Core.Views\3.3\HeuristicLab.Core.Views-3.3.csproj"> 98 117 <Project>{E226881D-315F-423D-B419-A766FE0D8685}</Project> … … 102 121 <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project> 103 122 <Name>HeuristicLab.Core-3.3</Name> 123 </ProjectReference> 124 <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj"> 125 <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project> 126 <Name>HeuristicLab.Data-3.3</Name> 127 </ProjectReference> 128 <ProjectReference Include="..\..\HeuristicLab.Encodings.BinaryVectorEncoding\3.3\HeuristicLab.Encodings.BinaryVectorEncoding-3.3.csproj"> 129 <Project>{66D249C3-A01D-42A8-82A2-919BC8EC3D83}</Project> 130 <Name>HeuristicLab.Encodings.BinaryVectorEncoding-3.3</Name> 104 131 </ProjectReference> 105 132 <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj"> … … 119 146 <Name>HeuristicLab.Optimization-3.3</Name> 120 147 </ProjectReference> 148 <ProjectReference Include="..\..\HeuristicLab.Optimizer\3.3\HeuristicLab.Optimizer-3.3.csproj"> 149 <Project>{C664305E-497C-4533-A140-967DEDB05C19}</Project> 150 <Name>HeuristicLab.Optimizer-3.3</Name> 151 </ProjectReference> 152 <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj"> 153 <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project> 154 <Name>HeuristicLab.Persistence-3.3</Name> 155 </ProjectReference> 121 156 <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj"> 122 157 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project> … … 127 162 <Name>HeuristicLab.Problems.Knapsack-3.3</Name> 128 163 </ProjectReference> 164 </ItemGroup> 165 <ItemGroup> 166 <EmbeddedResource Include="KnapsackSolutionView.resx"> 167 <DependentUpon>KnapsackSolutionView.cs</DependentUpon> 168 </EmbeddedResource> 169 <EmbeddedResource Include="Properties\Resources.resx"> 170 <Generator>ResXFileCodeGenerator</Generator> 171 <LastGenOutput>Resources.Designer.cs</LastGenOutput> 172 </EmbeddedResource> 129 173 </ItemGroup> 130 174 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/HeuristicLabProblemsKnapsackViewsPlugin.cs.frame
r3437 r3467 29 29 [PluginFile("HeuristicLab.Problems.Knapsack.Views-3.3.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Collections", "3.3")] 31 [PluginDependency("HeuristicLab.Common", "3.3")] 32 [PluginDependency("HeuristicLab.Common.Resources", "3.2")] 31 33 [PluginDependency("HeuristicLab.Core", "3.3")] 32 34 [PluginDependency("HeuristicLab.Core.Views", "3.3")] 35 [PluginDependency("HeuristicLab.Data", "3.3")] 36 [PluginDependency("HeuristicLab.Encodings.BinaryVectorEncoding", "3.3")] 33 37 [PluginDependency("HeuristicLab.MainForm", "3.3")] 34 38 [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")] 35 39 [PluginDependency("HeuristicLab.Optimization", "3.3")] 36 40 [PluginDependency("HeuristicLab.Optimization.Views", "3.3")] 41 [PluginDependency("HeuristicLab.Optimizer", "3.3")] 37 42 [PluginDependency("HeuristicLab.Problems.Knapsack", "3.3")] 38 43 public class HeuristicLabProblemsKnapsackViewsPlugin : PluginBase { -
trunk/sources/HeuristicLab.Problems.Knapsack/3.3/HeuristicLab.Problems.Knapsack-3.3.csproj
r3384 r3467 87 87 <Compile Include="Interfaces\IKnapsackMoveEvaluator.cs" /> 88 88 <Compile Include="KnapsackProblem.cs" /> 89 <Compile Include="KnapsackSolution.cs" /> 89 90 <Compile Include="MoveEvaluators\KnapsackMoveEvaluator.cs" /> 90 91 <Compile Include="MoveEvaluators\KnapsackOneBitflipMoveEvaluator.cs" /> 91 92 <Compile Include="Properties\AssemblyInfo.cs" /> 93 <Compile Include="Visualizers\BestKnapsackVisualizer.cs" /> 92 94 </ItemGroup> 93 95 <ItemGroup> -
trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Interfaces/IKnapsackSolutionsVisualizer.cs
r3116 r3467 21 21 22 22 using HeuristicLab.Optimization; 23 using HeuristicLab.Core; 24 using HeuristicLab.Encodings.BinaryVectorEncoding; 25 using HeuristicLab.Data; 23 26 24 27 namespace HeuristicLab.Problems.Knapsack { … … 26 29 /// An interface which represents an operator for visualizing solutions of Knapsack Problems. 27 30 /// </summary> 28 public interface IKnapsackSolutionsVisualizer : ISingleObjectiveSolutionsVisualizer { } 31 public interface IKnapsackSolutionsVisualizer : ISingleObjectiveSolutionsVisualizer { 32 ILookupParameter<ItemArray<BinaryVector>> BinaryVectorParameter { get; } 33 ILookupParameter<IntValue> KnapsackCapacityParameter { get; } 34 ILookupParameter<IntArray> WeightsParameter { get; } 35 ILookupParameter<IntArray> ValuesParameter { get; } 36 } 29 37 } -
trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackProblem.cs
r3463 r3467 32 32 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 33 33 using HeuristicLab.PluginInfrastructure; 34 using HeuristicLab.Problems.Knapsack.Visualizers; 34 35 35 36 namespace HeuristicLab.Problems.Knapsack { … … 161 162 RandomBinaryVectorCreator creator = new RandomBinaryVectorCreator(); 162 163 KnapsackEvaluator evaluator = new KnapsackEvaluator(); 164 IKnapsackSolutionsVisualizer visualizer = new BestKnapsackVisualizer(); 163 165 164 166 Parameters.Add(new ValueParameter<BoolValue>("Maximization", "Set to true as the Knapsack Problem is a maximization problem.", new BoolValue(true))); … … 170 172 Parameters.Add(new ValueParameter<IKnapsackEvaluator>("Evaluator", "The operator which should be used to evaluate Knapsack solutions.", evaluator)); 171 173 Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this Knapsack instance.")); 172 Parameters.Add(new ValueParameter<IKnapsackSolutionsVisualizer>("Visualizer", "The operator which should be used to visualize Knapsack solutions.", null));174 Parameters.Add(new ValueParameter<IKnapsackSolutionsVisualizer>("Visualizer", "The operator which should be used to visualize Knapsack solutions.", visualizer)); 173 175 174 176 creator.BinaryVectorParameter.ActualName = "KnapsackSolution"; … … 179 181 ParameterizeSolutionCreator(); 180 182 ParameterizeEvaluator(); 183 ParameterizeVisualizer(); 181 184 182 185 Initialize(); … … 219 222 ParameterizeSolutionCreator(); 220 223 ParameterizeEvaluator(); 224 ParameterizeVisualizer(); 221 225 ParameterizeOperators(); 222 226 OnSolutionCreatorChanged(); … … 224 228 private void SolutionCreator_PermutationParameter_ActualNameChanged(object sender, EventArgs e) { 225 229 ParameterizeEvaluator(); 230 ParameterizeVisualizer(); 226 231 ParameterizeOperators(); 227 232 } 228 233 private void EvaluatorParameter_ValueChanged(object sender, EventArgs e) { 229 234 ParameterizeEvaluator(); 235 ParameterizeVisualizer(); 230 236 OnEvaluatorChanged(); 231 237 } 232 238 void KnapsackCapacityParameter_ValueChanged(object sender, EventArgs e) { 233 239 ParameterizeEvaluator(); 240 ParameterizeVisualizer(); 234 241 } 235 242 void WeightsParameter_ValueChanged(object sender, EventArgs e) { 236 243 ParameterizeEvaluator(); 244 ParameterizeVisualizer(); 237 245 ParameterizeSolutionCreator(); 238 246 … … 247 255 void ValuesParameter_ValueChanged(object sender, EventArgs e) { 248 256 ParameterizeEvaluator(); 257 ParameterizeVisualizer(); 249 258 ParameterizeSolutionCreator(); 250 259 … … 302 311 } 303 312 } 313 private void ParameterizeVisualizer() { 314 if (Visualizer is IKnapsackSolutionsVisualizer) { 315 IKnapsackSolutionsVisualizer visualizer = 316 (IKnapsackSolutionsVisualizer)Visualizer; 317 visualizer.BinaryVectorParameter.ActualName = SolutionCreator.BinaryVectorParameter.ActualName; 318 visualizer.KnapsackCapacityParameter.ActualName = KnapsackCapacityParameter.Name; 319 visualizer.WeightsParameter.ActualName = WeightsParameter.Name; 320 visualizer.ValuesParameter.ActualName = ValuesParameter.Name; 321 } 322 } 304 323 private void InitializeOperators() { 305 324 operators = new List<IBinaryVectorOperator>();
Note: See TracChangeset
for help on using the changeset viewer.