Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/26/16 11:23:35 (9 years ago)
Author:
abeham
Message:

#2457: fixed bugs in iterated algorithm, fixed bug in expert system view

Location:
branches/PerformanceComparison
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.Analysis/3.3/Optimizers/IteratedAlgorithm.cs

    r13568 r13569  
    710710    private void HandleAlgorithmTargetQualityChanged() {
    711711      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;
    713713      var doubleValueParam = (param as IValueParameter<DoubleValue>);
    714 
     714      if (doubleValueParam == null) return;
    715715      if (doubleValueParam.Value == null && TargetQualityParameter.Value != null) {
    716716        doubleValueParam.Value = new DoubleValue(TargetQualityParameter.Value.Value);
     
    724724    private void HandleAlgorithmMaximumEvaluationsChanged() {
    725725      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;
    727727      var intValueParam = (param as IValueParameter<IntValue>);
     728      if (intValueParam == null) return;
    728729      var value = intValueParam.Value;
    729730      if (value.Value > MaximumEvaluationsParameter.Value.Value)
     
    733734    private void SynchronizeMaximumEvaluationsParameter() {
    734735      IParameter param;
    735       if (Algorithm.Parameters.TryGetValue("MaximumEvaluations", out param)) {
    736         var intValueParam = (param as IValueParameter<IntValue>);
    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;
    740741    }
    741742  }
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem.Views/3.3/ExpertSystemView.cs

    r13564 r13569  
    208208
    209209    private void OkbDownloadButtonOnClick(object sender, EventArgs e) {
    210       if (Content.Problem.ProblemId != -1) {
     210      if (Content.Problem.ProblemId == -1) {
    211211        MessageBox.Show("Please select a problem instance first.");
    212212        return;
Note: See TracChangeset for help on using the changeset viewer.