Changeset 13569 for branches/PerformanceComparison/HeuristicLab.Analysis
- Timestamp:
- 01/26/16 11:23:35 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.Analysis/3.3/Optimizers/IteratedAlgorithm.cs
r13568 r13569 710 710 private void HandleAlgorithmTargetQualityChanged() { 711 711 IParameter param; 712 if (!Algorithm.Parameters.TryGetValue("TargetQuality", out param)) throw new InvalidOperationException("Cannot find TargetQuality parameter in Algorithm " + Algorithm.Name);712 if (!Algorithm.Parameters.TryGetValue("TargetQuality", out param)) return; 713 713 var doubleValueParam = (param as IValueParameter<DoubleValue>); 714 714 if (doubleValueParam == null) return; 715 715 if (doubleValueParam.Value == null && TargetQualityParameter.Value != null) { 716 716 doubleValueParam.Value = new DoubleValue(TargetQualityParameter.Value.Value); … … 724 724 private void HandleAlgorithmMaximumEvaluationsChanged() { 725 725 IParameter param; 726 if (!Algorithm.Parameters.TryGetValue("MaximumEvaluations", out param)) throw new InvalidOperationException("Cannot find MaximumEvaluations parameter in Algorithm " + Algorithm.Name);726 if (!Algorithm.Parameters.TryGetValue("MaximumEvaluations", out param)) return; 727 727 var intValueParam = (param as IValueParameter<IntValue>); 728 if (intValueParam == null) return; 728 729 var value = intValueParam.Value; 729 730 if (value.Value > MaximumEvaluationsParameter.Value.Value) … … 733 734 private void SynchronizeMaximumEvaluationsParameter() { 734 735 IParameter param; 735 if ( Algorithm.Parameters.TryGetValue("MaximumEvaluations", out param)) {736 737 if (intValueParam.Value == null) intValueParam.Value = new IntValue(MaximumEvaluationsParameter.Value.Value);738 else intValueParam.Value.Value = MaximumEvaluationsParameter.Value.Value;739 }736 if (!Algorithm.Parameters.TryGetValue("MaximumEvaluations", out param)) return; 737 var intValueParam = (param as IValueParameter<IntValue>); 738 if (intValueParam == null) return; 739 if (intValueParam.Value == null) intValueParam.Value = new IntValue(MaximumEvaluationsParameter.Value.Value); 740 else intValueParam.Value.Value = MaximumEvaluationsParameter.Value.Value; 740 741 } 741 742 }
Note: See TracChangeset
for help on using the changeset viewer.