Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/15/12 19:24:54 (12 years ago)
Author:
abeham
Message:

#1614

  • Added a button to recalculate the quality
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentView.cs

    r7470 r7471  
    2626using System.Linq;
    2727using System.Windows.Forms;
     28using HeuristicLab.Common.Resources;
    2829using HeuristicLab.Core.Views;
     30using HeuristicLab.Data;
    2931using HeuristicLab.Encodings.IntegerVectorEncoding;
    3032using HeuristicLab.MainForm;
     
    4446    public GQAPAssignmentView() {
    4547      InitializeComponent();
     48      recalculateButton.Image = VSImageLibrary.Refresh;
    4649    }
    4750
     
    307310    }
    308311    #endregion
     312
     313    private void recalculateButton_Click(object sender, EventArgs e) {
     314      double fdq, iq, oc;
     315      GQAPEvaluator.Evaluate(Content.Assignment, Content.Weights,
     316        Content.Distances, Content.InstallationCosts, Content.Demands,
     317        Content.Capacities, out fdq, out iq, out oc);
     318      Content.FlowDistanceQuality = new DoubleValue(fdq);
     319      Content.InstallationQuality = new DoubleValue(iq);
     320      Content.OverbookedCapacity = new DoubleValue(oc);
     321      Content.Quality = new DoubleValue(
     322        GQAPEvaluator.GetCombinedQuality(fdq, iq, oc,
     323        Content.TransportationCosts.Value, Content.OverbookedCapacityPenalty.Value));
     324    }
    309325  }
    310326}
Note: See TracChangeset for help on using the changeset viewer.