Changeset 6489 for branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding
- Timestamp:
- 06/27/11 23:56:35 (14 years ago)
- Location:
- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ParameterCombinationsEnumerator.cs
r5653 r6489 22 22 get { 23 23 if (!initialized) 24 throw new SystemException("Enumeration not started. Call MoveNext!");24 throw new InvalidOperationException("Enumeration not started. Call MoveNext!"); 25 25 return Current; 26 26 } -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ParameterConfigurationTree.cs
r6421 r6489 161 161 this.parameterConfigurations.Add(new SingleValuedParameterConfiguration("Algorithm", algproblemitem.AlgorithmParameter)); 162 162 this.parameterConfigurations.Add(new SingleValuedParameterConfiguration("Problem", algproblemitem.ProblemParameter)); 163 164 // problems can be modified in the list of problem instances, so the parameters which are not Optimize=true, 165 // must not be modifiable in the parameter configuration tree. otherwise the parameter values would be ambiguous 166 ProblemConfiguration.ValuesReadOnly = true; 163 167 } 164 168 public ParameterConfigurationTree() { } … … 190 194 [StorableHook(HookType.AfterDeserialization)] 191 195 private void AfterDeserialization() { 196 if(ProblemConfiguration != null) ProblemConfiguration.ValuesReadOnly = true; 192 197 } 193 198 #endregion -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ParameterConfigurations/ParameterConfiguration.cs
r6486 r6489 146 146 } 147 147 148 [Storable] 149 protected bool valuesReadOnly = false; 150 public virtual bool ValuesReadOnly { 151 get { return valuesReadOnly; } 152 set { 153 if (value != this.valuesReadOnly) { 154 this.valuesReadOnly = value; 155 foreach (var vc in this.valueConfigurations) { 156 vc.ValuesReadOnly = value; 157 } 158 } 159 } 160 } 148 161 149 162 #region Constructors and Cloning … … 220 233 this.discoverValidValues = original.discoverValidValues; 221 234 this.AutoPopulateValueConfigurations = original.AutoPopulateValueConfigurations; 235 this.valuesReadOnly = original.valuesReadOnly; 222 236 } 223 237 … … 485 499 486 500 public void Parameterize(IValueParameter parameter) { 501 if (!Optimize && ValuesReadOnly) 502 return; 503 487 504 if (Optimize) { 488 505 if (this.ActualValue.Value is IParameterizedItem) { -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ValueConfigurations/ParameterizedValueConfiguration.cs
r5927 r6489 46 46 get { return discoverValidValues; } 47 47 set { discoverValidValues = value; } 48 } 49 50 public override bool ValuesReadOnly { 51 set { 52 if (value != this.valuesReadOnly) { 53 this.valuesReadOnly = value; 54 foreach (var pc in this.parameterConfigurations) { 55 pc.ValuesReadOnly = value; 56 } 57 } 58 } 48 59 } 49 60 -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ValueConfigurations/ValueConfiguration.cs
r5927 r6489 73 73 } 74 74 75 [Storable] 76 protected bool valuesReadOnly = false; 77 public virtual bool ValuesReadOnly { 78 get { return valuesReadOnly; } 79 set { 80 if (value != this.valuesReadOnly) { 81 this.valuesReadOnly = value; 82 } 83 } 84 } 85 75 86 #region Constructors and Cloning 76 87 public ValueConfiguration(IItem value, Type valueDataType) { … … 88 99 this.optimize = original.optimize; 89 100 this.number = original.number; 101 this.valuesReadOnly = original.valuesReadOnly; 90 102 RegisterActualValueEvents(); 91 103 }
Note: See TracChangeset
for help on using the changeset viewer.