Changeset 5654 for branches/HeuristicLab.MetaOptimization
- Timestamp:
- 03/10/11 11:20:28 (14 years ago)
- Location:
- branches/HeuristicLab.MetaOptimization
- Files:
-
- 2 added
- 2 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/CreateExperimentDialog.Designer.cs
r5313 r5654 53 53 this.repetitionsNumericUpDown = new System.Windows.Forms.NumericUpDown(); 54 54 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 55 this.label1 = new System.Windows.Forms.Label(); 56 this.engineComboBox = new System.Windows.Forms.ComboBox(); 55 57 ((System.ComponentModel.ISupportInitialize)(this.repetitionsNumericUpDown)).BeginInit(); 56 58 this.SuspendLayout(); … … 60 62 this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 61 63 this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; 62 this.okButton.Location = new System.Drawing.Point(113, 58);64 this.okButton.Location = new System.Drawing.Point(113, 83); 63 65 this.okButton.Name = "okButton"; 64 66 this.okButton.Size = new System.Drawing.Size(75, 23); … … 72 74 this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 73 75 this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; 74 this.cancelButton.Location = new System.Drawing.Point(194, 58);76 this.cancelButton.Location = new System.Drawing.Point(194, 83); 75 77 this.cancelButton.Name = "cancelButton"; 76 78 this.cancelButton.Size = new System.Drawing.Size(75, 23); … … 137 139 this.repetitionsNumericUpDown.Validated += new System.EventHandler(this.repetitionsNumericUpDown_Validated); 138 140 // 141 // label1 142 // 143 this.label1.AutoSize = true; 144 this.label1.Location = new System.Drawing.Point(12, 57); 145 this.label1.Name = "label1"; 146 this.label1.Size = new System.Drawing.Size(43, 13); 147 this.label1.TabIndex = 6; 148 this.label1.Text = "&Engine:"; 149 // 150 // engineComboBox 151 // 152 this.engineComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 153 | System.Windows.Forms.AnchorStyles.Right))); 154 this.engineComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 155 this.engineComboBox.FormattingEnabled = true; 156 this.engineComboBox.Location = new System.Drawing.Point(113, 54); 157 this.engineComboBox.Name = "engineComboBox"; 158 this.engineComboBox.Size = new System.Drawing.Size(156, 21); 159 this.engineComboBox.TabIndex = 7; 160 // 139 161 // CreateExperimentDialog 140 162 // … … 143 165 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 144 166 this.CancelButton = this.cancelButton; 145 this.ClientSize = new System.Drawing.Size(281, 93); 167 this.ClientSize = new System.Drawing.Size(281, 118); 168 this.Controls.Add(this.engineComboBox); 169 this.Controls.Add(this.label1); 146 170 this.Controls.Add(this.repetitionsNumericUpDown); 147 171 this.Controls.Add(this.repetitionsLabel); … … 172 196 private System.Windows.Forms.NumericUpDown repetitionsNumericUpDown; 173 197 private System.Windows.Forms.ToolTip toolTip; 198 private System.Windows.Forms.Label label1; 199 private System.Windows.Forms.ComboBox engineComboBox; 174 200 175 201 } -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/CreateExperimentDialog.cs
r5313 r5654 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 using System.Windows.Forms; 24 using HeuristicLab. Optimization;25 using HeuristicLab.Core; 25 26 26 27 namespace HeuristicLab.Problems.MetaOptimization.Views { … … 33 34 get { return (int)repetitionsNumericUpDown.Value; } 34 35 } 36 public IEngine Engine { 37 get { return (IEngine)engineComboBox.SelectedItem; } 38 } 35 39 36 public CreateExperimentDialog( ) {40 public CreateExperimentDialog(IEnumerable<IEngine> engines, Type selectedEngine) { 37 41 InitializeComponent(); 42 foreach (var engine in engines) { 43 this.engineComboBox.Items.Add(engine); 44 if (engine.GetType() == selectedEngine) { 45 this.engineComboBox.SelectedItem = engine; 46 } 47 if (this.engineComboBox.SelectedItem == null) { 48 this.engineComboBox.SelectedIndex = 0; 49 } 50 } 38 51 } 39 52 -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/CreateExperimentDialog.resx
r5313 r5654 121 121 <value>17, 17</value> 122 122 </metadata> 123 <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 124 <value>17, 17</value> 125 </metadata> 123 126 </root> -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/HeuristicLab.Problems.MetaOptimization.Views-3.3.csproj
r5313 r5654 114 114 <HintPath>..\..\..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 115 115 </Reference> 116 <Reference Include="HeuristicLab.SequentialEngine-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 117 <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.SequentialEngine-3.3.dll</HintPath> 118 </Reference> 116 119 <Reference Include="System" /> 117 120 <Reference Include="System.Core" /> -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/MetaOptimizationProblemView.cs
r5337 r5654 1 1 using System; 2 using System.Collections.Generic;3 using System.ComponentModel;4 using System.Drawing;5 using System.Data;6 2 using System.Linq; 7 using System.Text; 3 using System.Windows.Forms; 4 using HeuristicLab.Core; 8 5 using HeuristicLab.MainForm; 6 using HeuristicLab.Optimization; 9 7 using HeuristicLab.Optimization.Views; 10 using HeuristicLab.Optimization; 11 using System.Windows.Forms; 8 using HeuristicLab.PluginInfrastructure; 12 9 13 10 namespace HeuristicLab.Problems.MetaOptimization.Views { … … 68 65 } 69 66 if (result == System.Windows.Forms.DialogResult.OK) { 70 CreateExperimentDialog dlg = new CreateExperimentDialog( );67 CreateExperimentDialog dlg = new CreateExperimentDialog(ApplicationManager.Manager.GetInstances<IEngine>(), typeof(SequentialEngine.SequentialEngine)); 71 68 DialogResult dlgResult = dlg.ShowDialog(); 72 69 73 70 if (dlgResult == DialogResult.OK) { 74 IAlgorithm algorithm = Content.Algorithm;71 var algorithm = (EngineAlgorithm)Content.Algorithm.Clone(); 75 72 if(Content.Problems.Count > 0) algorithm.Problem = Content.Problems.First(); 73 algorithm.Engine = (IEngine)dlg.Engine.Clone(); 76 74 Experiment experiment; 77 75 … … 89 87 #endregion 90 88 91 pr otectedvoid parameterCollectionView_DragEnterOver(object sender, System.Windows.Forms.DragEventArgs e) {89 private void parameterCollectionView_DragEnterOver(object sender, System.Windows.Forms.DragEventArgs e) { 92 90 e.Effect = DragDropEffects.None; 93 91 Type type = e.Data.GetData("Type") as Type; … … 99 97 } 100 98 } 101 pr otectedvoid parameterCollectionView_DragDrop(object sender, System.Windows.Forms.DragEventArgs e) {99 private void parameterCollectionView_DragDrop(object sender, System.Windows.Forms.DragEventArgs e) { 102 100 if (e.Effect != DragDropEffects.None) { 103 101 IAlgorithm algorithm = e.Data.GetData("Value") as IAlgorithm; -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/MetaOptimizationProblem.cs
r5653 r5654 22 22 using System; 23 23 using System.Linq; 24 using HeuristicLab.Algorithms.GeneticAlgorithm; 24 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; … … 29 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 31 using HeuristicLab.PluginInfrastructure; 31 using HeuristicLab.Algorithms.GeneticAlgorithm;32 32 using HeuristicLab.Problems.TestFunctions; 33 33 … … 36 36 [Creatable("Problems")] 37 37 [StorableClass] 38 public sealed class MetaOptimizationProblem : SingleObjectiveProblem<IParameterConfigurationEvaluator, IParameterConfigurationCreator> { 38 public sealed class MetaOptimizationProblem : SingleObjectiveProblem<IParameterConfigurationEvaluator, IParameterConfigurationCreator>, IStorableContent { 39 public string Filename { get; set; } 40 39 41 public const string AlgorithmTypeParameterName = "AlgorithmType"; 40 42 public const string ProblemTypeParameterName = "ProblemType";
Note: See TracChangeset
for help on using the changeset viewer.