Changeset 15400 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs
- Timestamp:
- 10/04/17 13:55:43 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs
r15371 r15400 183 183 treeChart.Tree = tree.Root.SubtreeCount > 1 ? new SymbolicExpressionTree(tree.Root) : new SymbolicExpressionTree(tree.Root.GetSubtree(0).GetSubtree(0)); 184 184 185 progress.Start("Calculate Impact and Replacement Values ..." , 0);185 progress.Start("Calculate Impact and Replacement Values ..."); 186 186 var impactAndReplacementValues = await Task.Run(() => CalculateImpactAndReplacementValues(tree)); 187 187 await Task.Delay(500); // wait for progressbar to finish animation … … 209 209 protected abstract void UpdateModel(ISymbolicExpressionTree tree); 210 210 211 protected virtual ISymbolicExpressionTree OptimizeConstants(ISymbolic DataAnalysisModel model, IDataAnalysisProblemData problemData, IProgress progress) {212 return model.SymbolicExpressionTree;211 protected virtual ISymbolicExpressionTree OptimizeConstants(ISymbolicExpressionTree tree, IProgress progress) { 212 return tree; 213 213 } 214 214 … … 298 298 299 299 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)); 302 303 await Task.Delay(500); // wait for progressbar to finish animation 303 304 UpdateModel(newTree); // UpdateModel calls Progress.Finish (via Content_Changed)
Note: See TracChangeset
for help on using the changeset viewer.