Changeset 8091
- Timestamp:
- 06/23/12 00:21:50 (12 years ago)
- Location:
- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/ConstrainedTypeValue.cs
r7153 r8091 38 38 protected ConstrainedTypeValue(ConstrainedTypeValue original, Cloner cloner) 39 39 : base(original, cloner) { 40 this.validTypes = new List<Type>(original.validTypes); 40 if (original.validTypes != null) 41 this.validTypes = new List<Type>(original.validTypes); 41 42 } 42 43 public override IDeepCloneable Clone(Cloner cloner) { -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ParameterConfigurationTree.cs
r6489 r8091 59 59 } 60 60 } 61 61 62 62 [Storable] 63 63 private DoubleArray bestQualities; … … 185 185 this.runs = cloner.Clone(original.runs); 186 186 this.parameters = new Dictionary<string, IItem>(); 187 foreach (var p in original.parameters) { 188 this.parameters.Add(p.Key, cloner.Clone(p.Value)); 187 if (original.parameters != null) { 188 foreach (var p in original.parameters) { 189 this.parameters.Add(p.Key, cloner.Clone(p.Value)); 190 } 189 191 } 190 192 } … … 194 196 [StorableHook(HookType.AfterDeserialization)] 195 197 private void AfterDeserialization() { 196 if (ProblemConfiguration != null) ProblemConfiguration.ValuesReadOnly = true;198 if (ProblemConfiguration != null) ProblemConfiguration.ValuesReadOnly = true; 197 199 } 198 200 #endregion … … 304 306 this.CollectResultValues(run.Results); 305 307 this.CollectParameterValues(run.Parameters); 306 if (clearParameters) MetaOptimizationUtil.ClearParameters(run, this.GetOptimizedParameterNames());308 if (clearParameters) MetaOptimizationUtil.ClearParameters(run, this.GetOptimizedParameterNames()); 307 309 return run; 308 310 }
Note: See TracChangeset
for help on using the changeset viewer.