Changeset 17893
- Timestamp:
- 03/16/21 08:55:43 (4 years ago)
- Location:
- branches/3073_IA_constraint_splitting_reintegration
- Files:
-
- 5 added
- 7 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
r17891 r17893 336 336 <DependentUpon>ProblemDataView.cs</DependentUpon> 337 337 </Compile> 338 <Compile Include="Properties\Resources.Designer.cs"> 339 <AutoGen>True</AutoGen> 340 <DesignTime>True</DesignTime> 341 <DependentUpon>Resources.resx</DependentUpon> 342 </Compile> 338 343 <Compile Include="Regression\ConfidenceRegressionSolutionEstimatedValuesView.cs"> 339 344 <SubType>UserControl</SubType> … … 598 603 <DependentUpon>AbstractFeatureCorrelationView.cs</DependentUpon> 599 604 </EmbeddedResource> 605 <EmbeddedResource Include="IntervalConstraintView.resx"> 606 <DependentUpon>IntervalConstraintView.cs</DependentUpon> 607 </EmbeddedResource> 608 <EmbeddedResource Include="Properties\Resources.resx"> 609 <Generator>ResXFileCodeGenerator</Generator> 610 <LastGenOutput>Resources.Designer.cs</LastGenOutput> 611 </EmbeddedResource> 612 <EmbeddedResource Include="ShapeConstraintsView.resx"> 613 <DependentUpon>ShapeConstraintsView.cs</DependentUpon> 614 </EmbeddedResource> 615 </ItemGroup> 616 <ItemGroup> 617 <None Include="Resources\VS2008ImageLibrary_Annotations_Information.png" /> 600 618 </ItemGroup> 601 619 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/IntervalConstraintView.Designer.cs
r17891 r17893 24 24 /// </summary> 25 25 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.enabledLabel = new System.Windows.Forms.Label(); 36 this.label1 = new System.Windows.Forms.Label(); 37 this.numberderivationInput = new System.Windows.Forms.ComboBox(); 38 this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); 39 this.groupBox1.SuspendLayout(); 40 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 41 this.SuspendLayout(); 42 // 43 // lowerboundLabel 44 // 45 this.lowerboundLabel.AutoSize = true; 46 this.lowerboundLabel.Location = new System.Drawing.Point(8, 101); 47 this.lowerboundLabel.Name = "lowerboundLabel"; 48 this.lowerboundLabel.Size = new System.Drawing.Size(90, 17); 49 this.lowerboundLabel.TabIndex = 2; 50 this.lowerboundLabel.Text = "Lowerbound:"; 51 // 52 // upperboundLabel 53 // 54 this.upperboundLabel.AutoSize = true; 55 this.upperboundLabel.Location = new System.Drawing.Point(8, 126); 56 this.upperboundLabel.Name = "upperboundLabel"; 57 this.upperboundLabel.Size = new System.Drawing.Size(91, 17); 58 this.upperboundLabel.TabIndex = 3; 59 this.upperboundLabel.Text = "Upperbound:"; 60 // 61 // variableLabel 62 // 63 this.variableLabel.AutoSize = true; 64 this.variableLabel.Location = new System.Drawing.Point(8, 47); 65 this.variableLabel.Name = "variableLabel"; 66 this.variableLabel.Size = new System.Drawing.Size(64, 17); 67 this.variableLabel.TabIndex = 7; 68 this.variableLabel.Text = "Variable:"; 69 // 70 // numberderivationLabel 71 // 72 this.numberderivationLabel.AutoSize = true; 73 this.numberderivationLabel.Location = new System.Drawing.Point(8, 74); 74 this.numberderivationLabel.Name = "numberderivationLabel"; 75 this.numberderivationLabel.Size = new System.Drawing.Size(84, 17); 76 this.numberderivationLabel.TabIndex = 8; 77 this.numberderivationLabel.Text = "#Derivation:"; 78 // 79 // upperboundInput 80 // 81 this.upperboundInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 82 | System.Windows.Forms.AnchorStyles.Right))); 83 this.upperboundInput.Location = new System.Drawing.Point(108, 123); 84 this.upperboundInput.Name = "upperboundInput"; 85 this.upperboundInput.Size = new System.Drawing.Size(473, 22); 86 this.upperboundInput.TabIndex = 11; 87 this.upperboundInput.Validating += new System.ComponentModel.CancelEventHandler(this.upperboundInput_Validating); 88 this.upperboundInput.Validated += new System.EventHandler(this.upperboundInput_Validated); 89 // 90 // lowerboundInput 91 // 92 this.lowerboundInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 93 | System.Windows.Forms.AnchorStyles.Right))); 94 this.lowerboundInput.Location = new System.Drawing.Point(108, 98); 95 this.lowerboundInput.Name = "lowerboundInput"; 96 this.lowerboundInput.Size = new System.Drawing.Size(473, 22); 97 this.lowerboundInput.TabIndex = 12; 98 this.lowerboundInput.Validating += new System.ComponentModel.CancelEventHandler(this.lowerboundInput_Validating); 99 this.lowerboundInput.Validated += new System.EventHandler(this.lowerboundInput_Validated); 100 // 101 // variableInput 102 // 103 this.variableInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 104 | System.Windows.Forms.AnchorStyles.Right))); 105 this.variableInput.Location = new System.Drawing.Point(108, 44); 106 this.variableInput.Name = "variableInput"; 107 this.variableInput.Size = new System.Drawing.Size(473, 22); 108 this.variableInput.TabIndex = 15; 109 // 110 // groupBox1 111 // 112 this.groupBox1.Controls.Add(this.enabledLabel); 113 this.groupBox1.Controls.Add(this.label1); 114 this.groupBox1.Controls.Add(this.numberderivationInput); 115 this.groupBox1.Controls.Add(this.variableInput); 116 this.groupBox1.Controls.Add(this.lowerboundInput); 117 this.groupBox1.Controls.Add(this.upperboundInput); 118 this.groupBox1.Controls.Add(this.numberderivationLabel); 119 this.groupBox1.Controls.Add(this.variableLabel); 120 this.groupBox1.Controls.Add(this.upperboundLabel); 121 this.groupBox1.Controls.Add(this.lowerboundLabel); 122 this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; 123 this.groupBox1.Location = new System.Drawing.Point(0, 0); 124 this.groupBox1.Name = "groupBox1"; 125 this.groupBox1.Size = new System.Drawing.Size(587, 380); 126 this.groupBox1.TabIndex = 0; 127 this.groupBox1.TabStop = false; 128 this.groupBox1.Text = "Interval Constraints Detail"; 129 // 130 // enabledLabel 131 // 132 this.enabledLabel.AutoSize = true; 133 this.enabledLabel.Location = new System.Drawing.Point(8, 153); 134 this.enabledLabel.Name = "enabledLabel"; 135 this.enabledLabel.Size = new System.Drawing.Size(64, 17); 136 this.enabledLabel.TabIndex = 29; 137 this.enabledLabel.Text = "Enabled:"; 138 // 139 // label1 140 // 141 this.label1.AutoSize = true; 142 this.label1.Location = new System.Drawing.Point(11, -105); 143 this.label1.Name = "label1"; 144 this.label1.Size = new System.Drawing.Size(64, 17); 145 this.label1.TabIndex = 28; 146 this.label1.Text = "Enabled:"; 147 // 148 // numberderivationInput 149 // 150 this.numberderivationInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 151 | System.Windows.Forms.AnchorStyles.Right))); 152 this.numberderivationInput.FormattingEnabled = true; 153 this.numberderivationInput.Location = new System.Drawing.Point(108, 71); 154 this.numberderivationInput.Name = "numberderivationInput"; 155 this.numberderivationInput.Size = new System.Drawing.Size(473, 24); 156 this.numberderivationInput.TabIndex = 27; 157 this.numberderivationInput.SelectedIndexChanged += new System.EventHandler(this.numberderivationInput_SelectedIndexChanged); 158 159 // 160 // errorProvider 161 // 162 this.errorProvider.ContainerControl = this; 163 this.errorProvider.RightToLeft = true; 164 // 165 // IntervalConstraintView 166 // 167 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 168 this.Controls.Add(this.groupBox1); 169 this.Name = "IntervalConstraintView"; 170 this.Size = new System.Drawing.Size(587, 380); 171 this.groupBox1.ResumeLayout(false); 172 this.groupBox1.PerformLayout(); 173 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 174 this.ResumeLayout(false); 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); 210 175 211 } 176 212 … … 188 224 private System.Windows.Forms.ComboBox numberderivationInput; 189 225 private System.Windows.Forms.Label label1; 190 private System.Windows.Forms.Label enabledLabel; 226 private IntervalCollectionView regionView; 227 private System.Windows.Forms.Label regionLab; 228 private System.Windows.Forms.TextBox weightInput; 229 private System.Windows.Forms.Label WeightLab; 191 230 } 192 231 } -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/IntervalConstraintView.cs
r17891 r17893 45 45 protected override void OnContentChanged() { 46 46 base.OnContentChanged(); 47 this.regionView.Content = Content.Regions; 47 48 UpdateControls(); 48 49 } … … 64 65 lowerboundInput.Enabled = Content != null && !Locked && !ReadOnly; 65 66 upperboundInput.Enabled = Content != null && !Locked && !ReadOnly; 67 weightInput.Enabled = Content != null && !Locked && !ReadOnly; 66 68 } 67 69 … … 94 96 lowerboundInput.Text = string.Empty; 95 97 upperboundInput.Text = string.Empty; 98 weightInput.Text = string.Empty; 96 99 return; 97 100 } … … 99 102 lowerboundInput.Text = Content.Interval.LowerBound.ToString(); 100 103 upperboundInput.Text = Content.Interval.UpperBound.ToString(); 104 weightInput.Text = Content.Weight.ToString(); 101 105 102 106 variableInput.Text = Content.Variable; … … 111 115 numberderivationInput.SelectedItem = Content.NumberOfDerivations; 112 116 } 117 118 regionView.Content = Content.Regions; 113 119 } 114 120 … … 180 186 } 181 187 188 private void weightInput_TextChanged(object sender, EventArgs e) { 189 var value = ParseDoubleValue(weightInput.Text, weightInput, errorProvider); 190 if (!double.IsNaN(value)) Content.Weight = value; 191 } 192 193 182 194 #endregion 183 195 … … 188 200 } 189 201 190 202 #endregion 191 203 } 192 204 } -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/ShapeConstraintsView.Designer.cs
r17891 r17893 51 51 /// </summary> 52 52 private void InitializeComponent() { 53 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShapeConstraintsView)); 54 this.splitContainer1 = new System.Windows.Forms.SplitContainer(); 55 this.groupBox1 = new System.Windows.Forms.GroupBox(); 56 this.constraintsInput = new System.Windows.Forms.TextBox(); 57 this.parseBtn = new System.Windows.Forms.Button(); 58 this.errorOutput = new System.Windows.Forms.Label(); 59 this.label1 = new System.Windows.Forms.Label(); 60 this.intervalConstraintsView = new CheckedItemListView<ShapeConstraint>(); 61 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); 62 this.splitContainer1.Panel1.SuspendLayout(); 63 this.splitContainer1.Panel2.SuspendLayout(); 64 this.splitContainer1.SuspendLayout(); 65 this.groupBox1.SuspendLayout(); 66 this.SuspendLayout(); 67 // 68 // splitContainer1 69 // 70 this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; 71 this.splitContainer1.Location = new System.Drawing.Point(0, 0); 72 this.splitContainer1.Name = "splitContainer1"; 73 // 74 // splitContainer1.Panel1 75 // 76 this.splitContainer1.Panel1.Controls.Add(this.groupBox1); 77 // 78 // splitContainer1.Panel2 79 // 80 this.splitContainer1.Panel2.Controls.Add(this.intervalConstraintsView); 81 this.splitContainer1.Size = new System.Drawing.Size(888, 629); 82 this.splitContainer1.SplitterDistance = 296; 83 this.splitContainer1.TabIndex = 0; 84 // 85 // groupBox1 86 // 87 this.groupBox1.Controls.Add(this.constraintsInput); 88 this.groupBox1.Controls.Add(this.parseBtn); 89 this.groupBox1.Controls.Add(this.errorOutput); 90 this.groupBox1.Controls.Add(this.label1); 91 this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; 92 this.groupBox1.Location = new System.Drawing.Point(0, 0); 93 this.groupBox1.Name = "groupBox1"; 94 this.groupBox1.Size = new System.Drawing.Size(296, 629); 95 this.groupBox1.TabIndex = 3; 96 this.groupBox1.TabStop = false; 97 this.groupBox1.Text = "Constraints Input"; 98 // 99 // constraintsInput 100 // 101 this.constraintsInput.AcceptsTab = true; 102 this.constraintsInput.Dock = System.Windows.Forms.DockStyle.Fill; 103 this.constraintsInput.Location = new System.Drawing.Point(3, 185); 104 this.constraintsInput.Multiline = true; 105 this.constraintsInput.Name = "constraintsInput"; 106 this.constraintsInput.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 107 this.constraintsInput.Size = new System.Drawing.Size(290, 405); 108 this.constraintsInput.TabIndex = 2; 109 this.constraintsInput.TextChanged += new System.EventHandler(this.constraintsInput_TextChanged); 110 // 111 // parseBtn 112 // 113 this.parseBtn.Dock = System.Windows.Forms.DockStyle.Bottom; 114 this.parseBtn.Location = new System.Drawing.Point(3, 590); 115 this.parseBtn.Name = "parseBtn"; 116 this.parseBtn.Size = new System.Drawing.Size(290, 23); 117 this.parseBtn.TabIndex = 1; 118 this.parseBtn.Text = "Parse Constraints"; 119 this.parseBtn.UseVisualStyleBackColor = true; 120 this.parseBtn.Click += new System.EventHandler(this.parseBtn_Click); 121 // 122 // errorOutput 123 // 124 this.errorOutput.MaximumSize = new Size(350, 0); 125 this.errorOutput.AutoSize = true; 126 this.errorOutput.ForeColor = Color.DarkRed; 127 this.errorOutput.Dock = System.Windows.Forms.DockStyle.Bottom; 128 this.errorOutput.Location = new System.Drawing.Point(3, 613); 129 this.errorOutput.Name = "errorOutput"; 130 this.errorOutput.Size = new System.Drawing.Size(35, 13); 131 this.errorOutput.TabIndex = 3; 132 this.errorOutput.Text = "label2"; 133 // 134 // label1 135 // 136 this.label1.AutoSize = true; 137 this.label1.Dock = System.Windows.Forms.DockStyle.Top; 138 this.label1.Location = new System.Drawing.Point(3, 16); 139 this.label1.Name = "label1"; 140 this.label1.Size = new System.Drawing.Size(354, 169); 141 this.label1.TabIndex = 0; 142 this.label1.Text = "To define target variable constraints:" + Environment.NewLine + 143 "1. Start the definition with target:" + Environment.NewLine + 144 "2. Specify the target variable between '-characters" + Environment.NewLine + 145 "3. Add the keyword in" + Environment.NewLine + 146 "4. Specify the interval with [lowerbound .. upperbound]" + Environment.NewLine + 147 "To define a derivation constraint: " + Environment.NewLine + 148 "1. Start with d or \u2202" + Environment.NewLine + 149 "2. Specify the target between '-characters" + Environment.NewLine + 150 "3. Separate target and derivation variable with /" + Environment.NewLine + 151 "4. Add derivation variable between '-characters'" + Environment.NewLine + 152 "5. Follow the steps 3-4 from above"; 153 // 154 // intervalConstraintsView 155 // 156 this.intervalConstraintsView.Dock = System.Windows.Forms.DockStyle.Fill; 157 this.intervalConstraintsView.Location = new System.Drawing.Point(0, 0); 158 this.intervalConstraintsView.Name = "intervalConstraintsView"; 159 this.intervalConstraintsView.Size = new System.Drawing.Size(588, 20); 160 this.intervalConstraintsView.TabIndex = 2; 161 // 162 // ProblemDataConstraintView 163 // 164 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 165 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 166 this.Controls.Add(this.splitContainer1); 167 this.Name = "ProblemDataConstraintView"; 168 this.Size = new System.Drawing.Size(888, 629); 169 this.splitContainer1.Panel1.ResumeLayout(false); 170 this.splitContainer1.Panel2.ResumeLayout(false); 171 this.splitContainer1.Panel2.PerformLayout(); 172 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); 173 this.splitContainer1.ResumeLayout(false); 174 this.groupBox1.ResumeLayout(false); 175 this.groupBox1.PerformLayout(); 176 this.ResumeLayout(false); 53 this.components = new System.ComponentModel.Container(); 54 this.splitContainer1 = new System.Windows.Forms.SplitContainer(); 55 this.groupBox1 = new System.Windows.Forms.GroupBox(); 56 this.constraintsInput = new System.Windows.Forms.TextBox(); 57 this.parseBtn = new System.Windows.Forms.Button(); 58 this.label1 = new System.Windows.Forms.Label(); 59 this.errorOutput = new System.Windows.Forms.Label(); 60 this.intervalConstraintsView = new HeuristicLab.Core.Views.CheckedItemListView<ShapeConstraint>(); 61 this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); 62 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); 63 this.splitContainer1.Panel1.SuspendLayout(); 64 this.splitContainer1.Panel2.SuspendLayout(); 65 this.splitContainer1.SuspendLayout(); 66 this.groupBox1.SuspendLayout(); 67 this.SuspendLayout(); 68 // 69 // splitContainer1 70 // 71 this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; 72 this.splitContainer1.Location = new System.Drawing.Point(0, 0); 73 this.splitContainer1.Name = "splitContainer1"; 74 // 75 // splitContainer1.Panel1 76 // 77 this.splitContainer1.Panel1.Controls.Add(this.groupBox1); 78 // 79 // splitContainer1.Panel2 80 // 81 this.splitContainer1.Panel2.Controls.Add(this.intervalConstraintsView); 82 this.splitContainer1.Size = new System.Drawing.Size(888, 629); 83 this.splitContainer1.SplitterDistance = 296; 84 this.splitContainer1.TabIndex = 0; 85 // 86 // groupBox1 87 // 88 this.groupBox1.Controls.Add(this.constraintsInput); 89 this.groupBox1.Controls.Add(this.parseBtn); 90 this.groupBox1.Controls.Add(this.label1); 91 this.groupBox1.Controls.Add(this.errorOutput); 92 this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; 93 this.groupBox1.Location = new System.Drawing.Point(0, 0); 94 this.groupBox1.Name = "groupBox1"; 95 this.groupBox1.Size = new System.Drawing.Size(296, 629); 96 this.groupBox1.TabIndex = 3; 97 this.groupBox1.TabStop = false; 98 this.groupBox1.Text = "Constraints Input"; 99 // 100 // constraintsInput 101 // 102 this.constraintsInput.AcceptsTab = true; 103 this.constraintsInput.Dock = System.Windows.Forms.DockStyle.Fill; 104 this.constraintsInput.Location = new System.Drawing.Point(3, 29); 105 this.constraintsInput.Multiline = true; 106 this.constraintsInput.Name = "constraintsInput"; 107 this.constraintsInput.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 108 this.constraintsInput.Size = new System.Drawing.Size(290, 561); 109 this.constraintsInput.TabIndex = 2; 110 this.constraintsInput.TextChanged += new System.EventHandler(this.constraintsInput_TextChanged); 111 // 112 // parseBtn 113 // 114 this.parseBtn.Dock = System.Windows.Forms.DockStyle.Bottom; 115 this.parseBtn.Location = new System.Drawing.Point(3, 590); 116 this.parseBtn.Name = "parseBtn"; 117 this.parseBtn.Size = new System.Drawing.Size(290, 23); 118 this.parseBtn.TabIndex = 1; 119 this.parseBtn.Text = "Parse Constraints"; 120 this.parseBtn.UseVisualStyleBackColor = true; 121 this.parseBtn.Click += new System.EventHandler(this.parseBtn_Click); 122 // 123 // label1 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.toolTip1.SetToolTip(this.label1, "Double-click to open description."); 134 this.label1.DoubleClick += new System.EventHandler(this.label1_DoubleClick); 135 // 136 // errorOutput 137 // 138 this.errorOutput.AutoSize = true; 139 this.errorOutput.Dock = System.Windows.Forms.DockStyle.Bottom; 140 this.errorOutput.ForeColor = System.Drawing.Color.DarkRed; 141 this.errorOutput.Location = new System.Drawing.Point(3, 613); 142 this.errorOutput.MaximumSize = new System.Drawing.Size(350, 0); 143 this.errorOutput.Name = "errorOutput"; 144 this.errorOutput.Size = new System.Drawing.Size(35, 13); 145 this.errorOutput.TabIndex = 3; 146 this.errorOutput.Text = "label2"; 147 // 148 // intervalConstraintsView 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; 156 // 157 // ShapeConstraintsView 158 // 159 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 160 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 161 this.Controls.Add(this.splitContainer1); 162 this.Name = "ShapeConstraintsView"; 163 this.Size = new System.Drawing.Size(888, 629); 164 this.splitContainer1.Panel1.ResumeLayout(false); 165 this.splitContainer1.Panel2.ResumeLayout(false); 166 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); 167 this.splitContainer1.ResumeLayout(false); 168 this.groupBox1.ResumeLayout(false); 169 this.groupBox1.PerformLayout(); 170 this.ResumeLayout(false); 177 171 178 172 } … … 182 176 private System.Windows.Forms.GroupBox groupBox1; 183 177 private System.Windows.Forms.Button parseBtn; 184 private System.Windows.Forms.Label label1;185 178 private HeuristicLab.Core.Views.CheckedItemListView<ShapeConstraint> intervalConstraintsView; 179 //private System.Windows.Forms.GroupBox intervalConstraintsView; 186 180 private System.Windows.Forms.TextBox constraintsInput; 187 181 private Label errorOutput; 188 } 182 private Label label1; 183 protected ToolTip toolTip1; 184 } 189 185 } -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/ShapeConstraintsView.cs
r17891 r17893 25 25 using System.Drawing; 26 26 using System.Text; 27 using System.Windows.Forms; 27 28 using HeuristicLab.Collections; 28 29 using HeuristicLab.MainForm; … … 106 107 constraintsInput.Text = string.Empty; 107 108 } else { 109 this.intervalConstraintsView.Content = Content; 108 110 constraintsInput.Text = ToString(Content); 109 111 } … … 165 167 UpdateControl(); 166 168 } 169 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); 189 } 167 190 } 168 191 } -
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/IntervalCollection.cs
r17887 r17893 122 122 public event EventHandler Changed; 123 123 private void RaiseChanged() { 124 OnChanged();125 124 var handler = Changed; 126 125 if (handler != null) … … 128 127 } 129 128 130 protected virtual void OnChanged() { }131 129 } 132 130 } -
branches/3073_IA_constraint_splitting_reintegration/Tests/ShapeConstraintsParserTest.cs
r17887 r17893 84 84 var variables = new string[] { "x", "var x" }; 85 85 { 86 var constraint = ShapeConstraintsParser.ParseDerivationConstraint("df/dx in [1 .. 2]" , variables);86 var constraint = ShapeConstraintsParser.ParseDerivationConstraint("df/dx in [1 .. 2]"); 87 87 Assert.AreEqual("x", constraint.Variable); 88 88 Assert.AreEqual(1, constraint.NumberOfDerivations); … … 94 94 } 95 95 { 96 var constraint = ShapeConstraintsParser.ParseDerivationConstraint("d²f/dx² in [1 .. 2]" , variables);96 var constraint = ShapeConstraintsParser.ParseDerivationConstraint("d²f/dx² in [1 .. 2]"); 97 97 Assert.AreEqual("x", constraint.Variable); 98 98 Assert.AreEqual(2, constraint.NumberOfDerivations); … … 104 104 } 105 105 { 106 var constraint = ShapeConstraintsParser.ParseDerivationConstraint("d² f / d x² in [1 .. 2]" , variables);106 var constraint = ShapeConstraintsParser.ParseDerivationConstraint("d² f / d x² in [1 .. 2]"); 107 107 Assert.AreEqual("x", constraint.Variable); 108 108 Assert.AreEqual(2, constraint.NumberOfDerivations); … … 114 114 } 115 115 { 116 var constraint = ShapeConstraintsParser.ParseDerivationConstraint("d³ f / d 'var x'³ in [1 .. 2]" , variables);116 var constraint = ShapeConstraintsParser.ParseDerivationConstraint("d³ f / d 'var x'³ in [1 .. 2]"); 117 117 Assert.AreEqual("var x", constraint.Variable); 118 118 Assert.AreEqual(3, constraint.NumberOfDerivations);
Note: See TracChangeset
for help on using the changeset viewer.