Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/16/17 15:16:55 (8 years ago)
Author:
abeham
Message:

#2205: added results tab to solution view to analyze vrp solution in more detail

  • reorganized insertion infos and adapted some evaluators and instances
Location:
branches/OptimizationNetworks/HeuristicLab.Problems.VehicleRouting.Views/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/OptimizationNetworks/HeuristicLab.Problems.VehicleRouting.Views/3.4/VRPSolutionView.Designer.cs

    r14185 r14677  
    5151      this.tourGroupBox = new System.Windows.Forms.GroupBox();
    5252      this.valueTextBox = new System.Windows.Forms.TextBox();
     53      this.tabPage3 = new System.Windows.Forms.TabPage();
     54      this.resultsTextBox = new System.Windows.Forms.TextBox();
    5355      this.tabControl1.SuspendLayout();
    5456      this.tabPage1.SuspendLayout();
    5557      this.tabPage2.SuspendLayout();
    5658      this.tourGroupBox.SuspendLayout();
     59      this.tabPage3.SuspendLayout();
    5760      this.SuspendLayout();
    5861      //
    5962      // tabControl1
    6063      //
     64      this.tabControl1.AllowDrop = true;
    6165      this.tabControl1.Controls.Add(this.tabPage1);
    6266      this.tabControl1.Controls.Add(this.tabPage2);
     67      this.tabControl1.Controls.Add(this.tabPage3);
    6368      this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
    6469      this.tabControl1.Location = new System.Drawing.Point(0, 0);
     
    8489      this.problemInstanceView.Content = null;
    8590      this.problemInstanceView.Dock = System.Windows.Forms.DockStyle.Fill;
     91      this.problemInstanceView.Enabled = false;
    8692      this.problemInstanceView.Location = new System.Drawing.Point(3, 3);
    8793      this.problemInstanceView.Name = "problemInstanceView";
     
    8995      this.problemInstanceView.Size = new System.Drawing.Size(454, 383);
    9096      this.problemInstanceView.TabIndex = 0;
     97      this.problemInstanceView.ViewsLabelVisible = true;
    9198      this.problemInstanceView.ViewType = null;
    9299      //
     
    119126      this.valueTextBox.Multiline = true;
    120127      this.valueTextBox.Name = "valueTextBox";
    121       this.valueTextBox.Size = new System.Drawing.Size(403, 507);
     128      this.valueTextBox.ReadOnly = true;
     129      this.valueTextBox.Size = new System.Drawing.Size(448, 364);
    122130      this.valueTextBox.TabIndex = 0;
    123       this.valueTextBox.ReadOnly = true;
     131      //
     132      // tabPage3
     133      //
     134      this.tabPage3.Controls.Add(this.resultsTextBox);
     135      this.tabPage3.Location = new System.Drawing.Point(4, 22);
     136      this.tabPage3.Name = "tabPage3";
     137      this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
     138      this.tabPage3.Size = new System.Drawing.Size(460, 389);
     139      this.tabPage3.TabIndex = 2;
     140      this.tabPage3.Text = "Results";
     141      this.tabPage3.UseVisualStyleBackColor = true;
     142      //
     143      // resultsTextBox
     144      //
     145      this.resultsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     146            | System.Windows.Forms.AnchorStyles.Left)
     147            | System.Windows.Forms.AnchorStyles.Right)));
     148      this.resultsTextBox.Location = new System.Drawing.Point(6, 6);
     149      this.resultsTextBox.Multiline = true;
     150      this.resultsTextBox.Name = "resultsTextBox";
     151      this.resultsTextBox.ReadOnly = true;
     152      this.resultsTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
     153      this.resultsTextBox.Size = new System.Drawing.Size(448, 377);
     154      this.resultsTextBox.TabIndex = 0;
    124155      //
    125156      // VRPSolutionView
    126157      //
    127       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    128158      this.Controls.Add(this.tabControl1);
    129159      this.Name = "VRPSolutionView";
     
    133163      this.tabPage2.ResumeLayout(false);
    134164      this.tourGroupBox.ResumeLayout(false);
     165      this.tourGroupBox.PerformLayout();
     166      this.tabPage3.ResumeLayout(false);
     167      this.tabPage3.PerformLayout();
    135168      this.ResumeLayout(false);
    136169
     
    145178    private System.Windows.Forms.GroupBox tourGroupBox;
    146179    private System.Windows.Forms.TextBox valueTextBox;
     180    private System.Windows.Forms.TabPage tabPage3;
     181    private System.Windows.Forms.TextBox resultsTextBox;
    147182  }
    148183}
  • branches/OptimizationNetworks/HeuristicLab.Problems.VehicleRouting.Views/3.4/VRPSolutionView.cs

    r14185 r14677  
    2121
    2222using System;
     23using System.Linq;
    2324using System.Text;
    2425using System.Windows.Forms;
     
    5859
    5960      UpdateTourView();
     61      UpdateResultsView();
    6062    }
    6163
     
    8991
    9092    private void UpdateTourView() {
    91       StringBuilder sb = new StringBuilder();
     93      var sb = new StringBuilder();
    9294
    9395      if (Content != null && Content.Solution != null) {
    94         foreach (Tour tour in Content.Solution.GetTours()) {
    95           foreach (int city in tour.Stops) {
     96        foreach (var tour in Content.Solution.GetTours()) {
     97          foreach (var city in tour.Stops) {
    9698            sb.Append(city);
    9799            sb.Append(" ");
     
    103105      valueTextBox.Text = sb.ToString();
    104106    }
     107   
     108    private void UpdateResultsView() {
     109      var builder = new StringBuilder();
     110      if (Content != null && Content.Solution != null) {
     111        var evaluationInfo = Content.ProblemInstance.Evaluate(Content.Solution);
     112        evaluationInfo.GetReport(builder);
     113      }
     114      resultsTextBox.Text = builder.ToString();
     115    }
    105116  }
    106117}
Note: See TracChangeset for help on using the changeset viewer.