Changeset 17896
- Timestamp:
- 03/16/21 11:08:18 (4 years ago)
- Location:
- branches/3073_IA_constraint_splitting_reintegration
- Files:
-
- 1 added
- 2 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/IntervalArithmeticGrammar.cs
r17887 r17896 1 using System.Collections.Generic; 1 #region License Information 2 3 /* HeuristicLab 4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 * 6 * This file is part of HeuristicLab. 7 * 8 * HeuristicLab is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * HeuristicLab is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #endregion 23 using System.Collections.Generic; 2 24 using System.Linq; 3 25 using HEAL.Attic; … … 8 30 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 9 31 [StorableType("5A2300A0-D0FC-4F2D-B910-F86384FE9052")] 10 [Item("IntervalArithmeticGrammar", "Represents a grammar for interval arithmetic ")]32 [Item("IntervalArithmeticGrammar", "Represents a grammar for interval arithmetic which includes linear scaling parts implicitly.")] 11 33 public class IntervalArithmeticGrammar : DataAnalysisGrammar, ISymbolicDataAnalysisGrammar { 12 34 public IntervalArithmeticGrammar() : base(ItemAttribute.GetName(typeof(IntervalArithmeticGrammar)), -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalArithBoundsEstimator.cs
r17891 r17896 1 using System; 1 #region License Information 2 3 /* HeuristicLab 4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 * 6 * This file is part of HeuristicLab. 7 * 8 * HeuristicLab is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * HeuristicLab is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #endregion 23 using System; 2 24 using System.Collections.Generic; 3 using System.Collections.ObjectModel;4 25 using System.Linq; 5 26 using HEAL.Attic; … … 34 55 private IntervalArithBoundsEstimator(IntervalArithBoundsEstimator original, Cloner cloner) : base(original, cloner) { } 35 56 36 public IntervalArithBoundsEstimator() : base("I ABounds Estimator",57 public IntervalArithBoundsEstimator() : base("Interval Arithmetic Bounds Estimator", 37 58 "Estimates the bounds of the model with interval arithmetic") { 38 59 Parameters.Add(new FixedValueParameter<IntValue>(EvaluatedSolutionsParameterName, -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalArithCompiledExpressionBoundsEstimator.cs
r17891 r17896 1 using HEAL.Attic; 1 #region License Information 2 3 /* HeuristicLab 4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 * 6 * This file is part of HeuristicLab. 7 * 8 * HeuristicLab is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * HeuristicLab is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #endregion 23 24 using HEAL.Attic; 2 25 using HeuristicLab.Common; 3 26 using HeuristicLab.Core; … … 45 68 private readonly object syncRoot = new object(); 46 69 47 public IntervalArithCompiledExpressionBoundsEstimator() : base("Interval Arith Bounds Estimator",70 public IntervalArithCompiledExpressionBoundsEstimator() : base("Interval Arithmetic Compiled Expression Bounds Estimator", 48 71 "Estimates the bounds of the model with interval arithmetic, by first compiling the model into a lambda.") { 49 72 Parameters.Add(new FixedValueParameter<IntValue>(EvaluatedSolutionsParameterName, -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/IntervalUtil.cs
r17891 r17896 1 using System; 1 #region License Information 2 3 /* HeuristicLab 4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 * 6 * This file is part of HeuristicLab. 7 * 8 * HeuristicLab is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * HeuristicLab is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #endregion 23 using System; 2 24 using System.Collections.Generic; 3 25 using System.Linq; … … 47 69 } 48 70 } 49 50 71 } 51 72 } -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
r17893 r17896 309 309 <Compile Include="Interfaces\IDataPreprocessorStarter.cs" /> 310 310 <Compile Include="Interfaces\IPartialDependencePlot.cs" /> 311 <Compile Include="IntervalCollectionView.cs">312 <SubType>UserControl</SubType>313 </Compile>314 <Compile Include="IntervalCollectionView.Designer.cs">315 <DependentUpon>IntervalCollectionView.cs</DependentUpon>316 </Compile>317 <Compile Include="IntervalConstraintView.cs">318 <SubType>UserControl</SubType>319 </Compile>320 <Compile Include="IntervalConstraintView.Designer.cs">321 <DependentUpon>IntervalConstraintView.cs</DependentUpon>322 </Compile>323 311 <Compile Include="MenuItems\ChangeDataOfOptimizersMenuItem.cs" /> 324 312 <Compile Include="MenuItems\ShrinkDataAnalysisRunsMenuItem.cs" /> … … 353 341 <DependentUpon>ConfidenceRegressionSolutionLineChartView.cs</DependentUpon> 354 342 </Compile> 343 <Compile Include="Regression\IntervalCollectionView.cs"> 344 <SubType>UserControl</SubType> 345 </Compile> 346 <Compile Include="Regression\IntervalCollectionView.Designer.cs"> 347 <DependentUpon>IntervalCollectionView.cs</DependentUpon> 348 </Compile> 355 349 <Compile Include="Regression\RegressionEnsembleSolutionModelWeightsView.cs"> 356 350 <SubType>UserControl</SubType> … … 443 437 <DependentUpon>RegressionSolutionScatterPlotView.cs</DependentUpon> 444 438 </Compile> 445 <Compile Include=" ShapeConstraintsView.cs">446 <SubType>UserControl</SubType> 447 </Compile> 448 <Compile Include=" ShapeConstraintsView.Designer.cs">439 <Compile Include="Regression\ShapeConstraintsView.cs"> 440 <SubType>UserControl</SubType> 441 </Compile> 442 <Compile Include="Regression\ShapeConstraintsView.Designer.cs"> 449 443 <DependentUpon>ShapeConstraintsView.cs</DependentUpon> 444 </Compile> 445 <Compile Include="Regression\ShapeConstraintView.cs"> 446 <SubType>UserControl</SubType> 447 </Compile> 448 <Compile Include="Regression\ShapeConstraintView.Designer.cs"> 449 <DependentUpon>ShapeConstraintView.cs</DependentUpon> 450 450 </Compile> 451 451 <Compile Include="Solution Views\ClassificationSolutionView.cs"> … … 603 603 <DependentUpon>AbstractFeatureCorrelationView.cs</DependentUpon> 604 604 </EmbeddedResource> 605 <EmbeddedResource Include="IntervalConstraintView.resx">606 <DependentUpon>IntervalConstraintView.cs</DependentUpon>607 </EmbeddedResource>608 605 <EmbeddedResource Include="Properties\Resources.resx"> 609 606 <Generator>ResXFileCodeGenerator</Generator> 610 607 <LastGenOutput>Resources.Designer.cs</LastGenOutput> 611 608 </EmbeddedResource> 612 <EmbeddedResource Include="ShapeConstraintsView.resx">613 <DependentUpon>ShapeConstraintsView.cs</DependentUpon>614 </EmbeddedResource>615 609 </ItemGroup> 616 610 <ItemGroup> 611 <EmbeddedResource Include="Resources\shapeConstraintsHelp.rtf" /> 617 612 <None Include="Resources\VS2008ImageLibrary_Annotations_Information.png" /> 618 613 </ItemGroup> -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Properties/Resources.Designer.cs
r17893 r17896 1 1 //------------------------------------------------------------------------------ 2 2 // <auto-generated> 3 // Dieser Code wurde von einem Tool generiert.4 // Laufzeitversion:4.0.30319.420003 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.42000 5 5 // 6 // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn7 // der Code erneut generiert wird.6 // Changes to this file may cause incorrect behavior and will be lost if 7 // the code is regenerated. 8 8 // </auto-generated> 9 9 //------------------------------------------------------------------------------ … … 14 14 15 15 /// <summary> 16 /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.16 /// A strongly-typed resource class, for looking up localized strings, etc. 17 17 /// </summary> 18 // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert19 // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.20 // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen21 // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.18 // This class was auto-generated by the StronglyTypedResourceBuilder 19 // class via a tool like ResGen or Visual Studio. 20 // To add or remove a member, edit your .ResX file then rerun ResGen 21 // with the /str option, or rebuild your VS project. 22 22 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 23 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] … … 34 34 35 35 /// <summary> 36 /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.36 /// Returns the cached ResourceManager instance used by this class. 37 37 /// </summary> 38 38 [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] … … 48 48 49 49 /// <summary> 50 /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle51 /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.50 /// Overrides the current thread's CurrentUICulture property for all 51 /// resource lookups using this strongly typed resource class. 52 52 /// </summary> 53 53 [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] … … 62 62 63 63 /// <summary> 64 /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. 64 /// Looks up a localized string similar to {\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang2057{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil\fcharset0 Consolas;}{\f2\fnil\fcharset1 Cambria Math;}} 65 ///{\colortbl ;\red0\green0\blue0;} 66 ///{\*\generator Riched20 10.0.18362}{\*\mmathPr\mmathFont2\mwrapIndent1440 }\viewkind4\uc1 67 ///\pard\sa200\sl276\slmult1\cf1\fs19\lang9 Within the text field you can define different types of shape constraints e.g. range constraints, monotonicity constraints.\par 68 /// 69 ///\pard\sl276\slmult1 To define a model constraint: \par 70 /// 71 ///\p [rest of string was truncated]";. 72 /// </summary> 73 internal static string shapeConstraintsHelp_rtf { 74 get { 75 return ResourceManager.GetString("shapeConstraintsHelp.rtf", resourceCulture); 76 } 77 } 78 79 /// <summary> 80 /// Looks up a localized resource of type System.Drawing.Bitmap. 65 81 /// </summary> 66 82 internal static System.Drawing.Bitmap VS2008ImageLibrary_Annotations_Information { -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Properties/Resources.resx
r17893 r17896 119 119 </resheader> 120 120 <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 121 <data name="shapeConstraintsHelp.rtf" type="System.Resources.ResXFileRef, System.Windows.Forms"> 122 <value>..\Resources\shapeConstraintsHelp.rtf;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> 123 </data> 121 124 <data name="VS2008ImageLibrary_Annotations_Information" type="System.Resources.ResXFileRef, System.Windows.Forms"> 122 125 <value>..\Resources\VS2008ImageLibrary_Annotations_Information.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/IntervalCollectionView.Designer.cs
r17894 r17896 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-2019Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/IntervalCollectionView.cs
r17894 r17896 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-2019Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 95 95 96 96 private void SetColumnNames() { 97 dataGridView.Columns.Add("lowerBound", "Lower Bound");98 dataGridView.Columns.Add("upperBound", "Upper Bound");97 dataGridView.Columns.Add("lowerBound", "Lower bound"); 98 dataGridView.Columns.Add("upperBound", "Upper bound"); 99 99 } 100 100 -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/ShapeConstraintView.Designer.cs
r17895 r17896 1 namespace HeuristicLab.Problems.DataAnalysis.Views { 2 partial class IntervalConstraintView { 1 #region License Information 2 3 /* HeuristicLab 4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 * 6 * This file is part of HeuristicLab. 7 * 8 * HeuristicLab is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * HeuristicLab is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 # endregion 23 24 namespace HeuristicLab.Problems.DataAnalysis.Views { 25 partial class ShapeConstraintView { 3 26 /// <summary> 4 27 /// Required designer variable. … … 11 34 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> 12 35 protected override void Dispose(bool disposing) { 13 14 15 16 36 if (disposing && (components != null)) { 37 components.Dispose(); 38 } 39 base.Dispose(disposing); 17 40 } 18 41 … … 24 47 /// </summary> 25 48 private void InitializeComponent() { 26 this.components = new System.ComponentModel.Container(); 27 this.lowerboundLabel = new System.Windows.Forms.Label(); 28 this.upperboundLabel = new System.Windows.Forms.Label(); 29 this.variableLabel = new System.Windows.Forms.Label(); 30 this.numberderivationLabel = new System.Windows.Forms.Label(); 31 this.upperboundInput = new System.Windows.Forms.TextBox(); 32 this.lowerboundInput = new System.Windows.Forms.TextBox(); 33 this.variableInput = new System.Windows.Forms.TextBox(); 34 this.groupBox1 = new System.Windows.Forms.GroupBox(); 35 this.weightInput = new System.Windows.Forms.TextBox(); 36 this.WeightLab = new System.Windows.Forms.Label(); 37 this.regionLab = new System.Windows.Forms.Label(); 38 this.regionView = new HeuristicLab.Problems.DataAnalysis.Views.IntervalCollectionView(); 39 this.label1 = new System.Windows.Forms.Label(); 40 this.numberderivationInput = new System.Windows.Forms.ComboBox(); 41 this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); 42 this.groupBox1.SuspendLayout(); 43 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 44 this.SuspendLayout(); 45 // 46 // lowerboundLabel 47 // 48 this.lowerboundLabel.AutoSize = true; 49 this.lowerboundLabel.Location = new System.Drawing.Point(8, 101); 50 this.lowerboundLabel.Name = "lowerboundLabel"; 51 this.lowerboundLabel.Size = new System.Drawing.Size(69, 13); 52 this.lowerboundLabel.TabIndex = 2; 53 this.lowerboundLabel.Text = "Lowerbound:"; 54 // 55 // upperboundLabel 56 // 57 this.upperboundLabel.AutoSize = true; 58 this.upperboundLabel.Location = new System.Drawing.Point(8, 126); 59 this.upperboundLabel.Name = "upperboundLabel"; 60 this.upperboundLabel.Size = new System.Drawing.Size(69, 13); 61 this.upperboundLabel.TabIndex = 3; 62 this.upperboundLabel.Text = "Upperbound:"; 63 // 64 // variableLabel 65 // 66 this.variableLabel.AutoSize = true; 67 this.variableLabel.Location = new System.Drawing.Point(8, 47); 68 this.variableLabel.Name = "variableLabel"; 69 this.variableLabel.Size = new System.Drawing.Size(48, 13); 70 this.variableLabel.TabIndex = 7; 71 this.variableLabel.Text = "Variable:"; 72 // 73 // numberderivationLabel 74 // 75 this.numberderivationLabel.AutoSize = true; 76 this.numberderivationLabel.Location = new System.Drawing.Point(8, 74); 77 this.numberderivationLabel.Name = "numberderivationLabel"; 78 this.numberderivationLabel.Size = new System.Drawing.Size(65, 13); 79 this.numberderivationLabel.TabIndex = 8; 80 this.numberderivationLabel.Text = "#Derivation:"; 81 // 82 // upperboundInput 83 // 84 this.upperboundInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 85 | System.Windows.Forms.AnchorStyles.Right))); 86 this.upperboundInput.Location = new System.Drawing.Point(108, 123); 87 this.upperboundInput.Name = "upperboundInput"; 88 this.upperboundInput.Size = new System.Drawing.Size(473, 20); 89 this.upperboundInput.TabIndex = 11; 90 this.upperboundInput.Validating += new System.ComponentModel.CancelEventHandler(this.upperboundInput_Validating); 91 this.upperboundInput.Validated += new System.EventHandler(this.upperboundInput_Validated); 92 // 93 // lowerboundInput 94 // 95 this.lowerboundInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 96 | System.Windows.Forms.AnchorStyles.Right))); 97 this.lowerboundInput.Location = new System.Drawing.Point(108, 98); 98 this.lowerboundInput.Name = "lowerboundInput"; 99 this.lowerboundInput.Size = new System.Drawing.Size(473, 20); 100 this.lowerboundInput.TabIndex = 12; 101 this.lowerboundInput.Validating += new System.ComponentModel.CancelEventHandler(this.lowerboundInput_Validating); 102 this.lowerboundInput.Validated += new System.EventHandler(this.lowerboundInput_Validated); 103 // 104 // variableInput 105 // 106 this.variableInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 107 | System.Windows.Forms.AnchorStyles.Right))); 108 this.variableInput.Location = new System.Drawing.Point(108, 44); 109 this.variableInput.Name = "variableInput"; 110 this.variableInput.Size = new System.Drawing.Size(473, 20); 111 this.variableInput.TabIndex = 15; 112 // 113 // groupBox1 114 // 115 this.groupBox1.Controls.Add(this.weightInput); 116 this.groupBox1.Controls.Add(this.WeightLab); 117 this.groupBox1.Controls.Add(this.regionLab); 118 this.groupBox1.Controls.Add(this.regionView); 119 this.groupBox1.Controls.Add(this.label1); 120 this.groupBox1.Controls.Add(this.numberderivationInput); 121 this.groupBox1.Controls.Add(this.variableInput); 122 this.groupBox1.Controls.Add(this.lowerboundInput); 123 this.groupBox1.Controls.Add(this.upperboundInput); 124 this.groupBox1.Controls.Add(this.numberderivationLabel); 125 this.groupBox1.Controls.Add(this.variableLabel); 126 this.groupBox1.Controls.Add(this.upperboundLabel); 127 this.groupBox1.Controls.Add(this.lowerboundLabel); 128 this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; 129 this.groupBox1.Location = new System.Drawing.Point(0, 0); 130 this.groupBox1.Name = "groupBox1"; 131 this.groupBox1.Size = new System.Drawing.Size(587, 380); 132 this.groupBox1.TabIndex = 0; 133 this.groupBox1.TabStop = false; 134 this.groupBox1.Text = "Interval Constraints Detail"; 135 // 136 // weightInput 137 // 138 this.weightInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 139 | System.Windows.Forms.AnchorStyles.Right))); 140 this.weightInput.Location = new System.Drawing.Point(108, 150); 141 this.weightInput.Name = "weightInput"; 142 this.weightInput.Size = new System.Drawing.Size(473, 20); 143 this.weightInput.TabIndex = 33; 144 this.weightInput.TextChanged += new System.EventHandler(this.weightInput_TextChanged); 145 // 146 // WeightLab 147 // 148 this.WeightLab.AutoSize = true; 149 this.WeightLab.Location = new System.Drawing.Point(8, 153); 150 this.WeightLab.Name = "WeightLab"; 151 this.WeightLab.Size = new System.Drawing.Size(44, 13); 152 this.WeightLab.TabIndex = 32; 153 this.WeightLab.Text = "Weight:"; 154 // 155 // regionLab 156 // 157 this.regionLab.AutoSize = true; 158 this.regionLab.Location = new System.Drawing.Point(8, 188); 159 this.regionLab.Name = "regionLab"; 160 this.regionLab.Size = new System.Drawing.Size(49, 13); 161 this.regionLab.TabIndex = 31; 162 this.regionLab.Text = "Regions:"; 163 // 164 // regionView 165 // 166 this.regionView.Caption = "IntervalCollection View"; 167 this.regionView.Content = null; 168 this.regionView.Location = new System.Drawing.Point(108, 188); 169 this.regionView.Name = "regionView"; 170 this.regionView.ReadOnly = false; 171 this.regionView.Size = new System.Drawing.Size(473, 186); 172 this.regionView.TabIndex = 30; 173 this.regionView.TabStop = false; 174 // 175 // label1 176 // 177 this.label1.AutoSize = true; 178 this.label1.Location = new System.Drawing.Point(11, -105); 179 this.label1.Name = "label1"; 180 this.label1.Size = new System.Drawing.Size(49, 13); 181 this.label1.TabIndex = 28; 182 this.label1.Text = "Enabled:"; 183 // 184 // numberderivationInput 185 // 186 this.numberderivationInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 187 | System.Windows.Forms.AnchorStyles.Right))); 188 this.numberderivationInput.FormattingEnabled = true; 189 this.numberderivationInput.Location = new System.Drawing.Point(108, 71); 190 this.numberderivationInput.Name = "numberderivationInput"; 191 this.numberderivationInput.Size = new System.Drawing.Size(473, 21); 192 this.numberderivationInput.TabIndex = 27; 193 this.numberderivationInput.SelectedIndexChanged += new System.EventHandler(this.numberderivationInput_SelectedIndexChanged); 194 // 195 // errorProvider 196 // 197 this.errorProvider.ContainerControl = this; 198 this.errorProvider.RightToLeft = true; 199 // 200 // IntervalConstraintView 201 // 202 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 203 this.Controls.Add(this.groupBox1); 204 this.Name = "IntervalConstraintView"; 205 this.Size = new System.Drawing.Size(587, 380); 206 this.groupBox1.ResumeLayout(false); 207 this.groupBox1.PerformLayout(); 208 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 209 this.ResumeLayout(false); 49 this.components = new System.ComponentModel.Container(); 50 this.lowerboundLabel = new System.Windows.Forms.Label(); 51 this.upperboundLabel = new System.Windows.Forms.Label(); 52 this.variableLabel = new System.Windows.Forms.Label(); 53 this.numberOfDerivationLabel = new System.Windows.Forms.Label(); 54 this.upperboundInput = new System.Windows.Forms.TextBox(); 55 this.lowerboundInput = new System.Windows.Forms.TextBox(); 56 this.variableInput = new System.Windows.Forms.TextBox(); 57 this.groupBox = new System.Windows.Forms.GroupBox(); 58 this.weightTextBox = new System.Windows.Forms.TextBox(); 59 this.weightLabel = new System.Windows.Forms.Label(); 60 this.regionLabel = new System.Windows.Forms.Label(); 61 this.regionView = new HeuristicLab.Problems.DataAnalysis.Views.IntervalCollectionView(); 62 this.numberOfDerivationsComboBox = new System.Windows.Forms.ComboBox(); 63 this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); 64 this.groupBox.SuspendLayout(); 65 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 66 this.SuspendLayout(); 67 // 68 // lowerboundLabel 69 // 70 this.lowerboundLabel.AutoSize = true; 71 this.lowerboundLabel.Location = new System.Drawing.Point(8, 75); 72 this.lowerboundLabel.Name = "lowerboundLabel"; 73 this.lowerboundLabel.Size = new System.Drawing.Size(72, 13); 74 this.lowerboundLabel.TabIndex = 4; 75 this.lowerboundLabel.Text = "Lower bound:"; 76 // 77 // upperboundLabel 78 // 79 this.upperboundLabel.AutoSize = true; 80 this.upperboundLabel.Location = new System.Drawing.Point(8, 101); 81 this.upperboundLabel.Name = "upperboundLabel"; 82 this.upperboundLabel.Size = new System.Drawing.Size(72, 13); 83 this.upperboundLabel.TabIndex = 6; 84 this.upperboundLabel.Text = "Upper bound:"; 85 // 86 // variableLabel 87 // 88 this.variableLabel.AutoSize = true; 89 this.variableLabel.Location = new System.Drawing.Point(8, 22); 90 this.variableLabel.Name = "variableLabel"; 91 this.variableLabel.Size = new System.Drawing.Size(48, 13); 92 this.variableLabel.TabIndex = 0; 93 this.variableLabel.Text = "Variable:"; 94 // 95 // numberderivationLabel 96 // 97 this.numberOfDerivationLabel.AutoSize = true; 98 this.numberOfDerivationLabel.Location = new System.Drawing.Point(8, 48); 99 this.numberOfDerivationLabel.Name = "numberderivationLabel"; 100 this.numberOfDerivationLabel.Size = new System.Drawing.Size(58, 13); 101 this.numberOfDerivationLabel.TabIndex = 2; 102 this.numberOfDerivationLabel.Text = "Derivative:"; 103 // 104 // upperboundInput 105 // 106 this.upperboundInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 107 | System.Windows.Forms.AnchorStyles.Right))); 108 this.upperboundInput.Location = new System.Drawing.Point(86, 98); 109 this.upperboundInput.Name = "upperboundInput"; 110 this.upperboundInput.Size = new System.Drawing.Size(495, 20); 111 this.upperboundInput.TabIndex = 7; 112 this.upperboundInput.Validating += new System.ComponentModel.CancelEventHandler(this.upperboundInput_Validating); 113 this.upperboundInput.Validated += new System.EventHandler(this.upperboundInput_Validated); 114 // 115 // lowerboundInput 116 // 117 this.lowerboundInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 118 | System.Windows.Forms.AnchorStyles.Right))); 119 this.lowerboundInput.Location = new System.Drawing.Point(86, 72); 120 this.lowerboundInput.Name = "lowerboundInput"; 121 this.lowerboundInput.Size = new System.Drawing.Size(495, 20); 122 this.lowerboundInput.TabIndex = 5; 123 this.lowerboundInput.Validating += new System.ComponentModel.CancelEventHandler(this.lowerboundInput_Validating); 124 this.lowerboundInput.Validated += new System.EventHandler(this.lowerboundInput_Validated); 125 // 126 // variableInput 127 // 128 this.variableInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 129 | System.Windows.Forms.AnchorStyles.Right))); 130 this.variableInput.Location = new System.Drawing.Point(86, 19); 131 this.variableInput.Name = "variableInput"; 132 this.variableInput.Size = new System.Drawing.Size(495, 20); 133 this.variableInput.TabIndex = 1; 134 // 135 // groupBox 136 // 137 this.groupBox.Controls.Add(this.weightTextBox); 138 this.groupBox.Controls.Add(this.weightLabel); 139 this.groupBox.Controls.Add(this.regionLabel); 140 this.groupBox.Controls.Add(this.regionView); 141 this.groupBox.Controls.Add(this.numberOfDerivationsComboBox); 142 this.groupBox.Controls.Add(this.variableInput); 143 this.groupBox.Controls.Add(this.lowerboundInput); 144 this.groupBox.Controls.Add(this.upperboundInput); 145 this.groupBox.Controls.Add(this.numberOfDerivationLabel); 146 this.groupBox.Controls.Add(this.variableLabel); 147 this.groupBox.Controls.Add(this.upperboundLabel); 148 this.groupBox.Controls.Add(this.lowerboundLabel); 149 this.groupBox.Dock = System.Windows.Forms.DockStyle.Fill; 150 this.groupBox.Location = new System.Drawing.Point(0, 0); 151 this.groupBox.Name = "groupBox"; 152 this.groupBox.Size = new System.Drawing.Size(587, 380); 153 this.groupBox.TabIndex = 0; 154 this.groupBox.TabStop = false; 155 this.groupBox.Text = "Shape Constraint Detail"; 156 // 157 // weightInput 158 // 159 this.weightTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 160 | System.Windows.Forms.AnchorStyles.Right))); 161 this.weightTextBox.Location = new System.Drawing.Point(86, 124); 162 this.weightTextBox.Name = "weightInput"; 163 this.weightTextBox.Size = new System.Drawing.Size(495, 20); 164 this.weightTextBox.TabIndex = 9; 165 this.weightTextBox.TextChanged += new System.EventHandler(this.weightInput_TextChanged); 166 // 167 // WeightLab 168 // 169 this.weightLabel.AutoSize = true; 170 this.weightLabel.Location = new System.Drawing.Point(8, 127); 171 this.weightLabel.Name = "WeightLab"; 172 this.weightLabel.Size = new System.Drawing.Size(44, 13); 173 this.weightLabel.TabIndex = 8; 174 this.weightLabel.Text = "Weight:"; 175 // 176 // regionLab 177 // 178 this.regionLabel.AutoSize = true; 179 this.regionLabel.Location = new System.Drawing.Point(8, 150); 180 this.regionLabel.Name = "regionLab"; 181 this.regionLabel.Size = new System.Drawing.Size(49, 13); 182 this.regionLabel.TabIndex = 10; 183 this.regionLabel.Text = "Regions:"; 184 // 185 // regionView 186 // 187 this.regionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 188 | System.Windows.Forms.AnchorStyles.Left) 189 | System.Windows.Forms.AnchorStyles.Right))); 190 this.regionView.Caption = "IntervalCollection View"; 191 this.regionView.Content = null; 192 this.regionView.Location = new System.Drawing.Point(86, 150); 193 this.regionView.Name = "regionView"; 194 this.regionView.ReadOnly = false; 195 this.regionView.Size = new System.Drawing.Size(495, 224); 196 this.regionView.TabIndex = 11; 197 this.regionView.TabStop = false; 198 // 199 // numberderivationInput 200 // 201 this.numberOfDerivationsComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 202 | System.Windows.Forms.AnchorStyles.Right))); 203 this.numberOfDerivationsComboBox.FormattingEnabled = true; 204 this.numberOfDerivationsComboBox.Location = new System.Drawing.Point(86, 45); 205 this.numberOfDerivationsComboBox.Name = "numberderivationInput"; 206 this.numberOfDerivationsComboBox.Size = new System.Drawing.Size(495, 21); 207 this.numberOfDerivationsComboBox.TabIndex = 3; 208 this.numberOfDerivationsComboBox.SelectedIndexChanged += new System.EventHandler(this.numberderivationInput_SelectedIndexChanged); 209 // 210 // errorProvider 211 // 212 this.errorProvider.ContainerControl = this; 213 this.errorProvider.RightToLeft = true; 214 // 215 // ShapeConstraintView 216 // 217 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 218 this.Controls.Add(this.groupBox); 219 this.Name = "ShapeConstraintView"; 220 this.Size = new System.Drawing.Size(587, 380); 221 this.groupBox.ResumeLayout(false); 222 this.groupBox.PerformLayout(); 223 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 224 this.ResumeLayout(false); 210 225 211 226 } … … 213 228 #endregion 214 229 215 private System.Windows.Forms.Label 216 private System.Windows.Forms.Label 217 private System.Windows.Forms.Label 218 private System.Windows.Forms.Label numberderivationLabel;219 private System.Windows.Forms.TextBox 220 private System.Windows.Forms.TextBox 221 private System.Windows.Forms.TextBox 222 private System.Windows.Forms.GroupBox groupBox1;230 private System.Windows.Forms.Label lowerboundLabel; 231 private System.Windows.Forms.Label upperboundLabel; 232 private System.Windows.Forms.Label variableLabel; 233 private System.Windows.Forms.Label numberOfDerivationLabel; 234 private System.Windows.Forms.TextBox upperboundInput; 235 private System.Windows.Forms.TextBox lowerboundInput; 236 private System.Windows.Forms.TextBox variableInput; 237 private System.Windows.Forms.GroupBox groupBox; 223 238 private System.Windows.Forms.ErrorProvider errorProvider; 224 private System.Windows.Forms.ComboBox numberderivationInput; 225 private System.Windows.Forms.Label label1; 239 private System.Windows.Forms.ComboBox numberOfDerivationsComboBox; 226 240 private IntervalCollectionView regionView; 227 private System.Windows.Forms.Label regionLab ;228 private System.Windows.Forms.TextBox weightInput;229 private System.Windows.Forms.Label WeightLab;230 241 private System.Windows.Forms.Label regionLabel; 242 private System.Windows.Forms.TextBox weightTextBox; 243 private System.Windows.Forms.Label weightLabel; 244 } 231 245 } -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/ShapeConstraintView.cs
r17895 r17896 2 2 3 3 /* HeuristicLab 4 * Copyright (C) 2002-2019Heuristic and Evolutionary Algorithms Laboratory (HEAL)4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 5 * 6 6 * This file is part of HeuristicLab. … … 29 29 30 30 namespace HeuristicLab.Problems.DataAnalysis.Views { 31 [View(" Interval Constraint DetailView")]31 [View("Shape Constraint View")] 32 32 [Content(typeof(ShapeConstraint), true)] 33 public sealed partial class IntervalConstraintView : ItemView {33 public sealed partial class ShapeConstraintView : ItemView { 34 34 public new ShapeConstraint Content { 35 35 get => (ShapeConstraint)base.Content; … … 37 37 } 38 38 39 public IntervalConstraintView() {39 public ShapeConstraintView() { 40 40 InitializeComponent(); 41 41 int[] items = { 1, 2, 3 }; 42 number derivationInput.DataSource = items;42 numberOfDerivationsComboBox.DataSource = items; 43 43 } 44 44 … … 62 62 base.SetEnabledStateOfControls(); 63 63 variableInput.Enabled = Content != null && !Locked && !ReadOnly; 64 number derivationInput.Enabled = Content != null && !Locked && !ReadOnly;64 numberOfDerivationsComboBox.Enabled = Content != null && !Locked && !ReadOnly; 65 65 lowerboundInput.Enabled = Content != null && !Locked && !ReadOnly; 66 66 upperboundInput.Enabled = Content != null && !Locked && !ReadOnly; 67 weight Input.Enabled = Content != null && !Locked && !ReadOnly;67 weightTextBox.Enabled = Content != null && !Locked && !ReadOnly; 68 68 } 69 69 … … 96 96 lowerboundInput.Text = string.Empty; 97 97 upperboundInput.Text = string.Empty; 98 weight Input.Text = string.Empty;98 weightTextBox.Text = string.Empty; 99 99 return; 100 100 } … … 102 102 lowerboundInput.Text = Content.Interval.LowerBound.ToString(); 103 103 upperboundInput.Text = Content.Interval.UpperBound.ToString(); 104 weight Input.Text = Content.Weight.ToString();104 weightTextBox.Text = Content.Weight.ToString(); 105 105 106 106 variableInput.Text = Content.Variable; 107 107 if (!Content.IsDerivative) { 108 number derivationInput.Enabled = false;109 number derivationInput.SelectedItem = null;110 number derivationInput.Text = "0";108 numberOfDerivationsComboBox.Enabled = false; 109 numberOfDerivationsComboBox.SelectedItem = null; 110 numberOfDerivationsComboBox.Text = "0"; 111 111 } else { 112 number derivationLabel.Visible = true;113 number derivationInput.Visible = true;114 number derivationInput.Enabled = true;115 number derivationInput.SelectedItem = Content.NumberOfDerivations;112 numberOfDerivationLabel.Visible = true; 113 numberOfDerivationsComboBox.Visible = true; 114 numberOfDerivationsComboBox.Enabled = true; 115 numberOfDerivationsComboBox.SelectedItem = Content.NumberOfDerivations; 116 116 } 117 117 … … 172 172 173 173 private void numberderivationInput_SelectedIndexChanged(object sender, EventArgs e) { 174 if (number derivationInput.SelectedItem == null) {174 if (numberOfDerivationsComboBox.SelectedItem == null) { 175 175 Content.NumberOfDerivations = 0; 176 number derivationInput.Enabled = false;177 return; 178 } 179 180 if ((int)number derivationInput.SelectedItem == 1)176 numberOfDerivationsComboBox.Enabled = false; 177 return; 178 } 179 180 if ((int)numberOfDerivationsComboBox.SelectedItem == 1) 181 181 Content.NumberOfDerivations = 1; 182 else if ((int)number derivationInput.SelectedItem == 2)182 else if ((int)numberOfDerivationsComboBox.SelectedItem == 2) 183 183 Content.NumberOfDerivations = 2; 184 else if ((int)number derivationInput.SelectedItem == 3)184 else if ((int)numberOfDerivationsComboBox.SelectedItem == 3) 185 185 Content.NumberOfDerivations = 3; 186 186 } 187 187 188 188 private void weightInput_TextChanged(object sender, EventArgs e) { 189 var value = ParseDoubleValue(weight Input.Text, weightInput, errorProvider);189 var value = ParseDoubleValue(weightTextBox.Text, weightTextBox, errorProvider); 190 190 if (!double.IsNaN(value)) Content.Weight = value; 191 191 } -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/ShapeConstraintsView.Designer.cs
r17894 r17896 2 2 3 3 /* HeuristicLab 4 * Copyright (C) 2002-2019Heuristic and Evolutionary Algorithms Laboratory (HEAL)4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 5 * 6 6 * This file is part of HeuristicLab. … … 52 52 private void InitializeComponent() { 53 53 this.components = new System.ComponentModel.Container(); 54 this.splitContainer 1= new System.Windows.Forms.SplitContainer();55 this.groupBox 1= new System.Windows.Forms.GroupBox();54 this.splitContainer = new System.Windows.Forms.SplitContainer(); 55 this.groupBox = new System.Windows.Forms.GroupBox(); 56 56 this.constraintsInput = new System.Windows.Forms.TextBox(); 57 57 this.parseBtn = new System.Windows.Forms.Button(); 58 this. label1= new System.Windows.Forms.Label();58 this.infoLabel = new System.Windows.Forms.Label(); 59 59 this.errorOutput = new System.Windows.Forms.Label(); 60 this. intervalConstraintsView = new HeuristicLab.Core.Views.CheckedItemListView<ShapeConstraint>();61 this.toolTip 1= new System.Windows.Forms.ToolTip(this.components);62 ((System.ComponentModel.ISupportInitialize)(this.splitContainer 1)).BeginInit();63 this.splitContainer 1.Panel1.SuspendLayout();64 this.splitContainer 1.Panel2.SuspendLayout();65 this.splitContainer 1.SuspendLayout();66 this.groupBox 1.SuspendLayout();60 this.shapeConstraintsView = new HeuristicLab.Core.Views.CheckedItemListView<ShapeConstraint>(); 61 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 62 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 63 this.splitContainer.Panel1.SuspendLayout(); 64 this.splitContainer.Panel2.SuspendLayout(); 65 this.splitContainer.SuspendLayout(); 66 this.groupBox.SuspendLayout(); 67 67 this.SuspendLayout(); 68 68 // 69 69 // splitContainer1 70 70 // 71 this.splitContainer 1.Dock = System.Windows.Forms.DockStyle.Fill;72 this.splitContainer 1.Location = new System.Drawing.Point(0, 0);73 this.splitContainer 1.Name = "splitContainer1";71 this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill; 72 this.splitContainer.Location = new System.Drawing.Point(0, 0); 73 this.splitContainer.Name = "splitContainer1"; 74 74 // 75 75 // splitContainer1.Panel1 76 76 // 77 this.splitContainer 1.Panel1.Controls.Add(this.groupBox1);77 this.splitContainer.Panel1.Controls.Add(this.groupBox); 78 78 // 79 79 // splitContainer1.Panel2 80 80 // 81 this.splitContainer 1.Panel2.Controls.Add(this.intervalConstraintsView);82 this.splitContainer 1.Size = new System.Drawing.Size(888, 629);83 this.splitContainer 1.SplitterDistance = 296;84 this.splitContainer 1.TabIndex = 0;81 this.splitContainer.Panel2.Controls.Add(this.shapeConstraintsView); 82 this.splitContainer.Size = new System.Drawing.Size(888, 629); 83 this.splitContainer.SplitterDistance = 296; 84 this.splitContainer.TabIndex = 0; 85 85 // 86 86 // groupBox1 87 87 // 88 this.groupBox 1.Controls.Add(this.constraintsInput);89 this.groupBox 1.Controls.Add(this.parseBtn);90 this.groupBox 1.Controls.Add(this.label1);91 this.groupBox 1.Controls.Add(this.errorOutput);92 this.groupBox 1.Dock = System.Windows.Forms.DockStyle.Fill;93 this.groupBox 1.Location = new System.Drawing.Point(0, 0);94 this.groupBox 1.Name = "groupBox1";95 this.groupBox 1.Size = new System.Drawing.Size(296, 629);96 this.groupBox 1.TabIndex = 3;97 this.groupBox 1.TabStop = false;98 this.groupBox 1.Text = "Constraints Input";88 this.groupBox.Controls.Add(this.constraintsInput); 89 this.groupBox.Controls.Add(this.parseBtn); 90 this.groupBox.Controls.Add(this.infoLabel); 91 this.groupBox.Controls.Add(this.errorOutput); 92 this.groupBox.Dock = System.Windows.Forms.DockStyle.Fill; 93 this.groupBox.Location = new System.Drawing.Point(0, 0); 94 this.groupBox.Name = "groupBox1"; 95 this.groupBox.Size = new System.Drawing.Size(296, 629); 96 this.groupBox.TabIndex = 3; 97 this.groupBox.TabStop = false; 98 this.groupBox.Text = "Constraints Input"; 99 99 // 100 100 // constraintsInput … … 123 123 // label1 124 124 // 125 this. label1.AutoSize = true;126 this. label1.Dock = System.Windows.Forms.DockStyle.Top;127 this. label1.Image = global::HeuristicLab.Problems.DataAnalysis.Views.Properties.Resources.VS2008ImageLibrary_Annotations_Information;128 this. label1.Location = new System.Drawing.Point(3, 16);129 this. label1.Name = "label1";130 this. label1.Size = new System.Drawing.Size(19, 13);131 this. label1.TabIndex = 4;132 this. label1.Text = " ";133 this.toolTip 1.SetToolTip(this.label1, "Double-click to open description.");134 this. label1.DoubleClick += new System.EventHandler(this.label1_DoubleClick);125 this.infoLabel.AutoSize = true; 126 this.infoLabel.Dock = System.Windows.Forms.DockStyle.Top; 127 this.infoLabel.Image = global::HeuristicLab.Problems.DataAnalysis.Views.Properties.Resources.VS2008ImageLibrary_Annotations_Information; 128 this.infoLabel.Location = new System.Drawing.Point(3, 16); 129 this.infoLabel.Name = "label1"; 130 this.infoLabel.Size = new System.Drawing.Size(19, 13); 131 this.infoLabel.TabIndex = 4; 132 this.infoLabel.Text = " "; 133 this.toolTip.SetToolTip(this.infoLabel, "Double-click to open description."); 134 this.infoLabel.DoubleClick += new System.EventHandler(this.helpButton_DoubleClick); 135 135 // 136 136 // errorOutput … … 148 148 // intervalConstraintsView 149 149 // 150 this. intervalConstraintsView.Dock = System.Windows.Forms.DockStyle.Fill;151 this. intervalConstraintsView.Location = new System.Drawing.Point(0, 0);152 this. intervalConstraintsView.Name = "intervalConstraintsView";153 this. intervalConstraintsView.Size = new System.Drawing.Size(588, 629);154 this. intervalConstraintsView.TabIndex = 2;155 this. intervalConstraintsView.TabStop = false;150 this.shapeConstraintsView.Dock = System.Windows.Forms.DockStyle.Fill; 151 this.shapeConstraintsView.Location = new System.Drawing.Point(0, 0); 152 this.shapeConstraintsView.Name = "intervalConstraintsView"; 153 this.shapeConstraintsView.Size = new System.Drawing.Size(588, 629); 154 this.shapeConstraintsView.TabIndex = 2; 155 this.shapeConstraintsView.TabStop = false; 156 156 // 157 157 // ShapeConstraintsView … … 159 159 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 160 160 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 161 this.Controls.Add(this.splitContainer 1);161 this.Controls.Add(this.splitContainer); 162 162 this.Name = "ShapeConstraintsView"; 163 163 this.Size = new System.Drawing.Size(888, 629); 164 this.splitContainer 1.Panel1.ResumeLayout(false);165 this.splitContainer 1.Panel2.ResumeLayout(false);166 ((System.ComponentModel.ISupportInitialize)(this.splitContainer 1)).EndInit();167 this.splitContainer 1.ResumeLayout(false);168 this.groupBox 1.ResumeLayout(false);169 this.groupBox 1.PerformLayout();164 this.splitContainer.Panel1.ResumeLayout(false); 165 this.splitContainer.Panel2.ResumeLayout(false); 166 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); 167 this.splitContainer.ResumeLayout(false); 168 this.groupBox.ResumeLayout(false); 169 this.groupBox.PerformLayout(); 170 170 this.ResumeLayout(false); 171 171 … … 173 173 #endregion 174 174 175 private System.Windows.Forms.SplitContainer splitContainer 1;176 private System.Windows.Forms.GroupBox groupBox 1;175 private System.Windows.Forms.SplitContainer splitContainer; 176 private System.Windows.Forms.GroupBox groupBox; 177 177 private System.Windows.Forms.Button parseBtn; 178 private HeuristicLab.Core.Views.CheckedItemListView<ShapeConstraint> intervalConstraintsView; 179 //private System.Windows.Forms.GroupBox intervalConstraintsView; 178 private HeuristicLab.Core.Views.CheckedItemListView<ShapeConstraint> shapeConstraintsView; 180 179 private System.Windows.Forms.TextBox constraintsInput; 181 180 private Label errorOutput; 182 private Label label1;183 protected ToolTip toolTip 1;181 private Label infoLabel; 182 protected ToolTip toolTip; 184 183 } 185 184 } -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/ShapeConstraintsView.cs
r17894 r17896 2 2 3 3 /* HeuristicLab 4 * Copyright (C) 2002-2019Heuristic and Evolutionary Algorithms Laboratory (HEAL)4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 5 * 6 6 * This file is part of HeuristicLab. … … 48 48 protected override void OnContentChanged() { 49 49 base.OnContentChanged(); 50 this. intervalConstraintsView.Content = Content;50 this.shapeConstraintsView.Content = Content; 51 51 UpdateControl(); 52 52 } … … 86 86 try { 87 87 var parsedConstraints = ShapeConstraintsParser.ParseConstraints(constraintsInput.Text); 88 Content = parsedConstraints;88 Content.AddRange(parsedConstraints); 89 89 errorOutput.Text = "Constraints successfully parsed."; 90 90 errorOutput.ForeColor = Color.DarkGreen; 91 //Catch the exception from the constraints parser and show it in the error dialog92 91 } catch (ArgumentException ex) { 93 Content.Clear();94 92 errorOutput.Text = ex.Message.Replace("Parameter name", "@Line"); 95 93 errorOutput.ForeColor = Color.DarkRed; 94 } finally { 95 suspendUpdates = false; 96 96 } 97 suspendUpdates = false;98 UpdateControl();99 97 } else { 100 98 errorOutput.Text = "No constraints were found!"; … … 107 105 constraintsInput.Text = string.Empty; 108 106 } else { 109 this.intervalConstraintsView.Content = Content; 110 constraintsInput.Text = ToString(Content); 107 var newText = ToString(Content); 108 if (newText != constraintsInput.Text) 109 constraintsInput.Text = newText; 111 110 } 112 111 } … … 168 167 } 169 168 170 private void label1_DoubleClick(object sender, EventArgs e) { 171 var infoText = 172 "Within the text field you can define different types of shape constraints e.g. range constraints, monotonicity constraints, ..." + 173 System.Environment.NewLine + 174 "To define a model constraint: f in [0 .. 100], f is used for the selected target, the 'in' key word specifies the target in which the constraint should be, the interval is defined between square bracket." + 175 System.Environment.NewLine + 176 "The interval contains two bounds (lower and upper) this bounds are given as double values, to seperate both bounds from each other you can use (.., ;, ' ')" + 177 System.Environment.NewLine + 178 "To define monotonic or concave constraints you need to define the partial derivatives:" + 179 System.Environment.NewLine + 180 "∂f/∂x in [0 .. 1], therefore you have to define the partial fraction first, which can be done by using the \\partial symbol or 'd' followed by the target and the variable in the numerator and denominator respectively, after defining the fraction the interval is defined like in the model constraint." + 181 System.Environment.NewLine + 182 "To define constraints only on a specific range of the function you can define interval ranges" + 183 System.Environment.NewLine + 184 "f in [0 .. 100], x in [0 .. 1] the ranges are separated by commas and follow the same rules as before (giving the variable with the interval definition)" + 185 System.Environment.NewLine + "To specify different weights on the constraints:" + 186 System.Environment.NewLine + "f in [0 .. 100], x in [0 .. 1] weight: 2.0, you can add the keyword 'weight:' followed by a double value."; 187 188 MessageBox.Show(infoText,"How to define shape constraints", MessageBoxButtons.OKCancel); 169 private void helpButton_DoubleClick(object sender, EventArgs e) { 170 using (InfoBox dialog = new InfoBox("Help for shape constraints", 171 "HeuristicLab.Problems.DataAnalysis.Views.Resources.shapeConstraintsHelp.rtf", 172 this)) { 173 dialog.ShowDialog(this); 174 } 189 175 } 190 176 } -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/Interval.cs
r17887 r17896 25 25 using HEAL.Attic; 26 26 using HeuristicLab.Common; 27 using HeuristicLab.Core;28 27 29 28 namespace HeuristicLab.Problems.DataAnalysis { … … 131 130 return false; 132 131 133 return (UpperBound .IsAlmost(other.UpperBound)|| (double.IsNaN(UpperBound) && double.IsNaN(other.UpperBound)))134 && (LowerBound .IsAlmost(other.LowerBound)|| (double.IsNaN(LowerBound) && double.IsNaN(other.LowerBound)));132 return (UpperBound==other.UpperBound || (double.IsNaN(UpperBound) && double.IsNaN(other.UpperBound))) 133 && (LowerBound==other.LowerBound || (double.IsNaN(LowerBound) && double.IsNaN(other.LowerBound))); 135 134 } 136 135 -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/IntervalCollection.cs
r17893 r17896 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-2019Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/ShapeConstraint.cs
r17891 r17896 2 2 3 3 /* HeuristicLab 4 * Copyright (C) 2002-2019Heuristic and Evolutionary Algorithms Laboratory (HEAL)4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 5 * 6 6 * This file is part of HeuristicLab. … … 30 30 [Item("ShapeConstraint", "Constraint on the shape of a function e.g. monotonicity.")] 31 31 public sealed class ShapeConstraint : Item { 32 // [Storable]33 // private string expression;34 //35 // public string Expression {36 // get => expression;37 // private set {38 // if (expression == value)39 // return;40 // expression = value;41 // OnChanged();42 // OnToStringChanged();43 // }44 // }45 46 // public string Definition => GetDefinitionString();47 48 32 [Storable] 49 33 private string variable; … … 55 39 return; 56 40 variable = value; 41 OnToStringChanged(); 57 42 OnChanged(); 58 43 } 59 44 } 60 61 // [Storable]62 // private string target;63 //64 // public string Target {65 // get => target;66 // private set {67 // if (target == value)68 // return;69 // target = value;70 // OnChanged();71 // }72 // }73 45 74 46 public bool IsDerivative => NumberOfDerivations > 0; … … 85 57 return; 86 58 numberOfDerivations = value; 59 OnToStringChanged(); 87 60 OnChanged(); 88 61 } … … 98 71 return; 99 72 interval = value; 73 OnToStringChanged(); 100 74 OnChanged(); 101 75 } 102 76 } 103 104 // [Storable]105 // private bool enabled;106 //107 // public bool Enabled {108 // get => enabled;109 // set {110 // if (enabled == value)111 // return;112 // enabled = value;113 // OnChanged();114 // }115 // }116 77 117 78 [Storable] … … 121 82 set { 122 83 if (regions != value) { 84 if (regions != null) regions.Changed -= regions_Changed; 123 85 regions = value; 86 if (regions != null) regions.Changed += regions_Changed; 87 OnToStringChanged(); 124 88 OnChanged(); 125 89 } 126 90 } 127 91 } 92 128 93 129 94 [Storable] … … 134 99 if (weight != value) { 135 100 weight = value; 101 OnToStringChanged(); 136 102 OnChanged(); 137 103 } … … 141 107 [StorableConstructor] 142 108 private ShapeConstraint(StorableConstructorFlag _) : base(_) { } 109 110 [StorableHook(HookType.AfterDeserialization)] 111 private void AfterDeserialization() { 112 if (regions != null) regions.Changed += regions_Changed; 113 } 143 114 144 115 // without derivation … … 158 129 public ShapeConstraint(string variable, int numberOfDerivations, 159 130 Interval interval, IntervalCollection regions, double weight) { 160 this.regions = regions; 161 this.weight = weight; 162 this.variable = variable; 163 this.numberOfDerivations = numberOfDerivations; 164 this.interval = interval; 165 //this.enabled = enabled; 131 Variable = variable; 132 NumberOfDerivations = numberOfDerivations; 133 Interval = interval; 134 Regions = regions; 135 Weight = weight; 166 136 } 167 137 … … 172 142 private ShapeConstraint(ShapeConstraint original, Cloner cloner) 173 143 : base(original, cloner) { 174 Regions = original.Regions;175 144 Variable = original.Variable; 176 145 NumberOfDerivations = original.NumberOfDerivations; 177 146 Interval = original.Interval; 178 //Enabled = original.Enabled; 147 Regions = cloner.Clone(original.Regions); 148 Weight = original.weight; 179 149 } 180 150 … … 188 158 189 159 190 // private string GetDefinitionString() { 191 // if (!IsDerivative) return "Target " + Variable; 192 // 193 // var definition = 194 // $"∂{GetDerivationString(numberOfDerivations)}Target/∂{Variable}{GetDerivationString(numberOfDerivations)}"; 195 // return definition; 196 // } 160 private void regions_Changed(object sender, EventArgs e) { 161 OnToStringChanged(); 162 OnChanged(); 163 } 197 164 198 165 public override string ToString() { … … 231 198 expression += $", {region.Key} in [{region.Value.LowerBound} .. {region.Value.UpperBound}]"; 232 199 } 233 if (Weight != 1.0) {200 if (Weight != 1.0) { 234 201 expression += $" weight: {weight}"; 235 202 } -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/ShapeConstraintsParser.cs
r17891 r17896 2 2 3 3 /* HeuristicLab 4 * Copyright (C) 2002-2019Heuristic and Evolutionary Algorithms Laboratory (HEAL)4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 5 * 6 6 * This file is part of HeuristicLab. -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ShapeConstraints.cs
r17891 r17896 2 2 3 3 /* HeuristicLab 4 * Copyright (C) 2002-2019Heuristic and Evolutionary Algorithms Laboratory (HEAL)4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 5 * 6 6 * This file is part of HeuristicLab. … … 33 33 [Item("ShapeConstraints", "Represents shape constraints associated with a regression problem data e.g. monotonicity constraints.")] 34 34 public class ShapeConstraints : CheckedItemList<ShapeConstraint> { 35 // private static readonly string exampleInput = "# Example for a target variable constraint:" + Environment.NewLine +36 // "f in [0 .. 100]" + Environment.NewLine + Environment.NewLine +37 // "# Example for constraints on model parameters: " + Environment.NewLine +38 // "df/d'x' in [0 .. 10]" + Environment.NewLine +39 // "∂²f/∂'x'² in [-1 .. inf.]";40 //41 // [Storable]42 // private string input;43 44 // public string Input {45 // get => input;46 // set {47 // if (input == value) return;48 // input = value;49 // OnChanged();50 // }51 // }52 53 // [Storable]54 // private string infoText;55 56 // public string InfoText {57 // get => infoText;58 // set {59 // if (infoText == value) return;60 // infoText = value;61 // OnChanged();62 // }63 // }64 //65 // [Storable]66 // private Color infoColor;67 //68 // public Color InfoColor {69 // get => infoColor;70 // set {71 // if (infoColor == value) return;72 // infoColor = value;73 // OnChanged();74 // }75 // }76 77 // [Storable]78 // private IEnumerable<IntervalConstraint> constraints;79 80 // public IEnumerable<IntervalConstraint> Constraints {81 // get => constraints;82 // set {83 // if (constraints == value) return;84 // constraints = value.ToList();85 // OnChanged();86 // }87 // }88 89 35 public IEnumerable<ShapeConstraint> EnabledConstraints => base.CheckedItems.Select(checkedItem => checkedItem.Value); 90 36 … … 115 61 } 116 62 117 // [Storable]118 // public IRegressionProblemData ProblemData { get; private set; }119 120 63 [StorableConstructor] 121 64 protected ShapeConstraints(StorableConstructorFlag _) : base(_) { } … … 123 66 protected ShapeConstraints(ShapeConstraints original, Cloner cloner) 124 67 : base(original, cloner) { 125 // Input = original.Input;126 // InfoText = original.InfoText;127 // infoColor = original.InfoColor;128 // constraints = original.Constraints.Select(cloner.Clone).ToList();129 // ProblemData = cloner.Clone(original.ProblemData);130 68 } 131 69 … … 134 72 } 135 73 136 public ShapeConstraints() { 137 // Input = exampleInput; 138 // InfoText = ""; 139 // InfoColor = Color.DarkOrange; 140 // constraints = new List<IntervalConstraint>(); 141 // ProblemData = null; 74 public ShapeConstraints() : base() { 142 75 } 143 144 // public ShapeConstraints(IRegressionProblemData problemData) {145 // Input = exampleInput;146 // InfoText = infoText;147 // InfoColor = InfoColor;148 // constraints = new List<IntervalConstraint>();149 // ProblemData = problemData;150 // }151 76 152 77 public event EventHandler Changed; -
branches/3073_IA_constraint_splitting_reintegration/Tests/ShapeConstraintsParserTest.cs
r17893 r17896 1 using Microsoft.VisualStudio.TestTools.UnitTesting; 2 using System; 1 #region License Information 2 3 /* HeuristicLab 4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 * 6 * This file is part of HeuristicLab. 7 * 8 * HeuristicLab is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * HeuristicLab is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #endregion 23 24 using Microsoft.VisualStudio.TestTools.UnitTesting; 3 25 using HeuristicLab.Problems.DataAnalysis; 4 26 using System.Globalization;
Note: See TracChangeset
for help on using the changeset viewer.