Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/02/15 13:13:25 (9 years ago)
Author:
aballeit
Message:

#2283 added TreeInfos to MCTS excel export

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GrammaticalOptimization/Evaluation/MainWindow.xaml.cs

    r12824 r12827  
    396396        {
    397397            StringBuilder tableExport = new StringBuilder();
    398             tableExport.AppendLine(
     398            tableExport.Append(
    399399                "Run\tMaxIterations\tEvaluations\tBestKnownQuality\tQuality\tQuality %\tFoundAt\tTotalTime\tSolutionTime\tEvaluationsPerSecond\tSolution");
     400            if (ListViewRuns.Items.Count > 0 && ((Run) ListViewRuns.Items[0]).TreeInfos != null)
     401            {
     402                tableExport.Append("\tTotalNodes\tUnexpandedNodes\tExpandedNodes\tLeaveNodes\tDeepestLevel");
     403            }
     404            tableExport.AppendLine();
    400405            for (int i = 0; i < ListViewRuns.Items.Count; i++)
    401406            {
    402407                Run run = (Run)ListViewRuns.Items[i];
    403                 tableExport.AppendLine(string.Format("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}\t{10}", run.RunNumber,
     408                tableExport.Append(string.Format("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}\t{10}", run.RunNumber,
    404409                    run.MaxIterations, run.Evaluations, run.BestKnownQuality, run.BestQuality,
    405410                    run.BestQuality / run.BestKnownQuality, run.BestSolutionFoundAt, run.TotalTime, run.BestSolutionTime,
    406411                    run.EvaluationsPerSecond, run.BestSolution));
     412
     413                if (run.TreeInfos != null)
     414                {
     415                    tableExport.Append(string.Format("\t{0}\t{1}\t{2}\t{3}\t{4}", run.TreeInfos.TotalNodes,
     416                        run.TreeInfos.UnexpandedNodes, run.TreeInfos.ExpandedNodes, run.TreeInfos.LeaveNodes,
     417                        run.TreeInfos.DeepestLevel));
     418                }
     419
     420                tableExport.AppendLine();
    407421            }
    408422            Clipboard.SetData(DataFormats.Text, tableExport.ToString());
Note: See TracChangeset for help on using the changeset viewer.