Changeset 17501 for branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4
- Timestamp:
- 04/09/20 13:10:50 (5 years ago)
- Location:
- branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Views merged: 17377-17378,17380,17430
- Property svn:mergeinfo changed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj
r16790 r17501 51 51 <DebugType>pdbonly</DebugType> 52 52 <Optimize>true</Optimize> 53 <OutputPath> $(SolutionDir)\bin\</OutputPath>53 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 54 54 <DefineConstants>TRACE</DefineConstants> 55 55 <ErrorReport>prompt</ErrorReport> … … 60 60 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> 61 61 <DebugSymbols>true</DebugSymbols> 62 <OutputPath> $(SolutionDir)\bin\</OutputPath>62 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 63 63 <DefineConstants>DEBUG;TRACE</DefineConstants> 64 64 <DebugType>full</DebugType> … … 69 69 </PropertyGroup> 70 70 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> 71 <OutputPath> $(SolutionDir)\bin\</OutputPath>71 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 72 72 <DefineConstants>TRACE</DefineConstants> 73 73 <Optimize>true</Optimize> … … 80 80 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 81 81 <DebugSymbols>true</DebugSymbols> 82 <OutputPath> $(SolutionDir)\bin\</OutputPath>82 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 83 83 <DefineConstants>DEBUG;TRACE</DefineConstants> 84 84 <DebugType>full</DebugType> … … 89 89 </PropertyGroup> 90 90 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> 91 <OutputPath> $(SolutionDir)\bin\</OutputPath>91 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 92 92 <DefineConstants>TRACE</DefineConstants> 93 93 <Optimize>true</Optimize> … … 130 130 <SpecificVersion>False</SpecificVersion> 131 131 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core.Views-3.3.dll</HintPath> 132 <Private>False</Private> 132 133 </Reference> 133 134 <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> … … 139 140 <SpecificVersion>False</SpecificVersion> 140 141 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data.Views-3.3.dll</HintPath> 142 <Private>False</Private> 141 143 </Reference> 142 144 <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs
r17207 r17501 57 57 this.grpViewHost = new System.Windows.Forms.GroupBox(); 58 58 this.treeChart = new HeuristicLab.Problems.DataAnalysis.Symbolic.Views.InteractiveSymbolicExpressionTreeChart(); 59 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 59 60 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 60 61 this.splitContainer.Panel1.SuspendLayout(); … … 148 149 this.btnSimplify.Text = "Simplify"; 149 150 this.btnSimplify.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; 151 this.toolTip.SetToolTip(this.btnSimplify, "Simplifies the model structure based on mathematical simplification rules."); 150 152 this.btnSimplify.UseVisualStyleBackColor = true; 151 153 this.btnSimplify.Click += new System.EventHandler(this.btnSimplify_Click); … … 162 164 this.btnOptimizeConstants.Text = "Optimize"; 163 165 this.btnOptimizeConstants.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; 166 this.toolTip.SetToolTip(this.btnOptimizeConstants, "Optimizes the numerical constants of the model. \r\nIf the algorithm converges, opt" + 167 "imization is stopped."); 164 168 this.btnOptimizeConstants.UseVisualStyleBackColor = true; 165 169 this.btnOptimizeConstants.Click += new System.EventHandler(this.btnOptimizeConstants_Click); … … 226 230 protected System.Windows.Forms.Button btnOptimizeConstants; 227 231 private System.Windows.Forms.Label treeStatusValue; 232 private System.Windows.Forms.ToolTip toolTip; 228 233 } 229 234 } -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs
r17207 r17501 166 166 private void Content_Changed(object sender, EventArgs e) { 167 167 UpdateView(); 168 SetEnabledStateOfControls(); 168 169 } 169 170 … … 193 194 194 195 progress.Start("Calculate Impact and Replacement Values ..."); 196 cancellationTokenSource = new CancellationTokenSource(); 195 197 progress.CanBeStopped = true; 196 cancellationTokenSource = new CancellationTokenSource();197 198 var impactAndReplacementValues = await Task.Run(() => CalculateImpactAndReplacementValues(tree));199 200 198 try { 201 await Task.Delay(500, cancellationTokenSource.Token); // wait for progressbar to finish animation 202 } catch (OperationCanceledException) { } 203 var replacementValues = impactAndReplacementValues.ToDictionary(x => x.Key, x => x.Value.Item2); 204 foreach (var pair in replacementValues.Where(pair => !(pair.Key is ConstantTreeNode))) { 205 foldedNodes[pair.Key] = MakeConstantTreeNode(pair.Value); 206 } 207 208 foreach (var kvp in impactAndReplacementValues) { 209 nodeImpacts[kvp.Key] = kvp.Value.Item1; 210 } 211 212 var regressionProblemData = Content.ProblemData as IRegressionProblemData; 213 if (regressionProblemData != null) { 214 var interpreter = new IntervalInterpreter(); 215 var variableRanges = regressionProblemData.VariableRanges.GetIntervals(); 216 IDictionary<ISymbolicExpressionTreeNode, Interval> intervals; 217 interpreter.GetSymbolicExpressionTreeIntervals(tree, variableRanges, out intervals); 218 foreach (var kvp in intervals) { 219 nodeIntervals[kvp.Key] = kvp.Value; 220 } 221 } 222 223 224 progress.Finish(); 199 var impactAndReplacementValues = await Task.Run(() => CalculateImpactAndReplacementValues(tree)); 200 try { 201 await Task.Delay(300, cancellationTokenSource.Token); // wait for progressbar to finish animation 202 } catch (OperationCanceledException) { } 203 204 var replacementValues = impactAndReplacementValues.ToDictionary(x => x.Key, x => x.Value.Item2); 205 foreach (var pair in replacementValues.Where(pair => !(pair.Key is ConstantTreeNode))) { 206 foldedNodes[pair.Key] = MakeConstantTreeNode(pair.Value); 207 } 208 209 foreach (var pair in impactAndReplacementValues) { 210 nodeImpacts[pair.Key] = pair.Value.Item1; 211 } 212 213 var regressionProblemData = Content.ProblemData as IRegressionProblemData; 214 if (regressionProblemData != null) { 215 var interpreter = new IntervalInterpreter(); 216 var variableRanges = regressionProblemData.VariableRanges.GetIntervals(); 217 IDictionary<ISymbolicExpressionTreeNode, Interval> intervals; 218 interpreter.GetSymbolicExpressionTreeIntervals(tree, variableRanges, out intervals); 219 foreach (var kvp in intervals) { 220 nodeIntervals[kvp.Key] = kvp.Value; 221 } 222 } 223 } finally { 224 progress.Finish(); 225 } 226 225 227 progress.CanBeStopped = false; 226 228 PaintNodeImpacts(); … … 335 337 private async void btnOptimizeConstants_Click(object sender, EventArgs e) { 336 338 progress.Start("Optimizing Constants ..."); 337 var tree = (ISymbolicExpressionTree)Content.Model.SymbolicExpressionTree.Clone(); 338 var newTree = await Task.Run(() => OptimizeConstants(tree, progress)); 339 await Task.Delay(500); // wait for progressbar to finish animation 340 UpdateModel(newTree); // UpdateModel calls Progress.Finish (via Content_Changed) 339 cancellationTokenSource = new CancellationTokenSource(); 340 progress.CanBeStopped = true; 341 try { 342 var tree = (ISymbolicExpressionTree)Content.Model.SymbolicExpressionTree.Clone(); 343 344 var newTree = await Task.Run(() => OptimizeConstants(tree, progress)); 345 try { 346 await Task.Delay(300, cancellationTokenSource.Token); // wait for progressbar to finish animation 347 } catch (OperationCanceledException) { } 348 UpdateModel(newTree); // triggers progress.Finish after calculating the node impacts when model is changed 349 } catch { 350 progress.Finish(); 351 } 341 352 } 342 353 }
Note: See TracChangeset
for help on using the changeset viewer.