Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/09/20 13:10:50 (5 years ago)
Author:
mkommend
Message:

#2971: Merged trunk changes into branch, corrected project files (output path for all configurations, reference paths), resolved merge conflicts in InteractiveSymbolicDataAnalysisSolutionSimplifierView.

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

  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj

    r16790 r17501  
    5151    <DebugType>pdbonly</DebugType>
    5252    <Optimize>true</Optimize>
    53     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     53    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    5454    <DefineConstants>TRACE</DefineConstants>
    5555    <ErrorReport>prompt</ErrorReport>
     
    6060  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
    6161    <DebugSymbols>true</DebugSymbols>
    62     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     62    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    6363    <DefineConstants>DEBUG;TRACE</DefineConstants>
    6464    <DebugType>full</DebugType>
     
    6969  </PropertyGroup>
    7070  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
    71     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     71    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    7272    <DefineConstants>TRACE</DefineConstants>
    7373    <Optimize>true</Optimize>
     
    8080  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    8181    <DebugSymbols>true</DebugSymbols>
    82     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     82    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    8383    <DefineConstants>DEBUG;TRACE</DefineConstants>
    8484    <DebugType>full</DebugType>
     
    8989  </PropertyGroup>
    9090  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    91     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     91    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    9292    <DefineConstants>TRACE</DefineConstants>
    9393    <Optimize>true</Optimize>
     
    130130      <SpecificVersion>False</SpecificVersion>
    131131      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core.Views-3.3.dll</HintPath>
     132      <Private>False</Private>
    132133    </Reference>
    133134    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     
    139140      <SpecificVersion>False</SpecificVersion>
    140141      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data.Views-3.3.dll</HintPath>
     142      <Private>False</Private>
    141143    </Reference>
    142144    <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  
    5757      this.grpViewHost = new System.Windows.Forms.GroupBox();
    5858      this.treeChart = new HeuristicLab.Problems.DataAnalysis.Symbolic.Views.InteractiveSymbolicExpressionTreeChart();
     59      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
    5960      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
    6061      this.splitContainer.Panel1.SuspendLayout();
     
    148149      this.btnSimplify.Text = "Simplify";
    149150      this.btnSimplify.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
     151      this.toolTip.SetToolTip(this.btnSimplify, "Simplifies the model structure based on mathematical simplification rules.");
    150152      this.btnSimplify.UseVisualStyleBackColor = true;
    151153      this.btnSimplify.Click += new System.EventHandler(this.btnSimplify_Click);
     
    162164      this.btnOptimizeConstants.Text = "Optimize";
    163165      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.");
    164168      this.btnOptimizeConstants.UseVisualStyleBackColor = true;
    165169      this.btnOptimizeConstants.Click += new System.EventHandler(this.btnOptimizeConstants_Click);
     
    226230    protected System.Windows.Forms.Button btnOptimizeConstants;
    227231    private System.Windows.Forms.Label treeStatusValue;
     232    private System.Windows.Forms.ToolTip toolTip;
    228233  }
    229234}
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs

    r17207 r17501  
    166166    private void Content_Changed(object sender, EventArgs e) {
    167167      UpdateView();
     168      SetEnabledStateOfControls();
    168169    }
    169170
     
    193194
    194195      progress.Start("Calculate Impact and Replacement Values ...");
     196      cancellationTokenSource = new CancellationTokenSource();
    195197      progress.CanBeStopped = true;
    196       cancellationTokenSource = new CancellationTokenSource();
    197 
    198       var impactAndReplacementValues = await Task.Run(() => CalculateImpactAndReplacementValues(tree));
    199 
    200198      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
    225227      progress.CanBeStopped = false;
    226228      PaintNodeImpacts();
     
    335337    private async void btnOptimizeConstants_Click(object sender, EventArgs e) {
    336338      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      }
    341352    }
    342353  }
Note: See TracChangeset for help on using the changeset viewer.