Changeset 3116 for trunk/sources/HeuristicLab.Problems.Knapsack
- Timestamp:
- 03/19/10 14:24:11 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.Knapsack/3.3
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Knapsack/3.3/HeuristicLab.Problems.Knapsack-3.3.csproj
r3082 r3116 84 84 <Compile Include="HeuristicLabProblemsKnapsackPlugin.cs" /> 85 85 <Compile Include="Interfaces\IKnapsackEvaluator.cs" /> 86 <Compile Include="Interfaces\IKnapsackSolutionsVisualizer.cs" /> 86 87 <Compile Include="Knapsack.cs" /> 87 88 <Compile Include="Properties\AssemblyInfo.cs" /> -
trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Knapsack.cs
r3111 r3116 73 73 get { return EvaluatorParameter; } 74 74 } 75 public OptionalValueParameter<IKnapsackSolutionsVisualizer> VisualizerParameter { 76 get { return (OptionalValueParameter<IKnapsackSolutionsVisualizer>)Parameters["Visualizer"]; } 77 } 75 78 IParameter IProblem.VisualizerParameter { 76 get { throw new NotImplementedException(); }77 } 79 get { return VisualizerParameter; } 80 } 78 81 public OptionalValueParameter<DoubleValue> BestKnownQualityParameter { 79 82 get { return (OptionalValueParameter<DoubleValue>)Parameters["BestKnownQuality"]; } … … 118 121 get { return EvaluatorParameter.Value; } 119 122 } 123 public IKnapsackSolutionsVisualizer Visualizer { 124 get { return VisualizerParameter.Value; } 125 set { VisualizerParameter.Value = value; } 126 } 120 127 ISolutionsVisualizer IProblem.Visualizer { 121 get { throw new NotImplementedException(); }122 } 128 get { return VisualizerParameter.Value; } 129 } 123 130 public DoubleValue BestKnownQuality { 124 131 get { return BestKnownQualityParameter.Value; } … … 144 151 Parameters.Add(new ValueParameter<IKnapsackEvaluator>("Evaluator", "The operator which should be used to evaluate Knapsack solutions.", evaluator)); 145 152 Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this Knapsack instance.")); 153 Parameters.Add(new ValueParameter<IKnapsackSolutionsVisualizer>("Visualizer", "The operator which should be used to visualize Knapsack solutions.", null)); 146 154 147 155 creator.BinaryVectorParameter.ActualName = "KnapsackSolution"; … … 223 231 void PenaltyParameter_ValueChanged(object sender, EventArgs e) { 224 232 ParameterizeEvaluator(); 233 } 234 void VisualizerParameter_ValueChanged(object sender, EventArgs e) { 235 OnVisualizerChanged(); 225 236 } 226 237 #endregion … … 239 250 ValuesParameter.Value.Reset += new EventHandler(ValuesValue_Reset); 240 251 PenaltyParameter.ValueChanged += new EventHandler(PenaltyParameter_ValueChanged); 252 VisualizerParameter.ValueChanged += new EventHandler(VisualizerParameter_ValueChanged); 241 253 } 242 254 private void ParameterizeSolutionCreator() {
Note: See TracChangeset
for help on using the changeset viewer.