Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/04/17 13:55:43 (7 years ago)
Author:
pfleck
Message:

#1666:

  • Reverted r15371 for HeuristicLab.MainForm and HeuristicLab.MainForm.WindowsForms (all changes concerning the progress)
  • Changed the signature of OptimizeConstants in the simplifiers to "tree in - tree out" (thanks to bburlacu)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs

    r15371 r15400  
    183183      treeChart.Tree = tree.Root.SubtreeCount > 1 ? new SymbolicExpressionTree(tree.Root) : new SymbolicExpressionTree(tree.Root.GetSubtree(0).GetSubtree(0));
    184184
    185       progress.Start("Calculate Impact and Replacement Values ...", 0);
     185      progress.Start("Calculate Impact and Replacement Values ...");
    186186      var impactAndReplacementValues = await Task.Run(() => CalculateImpactAndReplacementValues(tree));
    187187      await Task.Delay(500); // wait for progressbar to finish animation
     
    209209    protected abstract void UpdateModel(ISymbolicExpressionTree tree);
    210210
    211     protected virtual ISymbolicExpressionTree OptimizeConstants(ISymbolicDataAnalysisModel model, IDataAnalysisProblemData problemData, IProgress progress) {
    212       return model.SymbolicExpressionTree;
     211    protected virtual ISymbolicExpressionTree OptimizeConstants(ISymbolicExpressionTree tree, IProgress progress) {
     212      return tree;
    213213    }
    214214
     
    298298
    299299    private async void btnOptimizeConstants_Click(object sender, EventArgs e) {
    300       progress.Start("Optimizing Constants ...", 0);
    301       var newTree = await Task.Run(() => OptimizeConstants(Content.Model, Content.ProblemData, progress));
     300      progress.Start("Optimizing Constants ...");
     301      var tree = (ISymbolicExpressionTree)Content.Model.SymbolicExpressionTree.Clone();
     302      var newTree = await Task.Run(() => OptimizeConstants(tree, progress));
    302303      await Task.Delay(500); // wait for progressbar to finish animation
    303304      UpdateModel(newTree); // UpdateModel calls Progress.Finish (via Content_Changed)
Note: See TracChangeset for help on using the changeset viewer.