Changeset 4787 for branches/ParameterBinding
- Timestamp:
- 11/13/10 02:14:39 (14 years ago)
- Location:
- branches/ParameterBinding
- Files:
-
- 2 added
- 4 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ParameterBinding/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj
r4758 r4787 143 143 <Compile Include="Constraints\IConstraint.cs" /> 144 144 <Compile Include="Constraints\TypeCompatibilityConstraint.cs" /> 145 <Compile Include="Interfaces\IParameterBinding.cs" /> 145 <Compile Include="Interfaces\IItemBinding.cs" /> 146 <Compile Include="ItemBinding.cs" /> 146 147 <Compile Include="OperatorExecutionException.cs" /> 147 148 <Compile Include="Interfaces\IScopeTreeLookupParameter.cs" /> -
branches/ParameterBinding/HeuristicLab.Core/3.3/ParameterizedNamedItem.cs
r4770 r4787 33 33 public abstract class ParameterizedNamedItem : NamedItem, IParameterizedNamedItem { 34 34 [Storable] 35 private List<I ParameterBinding> parameterBindingList;36 public List<I ParameterBinding> ParameterBindingList {35 private List<IItemBinding> parameterBindingList; 36 public List<IItemBinding> ParameterBindingList { 37 37 get { return parameterBindingList; } 38 38 } … … 62 62 name = ItemName; 63 63 description = ItemDescription; 64 parameterBindingList = new List<I ParameterBinding>();64 parameterBindingList = new List<IItemBinding>(); 65 65 parameters = new ParameterCollection(); 66 66 readOnlyParameters = null; … … 69 69 : base(name) { 70 70 description = ItemDescription; 71 parameterBindingList = new List<I ParameterBinding>();71 parameterBindingList = new List<IItemBinding>(); 72 72 parameters = new ParameterCollection(); 73 73 readOnlyParameters = null; … … 76 76 : base(name) { 77 77 description = ItemDescription; 78 parameterBindingList = new List<I ParameterBinding>();78 parameterBindingList = new List<IItemBinding>(); 79 79 this.parameters = parameters; 80 80 readOnlyParameters = null; … … 82 82 protected ParameterizedNamedItem(string name, string description) 83 83 : base(name, description) { 84 parameterBindingList = new List<I ParameterBinding>();84 parameterBindingList = new List<IItemBinding>(); 85 85 parameters = new ParameterCollection(); 86 86 readOnlyParameters = null; … … 88 88 protected ParameterizedNamedItem(string name, string description, ParameterCollection parameters) 89 89 : base(name, description) { 90 parameterBindingList = new List<I ParameterBinding>();90 parameterBindingList = new List<IItemBinding>(); 91 91 this.parameters = parameters; 92 92 readOnlyParameters = null; … … 105 105 } 106 106 107 protected virtual void AddBinding(string targetPath, string sourcePath) { 108 ItemBinding binding = new ItemBinding(this, targetPath, this, sourcePath); 109 parameterBindingList.Add(binding); 110 binding.Bind(); 111 } 112 113 protected virtual void AddSourceBinding(IDeepCloneable target, string targetPath, string sourcePath) { 114 ItemBinding binding = new ItemBinding(target, targetPath, this, sourcePath); 115 parameterBindingList.Add(binding); 116 binding.Bind(); 117 } 118 119 protected virtual void AddTargetBinding(string targetPath, IDeepCloneable source, string sourcePath) { 120 ItemBinding binding = new ItemBinding(this, targetPath, source, sourcePath); 121 parameterBindingList.Add(binding); 122 binding.Bind(); 123 } 124 107 125 [StorableHook(HookType.AfterDeserialization)] 108 126 private void AfterDeserialization() { … … 110 128 #region Remove this code when going to 3.4 111 129 if (parameterBindingList == null) 112 parameterBindingList = new List<I ParameterBinding>();130 parameterBindingList = new List<IItemBinding>(); 113 131 #endregion 114 132 } -
branches/ParameterBinding/HeuristicLab.Parameters/3.3/HeuristicLab.Parameters-3.3.csproj
r4770 r4787 111 111 <None Include="HeuristicLabParametersPlugin.cs.frame" /> 112 112 <Compile Include="ConstrainedValueParameter.cs" /> 113 <Compile Include="ParameterSecondLevelNameBinding.cs" />114 <Compile Include="ParameterValueBinding.cs" />115 113 <Compile Include="OptionalConstrainedValueParameter.cs" /> 116 <Compile Include="ParameterNameBinding.cs" />117 114 <Compile Include="ScopeTreeLookupParameter.cs" /> 118 115 <Compile Include="ValueParameter.cs" /> -
branches/ParameterBinding/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs
r4770 r4787 178 178 InitializeOperators(); 179 179 AttachEventHandlers(); 180 181 AddBinding("BestTSPSolutionAnalyzer.QualityParameter.ActualName", "Evaluator.QualityParameter.ActualName"); 182 AddBinding("BestTSPSolutionAnalyzer.CoordinatesParameter.ActualName", "CoordinatesParameter.Name"); 183 AddBinding("BestTSPSolutionAnalyzer.PermutationParameter.ActualName", "SolutionCreator.PermutationParameter.ActualName"); 184 AddBinding("BestTSPSolutionAnalyzer.BestKnownQualityParameter.ActualName", "BestKnownQualityParameter.Name"); 185 AddBinding("BestTSPSolutionAnalyzer.BestKnownSolutionParameter.ActualName", "BestKnownSolutionParameter.Name"); 186 AddBinding("BestTSPSolutionAnalyzer.MaximizationParameter.ActualName", "MaximizationParameter.Name"); 187 BestTSPSolutionAnalyzer.ResultsParameter.ActualName = "Results"; 180 188 } 181 189 … … 320 328 } 321 329 private void ParameterizeAnalyzers() { 322 if (BestTSPSolutionAnalyzer != null) { 323 #region Using First Level Bindings 324 BestTSPSolutionAnalyzer.ParameterBindingList.Add(new ParameterNameBinding( 325 BestTSPSolutionAnalyzer.QualityParameter, 326 Evaluator.QualityParameter 327 )); 328 BestTSPSolutionAnalyzer.ParameterBindingList.Add(new ParameterNameBinding( 329 BestTSPSolutionAnalyzer.CoordinatesParameter, 330 CoordinatesParameter 331 )); 332 BestTSPSolutionAnalyzer.ParameterBindingList.Add(new ParameterNameBinding( 333 BestTSPSolutionAnalyzer.PermutationParameter, 334 SolutionCreator.PermutationParameter 335 )); 336 BestTSPSolutionAnalyzer.ParameterBindingList.Add(new ParameterNameBinding( 337 BestTSPSolutionAnalyzer.BestKnownQualityParameter, 338 BestKnownQualityParameter 339 )); 340 BestTSPSolutionAnalyzer.ParameterBindingList.Add(new ParameterNameBinding( 341 BestTSPSolutionAnalyzer.BestKnownSolutionParameter, 342 BestKnownSolutionParameter 343 )); 344 BestTSPSolutionAnalyzer.ParameterBindingList.Add(new ParameterNameBinding( 345 BestTSPSolutionAnalyzer.MaximizationParameter, 346 MaximizationParameter 347 )); 348 #endregion 349 #region Using Second Level Bindings 350 BestTSPSolutionAnalyzer.ParameterBindingList.Add(new ParameterSecondLevelNameBinding( 351 BestTSPSolutionAnalyzer.QualityParameter, 352 EvaluatorParameter, "QualityParameter" 353 )); 354 BestTSPSolutionAnalyzer.ParameterBindingList.Add(new ParameterSecondLevelNameBinding( 355 BestTSPSolutionAnalyzer.PermutationParameter, 356 SolutionCreatorParameter, "PermutationParameter" 357 )); 358 #endregion 359 #region Old 330 /*if (BestTSPSolutionAnalyzer != null) { 360 331 BestTSPSolutionAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName; 361 332 BestTSPSolutionAnalyzer.CoordinatesParameter.ActualName = CoordinatesParameter.Name; … … 365 336 BestTSPSolutionAnalyzer.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name; 366 337 BestTSPSolutionAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name; 367 #endregion 368 } 338 }*/ 369 339 370 340 if (TSPAlleleFrequencyAnalyzer != null) {
Note: See TracChangeset
for help on using the changeset viewer.