Changeset 13774 for branches/PerformanceComparison
- Timestamp:
- 04/19/16 12:40:40 (9 years ago)
- Location:
- branches/PerformanceComparison
- Files:
-
- 4 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.Analysis/3.3/QualityAnalysis/ExpectedRuntimeHelper.cs
r13757 r13774 53 53 54 54 public override string ToString() { 55 return SuccessfulRuns == 0 ? "\u221e" 55 return SuccessfulRuns == 0 ? "\u221e" // infinity symbol 56 56 : ExpectedRuntime.ToString("##,0.0", CultureInfo.CurrentCulture.NumberFormat); 57 57 } -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem.Common/3.3/HeuristicLab.OptimizationExpertSystem.Common-3.3.csproj
r13757 r13774 78 78 <Private>False</Private> 79 79 </Reference> 80 <Reference Include="HeuristicLab.Algorithms.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 81 <SpecificVersion>False</SpecificVersion> 82 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.DataAnalysis-3.4.dll</HintPath> 83 <Private>False</Private> 84 </Reference> 80 85 <Reference Include="HeuristicLab.Clients.OKB-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 81 86 <SpecificVersion>False</SpecificVersion> … … 120 125 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 121 126 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 127 <Private>False</Private> 128 </Reference> 129 <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 130 <SpecificVersion>False</SpecificVersion> 131 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath> 122 132 <Private>False</Private> 123 133 </Reference> … … 148 158 </ItemGroup> 149 159 <ItemGroup> 160 <Compile Include="OverallBestRecommender.cs" /> 161 <Compile Include="DistanceWeightedRecommender.cs" /> 162 <Compile Include="IAlgorithmInstanceRecommender.cs" /> 163 <Compile Include="KNearestNeighborRecommender.cs" /> 150 164 <Compile Include="KnowledgeCenter.cs" /> 151 165 <Compile Include="Plugin.cs" /> -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem.Common/3.3/KnowledgeCenter.cs
r13759 r13774 30 30 using HeuristicLab.Optimization; 31 31 using HeuristicLab.Persistence.Default.Xml; 32 using HeuristicLab.Problems.DataAnalysis; 32 33 using HeuristicLab.Random; 33 34 using System; … … 50 51 public string Filename { get; set; } 51 52 52 public static newImage StaticItemImage {53 public static Image StaticItemImage { 53 54 get { return VSImageLibrary.Library; } 54 55 } … … 84 85 } 85 86 86 private readonly ItemList<IAlgorithm> suggestedInstances;87 private readonly ReadOnlyItemList<IAlgorithm> read OnlySuggestedInstances;88 public ReadOnlyItemList<IAlgorithm> SuggestedInstances {89 get { return read OnlySuggestedInstances; }87 private readonly ItemList<IAlgorithm> algorithmInstances; 88 private readonly ReadOnlyItemList<IAlgorithm> readonlyAlgorithmInstances; 89 public ReadOnlyItemList<IAlgorithm> AlgorithmInstances { 90 get { return readonlyAlgorithmInstances; } 90 91 } 91 92 … … 101 102 } 102 103 103 private readonly EnumValue<ProblemInstanceProximityType> problemInstanceProximity; 104 public EnumValue<ProblemInstanceProximityType> ProblemInstanceProximity { 105 get { return problemInstanceProximity; } 106 } 107 108 private readonly DoubleValue problemInstanceNeighborhoodFactor; 109 public DoubleValue ProblemInstanceNeighborhoodFactor { 110 get { return problemInstanceNeighborhoodFactor; } 104 private IAlgorithmInstanceRecommender algorithmInstanceRecommender; 105 public IAlgorithmInstanceRecommender AlgorithmInstanceRecommender { 106 get { return algorithmInstanceRecommender; } 107 set { algorithmInstanceRecommender = value; } 111 108 } 112 109 … … 125 122 private BidirectionalDictionary<long, IRun> problemId2ProblemInstanceMapping; 126 123 127 p rivatebool Maximization {124 public bool Maximization { 128 125 get { return Problem != null && Problem.ProblemId >= 0 && ((IValueParameter<BoolValue>)Problem.MaximizationParameter).Value.Value; } 129 126 } … … 135 132 seededRuns = new RunCollection(); 136 133 knowledgeBase = new RunCollection(); 137 suggestedInstances = new ItemList<IAlgorithm>();138 read OnlySuggestedInstances = suggestedInstances.AsReadOnly();134 algorithmInstances = new ItemList<IAlgorithm>(); 135 readonlyAlgorithmInstances = algorithmInstances.AsReadOnly(); 139 136 problemInstances = new RunCollection(); 140 137 problemCharacteristics = new CheckedItemList<StringValue>(); 141 problemInstanceProximity = new EnumValue<ProblemInstanceProximityType>(ProblemInstanceProximityType.FeatureSpace);142 problemInstanceNeighborhoodFactor = new DoubleValue(5);143 138 readonlyProblemCharacteristics = problemCharacteristics.AsReadOnly(); 139 algorithmInstanceRecommender = new OverallBestRecommender(this); 144 140 problem = new SingleObjectiveOKBProblem(); 145 141 algorithmId2RunMapping = new BidirectionalLookup<long, IRun>(); … … 176 172 problemCharacteristics.CollectionReset += CharacteristicChanged; 177 173 problemCharacteristics.CheckedItemsChanged += CharacteristicChanged; 178 problemInstanceProximity.ValueChanged += ProblemInstanceProximityChanged;179 problemInstanceNeighborhoodFactor.ValueChanged += ProblemInstanceProximityChanged;180 174 } 181 175 … … 205 199 UpdateInstanceProjection(); 206 200 } 207 208 private void ProblemInstanceProximityChanged(object sender, EventArgs e) { 209 UpdateSuggestions(); 210 } 211 201 212 202 public bool IsCurrentInstance(IRun run) { 213 203 if (!problemId2ProblemInstanceMapping.ContainsSecond(run)) return false; … … 339 329 340 330 public Task<ResultCollection> StartAlgorithmAsync(int index, CancellationToken cancellation) { 341 var selectedInstance = suggestedInstances[index];331 var selectedInstance = algorithmInstances[index]; 342 332 var algorithmClone = (IAlgorithm)selectedInstance.Clone(); 343 333 var problemClone = Problem.CloneProblem() as ISingleObjectiveHeuristicOptimizationProblem; … … 627 617 } 628 618 629 private void UpdateSuggestions() { 630 if (Problem == null) return; 631 var piDistances = GetProblemDistances(); 632 var maxDist = piDistances.Max(x => x.Value); 633 var instances = new SortedList<double, IAlgorithm>(); 619 public void UpdateSuggestions() { 620 // TODO: Maintain a separate list of suggested instances 621 // TODO: expose expected expected run time 622 algorithmInstances.Replace(AlgorithmInstanceRecommender.GetRanking()); 623 } 624 625 public Dictionary<IAlgorithm, double> GetAlgorithmPerformance(IRun problemInstance) { 626 if (!problemInstance.Parameters.ContainsKey("BestKnownQuality")) return new Dictionary<IAlgorithm, double>(); 627 var target = GetTarget(((DoubleValue)problemInstance.Parameters["BestKnownQuality"]).Value); 628 return knowledgeBase.Where(x => ((StringValue)x.Parameters["Problem Name"]).Value == ((StringValue)problemInstance.Parameters["Problem Name"]).Value) 629 .GroupBy(x => algorithmId2AlgorithmInstanceMapping.GetByFirst(algorithmId2RunMapping.GetBySecond(x).Single())) 630 .ToDictionary(x => x.Key, x => ExpectedRuntimeHelper.CalculateErt(x.ToList(), "QualityPerEvaluations", target, Maximization).ExpectedRuntime); 631 } 632 633 public Dictionary<IAlgorithm, List<IRun>> GetKnowledgeBaseByAlgorithm() { 634 return KnowledgeBase.GroupBy(x => algorithmId2AlgorithmInstanceMapping.GetByFirst(algorithmId2RunMapping.GetBySecond(x).Single())) 635 .ToDictionary(x => x.Key, x => x.ToList()); 636 } 637 638 public IEnumerable<IRegressionProblem> GetDataAnalysisProblem(double target) { 639 if (Problem == null) yield break; 640 var characteristics = GetProblemCharacteristics(); 641 // TODO: knowledgebase only stores problem name as a string 642 // this doesn't work if there are two equally named problem instances 643 var problemMap = ProblemInstances.Select(x => new { Key = ((StringValue)x.Parameters["Problem Name"]).Value, Value = x }) 644 .ToDictionary(x => x.Key, x => x.Value); 634 645 foreach (var relevantRuns in knowledgeBase.GroupBy(x => algorithmId2RunMapping.GetBySecond(x).Single())) { 635 var algorithm = algorithmId2AlgorithmInstanceMapping.GetByFirst(relevantRuns.Key); 636 Func<double, double> distFunc = (d) => Math.Exp(ProblemInstanceNeighborhoodFactor.Value * (-d / maxDist)); 637 var pis = relevantRuns.Select(x => ((StringValue)x.Parameters["Problem Name"]).Value).Distinct() 638 .Select(x => Tuple.Create(x, ProblemInstances.SingleOrDefault(y => ((StringValue)y.Parameters["Problem Name"]).Value == x))) 639 .Where(x => x.Item2 != null) 640 .Select(x => Tuple.Create(x.Item1, distFunc(piDistances[x.Item2]), ((DoubleValue)x.Item2.Parameters["BestKnownQuality"]).Value)) 641 .ToDictionary(x => x.Item1, x => Tuple.Create(x.Item2, x.Item3)); 642 var sumPis = pis.Sum(x => x.Value.Item1); 643 var avgERT = 0.0; 644 foreach (var problemRuns in relevantRuns.GroupBy(x => ((StringValue)x.Parameters["Problem Name"]).Value)) { 645 Tuple<double, double> info; 646 if (!pis.TryGetValue(problemRuns.Key, out info)) continue; 647 var convGraph = new List<List<Tuple<double, double>>>(); 648 foreach (var run in problemRuns) { 649 var current = new List<Tuple<double, double>>(); 650 var performanceGraph = ((IndexedDataTable<double>)run.Results["QualityPerEvaluations"]); 651 current.AddRange(performanceGraph.Rows.First().Values.TakeWhile(v => v.Item1 < MaximumEvaluations.Value)); 652 if (current.Count > 0) { 653 current.Add(Tuple.Create((double)MaximumEvaluations.Value, current.Last().Item2)); 654 convGraph.Add(current); 655 } 656 } 657 var ert = ExpectedRuntimeHelper.CalculateErt(convGraph, (Maximization ? (1 - MinimumTarget.Value) : (1 + MinimumTarget.Value)) * info.Item2, Maximization).ExpectedRuntime; 658 if (double.IsNaN(ert)) { 659 ert = ExpectedRuntimeHelper.CalculateErt(problemRuns.ToList(), "QualityPerEvaluations", (Maximization ? (1 - MinimumTarget.Value) : (1 + MinimumTarget.Value)) * info.Item2, Maximization).ExpectedRuntime; 660 if (double.IsNaN(ert)) ert = int.MaxValue; 661 } 662 avgERT += info.Item1 * ert; 663 } 664 avgERT /= sumPis; 665 if (instances.ContainsKey(avgERT)) { 666 avgERT += new System.Random().NextDouble(); 667 } 668 instances.Add(avgERT, algorithm); 669 } 670 671 var instanceLadder = instances.Select(x => (IAlgorithm)x.Value.Clone()).ToList(); 672 suggestedInstances.Replace(instanceLadder); 673 } 674 675 private Dictionary<IRun, double> GetProblemDistances() { 646 var problemRuns = relevantRuns.GroupBy(x => ((StringValue)x.Parameters["Problem Name"]).Value).ToList(); 647 var ds = new ModifiableDataset(); 648 ds.AddVariable("Problem Name", new List<string>()); 649 foreach (var pc in ProblemCharacteristics.CheckedItems) 650 ds.AddVariable(pc.Value.Value, new List<double>()); 651 ds.AddVariable("ERT", new List<double>()); 652 var max = Maximization; 653 foreach (var pr in problemRuns) { 654 var prob = problemMap[pr.Key]; 655 var features = characteristics[prob]; 656 var bkq = ((DoubleValue)prob.Parameters["BestKnownQuality"]).Value; 657 var ert = ExpectedRuntimeHelper.CalculateErt(pr.ToList(), "QualityPerEvaluations", GetTarget(bkq), max).ExpectedRuntime; 658 if (double.IsNaN(ert)) ert = int.MaxValue; 659 ds.AddRow(new object[] { pr.Key }.Concat(features.Cast<object>()).Concat(new object[] { ert })); 660 } 661 var datAnalysisData = new RegressionProblemData(ds, ProblemCharacteristics.CheckedItems.Select(x => x.Value.Value), "ERT"); 662 var result = new RegressionProblem() { 663 Name = algorithmId2AlgorithmInstanceMapping.GetByFirst(relevantRuns.Key).Name 664 }; 665 result.ProblemDataParameter.Value = datAnalysisData; 666 yield return result; 667 } 668 } 669 670 private double GetTarget(double bestKnownQuality) { 671 return bestKnownQuality * (Maximization ? (1 - MinimumTarget.Value) : (1 + MinimumTarget.Value)); 672 } 673 674 public Dictionary<IRun, double> GetProblemDistances(ProblemInstanceProximityType proximityType) { 676 675 var result = new Dictionary<IRun, double>(); 677 676 var currentInstance = problemId2ProblemInstanceMapping.GetByFirst(Problem.ProblemId); 678 switch ( ProblemInstanceProximity.Value) {677 switch (proximityType) { 679 678 case ProblemInstanceProximityType.MDS: 680 679 case ProblemInstanceProximityType.PCA: 681 680 case ProblemInstanceProximityType.SOM: 682 681 double xa, ya; 683 GetProjectionCoordinates(currentInstance, out xa, out ya);682 GetProjectionCoordinates(currentInstance, proximityType, out xa, out ya); 684 683 foreach (var b in ProblemInstances) { 684 if (b == currentInstance) continue; 685 685 double xb, yb; 686 GetProjectionCoordinates(b, out xb, out yb);686 GetProjectionCoordinates(b, proximityType, out xb, out yb); 687 687 var d = Math.Sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb)); 688 688 result[b] = d; … … 693 693 var cF = features[currentInstance]; 694 694 foreach (var b in ProblemInstances) { 695 if (b == currentInstance) continue; 695 696 var sum = features[b].Select((t, f) => (cF[f] - t) * (cF[f] - t)).Sum(); 696 697 result[b] = Math.Sqrt(sum); 697 698 } 698 699 break; 699 default: throw new InvalidOperationException(string.Format("Unkonwn proximity type {0}", ProblemInstanceProximity.Value));700 default: throw new InvalidOperationException(string.Format("Unkonwn proximity type {0}", proximityType)); 700 701 } 701 702 return result; 702 703 } 703 704 704 private void GetProjectionCoordinates(IRun problemInstance, out double x, out double y) {705 x = ((DoubleValue)problemInstance.Results["Projection." + ProblemInstanceProximity.Value + ".X"]).Value;706 y = ((DoubleValue)problemInstance.Results["Projection." + ProblemInstanceProximity.Value + ".Y"]).Value;707 if ( ProblemInstanceProximity.Value == ProblemInstanceProximityType.SOM) {705 private void GetProjectionCoordinates(IRun problemInstance, ProblemInstanceProximityType proximityType, out double x, out double y) { 706 x = ((DoubleValue)problemInstance.Results["Projection." + proximityType + ".X"]).Value; 707 y = ((DoubleValue)problemInstance.Results["Projection." + proximityType + ".Y"]).Value; 708 if (proximityType == ProblemInstanceProximityType.SOM) { 708 709 x = Math.Floor(x); 709 710 y = Math.Floor(y); -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Docking/AlgorithmControlForm.cs
r13722 r13774 119 119 120 120 #region Algorithm Events 121 private void AlgorithmOnExecutionStateChanged(object sender, EventArgs eventArgs) { 121 private void AlgorithmOnExecutionStateChanged(object sender, EventArgs e) { 122 if (InvokeRequired) { Invoke((Action<object, EventArgs>)AlgorithmOnExecutionStateChanged, sender, e); return; } 122 123 if (ShowOnlyFinalResult && (Algorithm.ExecutionState == ExecutionState.Stopped 123 124 || Algorithm.ExecutionState == ExecutionState.Paused)) -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Plugin.cs.frame
r13722 r13774 20 20 #endregion 21 21 22 using HeuristicLab.Clients.Access; 23 using HeuristicLab.Common; 24 using HeuristicLab.Core; 25 using HeuristicLab.PluginInfrastructure; 22 26 using System.Windows.Forms; 23 using HeuristicLab.Clients.Access;24 using HeuristicLab.PluginInfrastructure;25 27 26 28 namespace HeuristicLab.OptimizationExpertSystem { … … 50 52 ClientInformation.InitializeAsync(); 51 53 UserInformation.InitializeAsync(); 52 54 ContentManager.Initialize(new PersistenceContentManager()); 53 55 mainForm.ShowContentInViewHost = true; 54 56 Application.Run(mainForm); -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/KnowledgeCenterAllinOneView.cs
r13751 r13774 78 78 #region Event Registration 79 79 protected override void DeregisterContentEvents() { 80 Content. SuggestedInstances.CollectionReset -= SuggestedInstancesOnChanged;81 Content. SuggestedInstances.ItemsAdded -= SuggestedInstancesOnChanged;82 Content. SuggestedInstances.ItemsMoved -= SuggestedInstancesOnChanged;83 Content. SuggestedInstances.ItemsRemoved -= SuggestedInstancesOnChanged;84 Content. SuggestedInstances.ItemsReplaced -= SuggestedInstancesOnChanged;80 Content.AlgorithmInstances.CollectionReset -= SuggestedInstancesOnChanged; 81 Content.AlgorithmInstances.ItemsAdded -= SuggestedInstancesOnChanged; 82 Content.AlgorithmInstances.ItemsMoved -= SuggestedInstancesOnChanged; 83 Content.AlgorithmInstances.ItemsRemoved -= SuggestedInstancesOnChanged; 84 Content.AlgorithmInstances.ItemsReplaced -= SuggestedInstancesOnChanged; 85 85 Content.SolutionSeedingPool.CollectionReset -= SeedingPoolOnChanged; 86 86 Content.SolutionSeedingPool.ItemsAdded -= SeedingPoolOnChanged; … … 94 94 protected override void RegisterContentEvents() { 95 95 base.RegisterContentEvents(); 96 Content. SuggestedInstances.CollectionReset += SuggestedInstancesOnChanged;97 Content. SuggestedInstances.ItemsAdded += SuggestedInstancesOnChanged;98 Content. SuggestedInstances.ItemsMoved += SuggestedInstancesOnChanged;99 Content. SuggestedInstances.ItemsRemoved += SuggestedInstancesOnChanged;100 Content. SuggestedInstances.ItemsReplaced += SuggestedInstancesOnChanged;96 Content.AlgorithmInstances.CollectionReset += SuggestedInstancesOnChanged; 97 Content.AlgorithmInstances.ItemsAdded += SuggestedInstancesOnChanged; 98 Content.AlgorithmInstances.ItemsMoved += SuggestedInstancesOnChanged; 99 Content.AlgorithmInstances.ItemsRemoved += SuggestedInstancesOnChanged; 100 Content.AlgorithmInstances.ItemsReplaced += SuggestedInstancesOnChanged; 101 101 Content.SolutionSeedingPool.CollectionReset += SeedingPoolOnChanged; 102 102 Content.SolutionSeedingPool.ItemsAdded += SeedingPoolOnChanged; … … 248 248 private void AlgorithmCloneButtonOnClick(object sender, EventArgs e) { 249 249 if (suggestedInstancesComboBox.SelectedIndex >= 0) 250 MainFormManager.MainForm.ShowContent((IAlgorithm)Content. SuggestedInstances[suggestedInstancesComboBox.SelectedIndex].Clone());250 MainFormManager.MainForm.ShowContent((IAlgorithm)Content.AlgorithmInstances[suggestedInstancesComboBox.SelectedIndex].Clone()); 251 251 } 252 252 … … 279 279 if (InvokeRequired) { Invoke((Action<object, EventArgs>)SuggestedInstancesComboBoxOnSelectedIndexChanged, sender, e); return; } 280 280 if (suggestedInstancesComboBox.SelectedIndex >= 0) { 281 var alg = Content. SuggestedInstances[suggestedInstancesComboBox.SelectedIndex];281 var alg = Content.AlgorithmInstances[suggestedInstancesComboBox.SelectedIndex]; 282 282 solverParametersView.Content = alg.Parameters; 283 283 var engineAlg = alg as EngineAlgorithm; … … 328 328 if (Content == null) return; 329 329 330 for (var i = 0; i < Content. SuggestedInstances.Count; i++) {331 suggestedInstancesComboBox.Items.Add(Content. SuggestedInstances[i]);332 if (prevSelection == null || Content. SuggestedInstances[i].Name == prevSelection.Name)330 for (var i = 0; i < Content.AlgorithmInstances.Count; i++) { 331 suggestedInstancesComboBox.Items.Add(Content.AlgorithmInstances[i]); 332 if (prevSelection == null || Content.AlgorithmInstances[i].Name == prevSelection.Name) 333 333 prevNewIndex = prevSelection == null ? 0 : i; 334 334 } -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/KnowledgeCenterViewBase.cs
r13752 r13774 88 88 89 89 private void RegisterContentSuggestedInstancesEvents() { 90 Content. SuggestedInstances.CollectionReset += ContentOnSuggestedInstancesChanged;91 Content. SuggestedInstances.ItemsAdded += ContentOnSuggestedInstancesChanged;92 Content. SuggestedInstances.ItemsMoved += ContentOnSuggestedInstancesChanged;93 Content. SuggestedInstances.ItemsRemoved += ContentOnSuggestedInstancesChanged;94 Content. SuggestedInstances.ItemsReplaced += ContentOnSuggestedInstancesChanged;90 Content.AlgorithmInstances.CollectionReset += ContentOnSuggestedInstancesChanged; 91 Content.AlgorithmInstances.ItemsAdded += ContentOnSuggestedInstancesChanged; 92 Content.AlgorithmInstances.ItemsMoved += ContentOnSuggestedInstancesChanged; 93 Content.AlgorithmInstances.ItemsRemoved += ContentOnSuggestedInstancesChanged; 94 Content.AlgorithmInstances.ItemsReplaced += ContentOnSuggestedInstancesChanged; 95 95 } 96 96 … … 139 139 140 140 private void DeregisterContentSuggestedInstancesEvents() { 141 Content. SuggestedInstances.CollectionReset -= ContentOnSuggestedInstancesChanged;142 Content. SuggestedInstances.ItemsAdded -= ContentOnSuggestedInstancesChanged;143 Content. SuggestedInstances.ItemsMoved -= ContentOnSuggestedInstancesChanged;144 Content. SuggestedInstances.ItemsRemoved -= ContentOnSuggestedInstancesChanged;145 Content. SuggestedInstances.ItemsReplaced -= ContentOnSuggestedInstancesChanged;141 Content.AlgorithmInstances.CollectionReset -= ContentOnSuggestedInstancesChanged; 142 Content.AlgorithmInstances.ItemsAdded -= ContentOnSuggestedInstancesChanged; 143 Content.AlgorithmInstances.ItemsMoved -= ContentOnSuggestedInstancesChanged; 144 Content.AlgorithmInstances.ItemsRemoved -= ContentOnSuggestedInstancesChanged; 145 Content.AlgorithmInstances.ItemsReplaced -= ContentOnSuggestedInstancesChanged; 146 146 } 147 147 #endregion -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/SolverView.Designer.cs
r13759 r13774 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin 1= new WeifenLuo.WinFormsUI.Docking.DockPanelSkin();48 WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin 1= new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin();49 WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient 1= new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();50 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient 1= new WeifenLuo.WinFormsUI.Docking.TabGradient();51 WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin 1= new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin();52 WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient 1= new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient();53 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient 2= new WeifenLuo.WinFormsUI.Docking.TabGradient();54 WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient 2= new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();55 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient 3= new WeifenLuo.WinFormsUI.Docking.TabGradient();56 WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient 1= new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient();57 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient 4= new WeifenLuo.WinFormsUI.Docking.TabGradient();58 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient 5= new WeifenLuo.WinFormsUI.Docking.TabGradient();59 WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient 3= new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();60 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient 6= new WeifenLuo.WinFormsUI.Docking.TabGradient();61 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient 7= new WeifenLuo.WinFormsUI.Docking.TabGradient();47 WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin2 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin(); 48 WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin2 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin(); 49 WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient4 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient(); 50 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient8 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); 51 WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin(); 52 WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient(); 53 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient9 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); 54 WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient5 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient(); 55 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient10 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); 56 WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient(); 57 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient11 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); 58 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient12 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); 59 WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient6 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient(); 60 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient13 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); 61 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient14 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); 62 62 this.minTargetView = new HeuristicLab.Data.Views.StringConvertibleValueView(); 63 63 this.maxEvaluationsView = new HeuristicLab.Data.Views.StringConvertibleValueView(); … … 81 81 this.seedingStrategyLabel = new System.Windows.Forms.Label(); 82 82 this.evaluationsLimitabel = new System.Windows.Forms.Label(); 83 this. algorithmSuggestionLabel = new System.Windows.Forms.Label();83 this.recommenderLabel = new System.Windows.Forms.Label(); 84 84 this.suggestedInstancesComboBox = new System.Windows.Forms.ComboBox(); 85 this.recommenderComboBox = new System.Windows.Forms.ComboBox(); 86 this.solverSplitContainer = new System.Windows.Forms.SplitContainer(); 87 this.recommenderViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 88 this.instanceLabel = new System.Windows.Forms.Label(); 89 this.recommendRefreshButton = new System.Windows.Forms.Button(); 85 90 this.solverTabControl.SuspendLayout(); 86 91 this.resultsTabPage.SuspendLayout(); … … 89 94 this.parametersTabPage.SuspendLayout(); 90 95 this.operatorGraphTabPage.SuspendLayout(); 96 ((System.ComponentModel.ISupportInitialize)(this.solverSplitContainer)).BeginInit(); 97 this.solverSplitContainer.Panel1.SuspendLayout(); 98 this.solverSplitContainer.Panel2.SuspendLayout(); 99 this.solverSplitContainer.SuspendLayout(); 91 100 this.SuspendLayout(); 92 101 // … … 115 124 // algorithmCloneButton 116 125 // 117 this.algorithmCloneButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 118 this.algorithmCloneButton.Location = new System.Drawing.Point(823, 56); 126 this.algorithmCloneButton.Location = new System.Drawing.Point(123, 60); 119 127 this.algorithmCloneButton.Name = "algorithmCloneButton"; 120 128 this.algorithmCloneButton.Size = new System.Drawing.Size(26, 23); … … 136 144 // 137 145 this.solverTabControl.AllowDrop = true; 138 this.solverTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)139 | System.Windows.Forms.AnchorStyles.Left)140 | System.Windows.Forms.AnchorStyles.Right)));141 146 this.solverTabControl.Controls.Add(this.resultsTabPage); 142 147 this.solverTabControl.Controls.Add(this.runsTabPage); … … 145 150 this.solverTabControl.Controls.Add(this.parametersTabPage); 146 151 this.solverTabControl.Controls.Add(this.operatorGraphTabPage); 147 this.solverTabControl.Location = new System.Drawing.Point(0, 84); 152 this.solverTabControl.Dock = System.Windows.Forms.DockStyle.Fill; 153 this.solverTabControl.Location = new System.Drawing.Point(3, 3); 148 154 this.solverTabControl.Name = "solverTabControl"; 149 155 this.solverTabControl.SelectedIndex = 0; 150 this.solverTabControl.Size = new System.Drawing.Size( 849, 480);156 this.solverTabControl.Size = new System.Drawing.Size(556, 502); 151 157 this.solverTabControl.TabIndex = 11; 152 158 // … … 158 164 this.resultsTabPage.Name = "resultsTabPage"; 159 165 this.resultsTabPage.Padding = new System.Windows.Forms.Padding(3); 160 this.resultsTabPage.Size = new System.Drawing.Size( 841, 454);166 this.resultsTabPage.Size = new System.Drawing.Size(548, 476); 161 167 this.resultsTabPage.TabIndex = 2; 162 168 this.resultsTabPage.Text = "Results"; … … 166 172 // 167 173 this.showOnlyFinalResultCheckBox.AutoSize = true; 174 this.showOnlyFinalResultCheckBox.Checked = true; 175 this.showOnlyFinalResultCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; 168 176 this.showOnlyFinalResultCheckBox.Location = new System.Drawing.Point(6, 6); 169 177 this.showOnlyFinalResultCheckBox.Name = "showOnlyFinalResultCheckBox"; … … 181 189 this.resultsDockPanel.Location = new System.Drawing.Point(3, 29); 182 190 this.resultsDockPanel.Name = "resultsDockPanel"; 183 this.resultsDockPanel.Size = new System.Drawing.Size( 835, 422);184 dockPanelGradient 1.EndColor = System.Drawing.SystemColors.ControlLight;185 dockPanelGradient 1.StartColor = System.Drawing.SystemColors.ControlLight;186 autoHideStripSkin 1.DockStripGradient = dockPanelGradient1;187 tabGradient 1.EndColor = System.Drawing.SystemColors.Control;188 tabGradient 1.StartColor = System.Drawing.SystemColors.Control;189 tabGradient 1.TextColor = System.Drawing.SystemColors.ControlDarkDark;190 autoHideStripSkin 1.TabGradient = tabGradient1;191 autoHideStripSkin 1.TextFont = new System.Drawing.Font("Segoe UI", 9F);192 dockPanelSkin 1.AutoHideStripSkin = autoHideStripSkin1;193 tabGradient 2.EndColor = System.Drawing.SystemColors.ControlLightLight;194 tabGradient 2.StartColor = System.Drawing.SystemColors.ControlLightLight;195 tabGradient 2.TextColor = System.Drawing.SystemColors.ControlText;196 dockPaneStripGradient 1.ActiveTabGradient = tabGradient2;197 dockPanelGradient 2.EndColor = System.Drawing.SystemColors.Control;198 dockPanelGradient 2.StartColor = System.Drawing.SystemColors.Control;199 dockPaneStripGradient 1.DockStripGradient = dockPanelGradient2;200 tabGradient 3.EndColor = System.Drawing.SystemColors.ControlLight;201 tabGradient 3.StartColor = System.Drawing.SystemColors.ControlLight;202 tabGradient 3.TextColor = System.Drawing.SystemColors.ControlText;203 dockPaneStripGradient 1.InactiveTabGradient = tabGradient3;204 dockPaneStripSkin 1.DocumentGradient = dockPaneStripGradient1;205 dockPaneStripSkin 1.TextFont = new System.Drawing.Font("Segoe UI", 9F);206 tabGradient 4.EndColor = System.Drawing.SystemColors.ActiveCaption;207 tabGradient 4.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;208 tabGradient 4.StartColor = System.Drawing.SystemColors.GradientActiveCaption;209 tabGradient 4.TextColor = System.Drawing.SystemColors.ActiveCaptionText;210 dockPaneStripToolWindowGradient 1.ActiveCaptionGradient = tabGradient4;211 tabGradient 5.EndColor = System.Drawing.SystemColors.Control;212 tabGradient 5.StartColor = System.Drawing.SystemColors.Control;213 tabGradient 5.TextColor = System.Drawing.SystemColors.ControlText;214 dockPaneStripToolWindowGradient 1.ActiveTabGradient = tabGradient5;215 dockPanelGradient 3.EndColor = System.Drawing.SystemColors.ControlLight;216 dockPanelGradient 3.StartColor = System.Drawing.SystemColors.ControlLight;217 dockPaneStripToolWindowGradient 1.DockStripGradient = dockPanelGradient3;218 tabGradient 6.EndColor = System.Drawing.SystemColors.InactiveCaption;219 tabGradient 6.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;220 tabGradient 6.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;221 tabGradient 6.TextColor = System.Drawing.SystemColors.InactiveCaptionText;222 dockPaneStripToolWindowGradient 1.InactiveCaptionGradient = tabGradient6;223 tabGradient 7.EndColor = System.Drawing.Color.Transparent;224 tabGradient 7.StartColor = System.Drawing.Color.Transparent;225 tabGradient 7.TextColor = System.Drawing.SystemColors.ControlDarkDark;226 dockPaneStripToolWindowGradient 1.InactiveTabGradient = tabGradient7;227 dockPaneStripSkin 1.ToolWindowGradient = dockPaneStripToolWindowGradient1;228 dockPanelSkin 1.DockPaneStripSkin = dockPaneStripSkin1;229 this.resultsDockPanel.Skin = dockPanelSkin 1;191 this.resultsDockPanel.Size = new System.Drawing.Size(542, 444); 192 dockPanelGradient4.EndColor = System.Drawing.SystemColors.ControlLight; 193 dockPanelGradient4.StartColor = System.Drawing.SystemColors.ControlLight; 194 autoHideStripSkin2.DockStripGradient = dockPanelGradient4; 195 tabGradient8.EndColor = System.Drawing.SystemColors.Control; 196 tabGradient8.StartColor = System.Drawing.SystemColors.Control; 197 tabGradient8.TextColor = System.Drawing.SystemColors.ControlDarkDark; 198 autoHideStripSkin2.TabGradient = tabGradient8; 199 autoHideStripSkin2.TextFont = new System.Drawing.Font("Segoe UI", 9F); 200 dockPanelSkin2.AutoHideStripSkin = autoHideStripSkin2; 201 tabGradient9.EndColor = System.Drawing.SystemColors.ControlLightLight; 202 tabGradient9.StartColor = System.Drawing.SystemColors.ControlLightLight; 203 tabGradient9.TextColor = System.Drawing.SystemColors.ControlText; 204 dockPaneStripGradient2.ActiveTabGradient = tabGradient9; 205 dockPanelGradient5.EndColor = System.Drawing.SystemColors.Control; 206 dockPanelGradient5.StartColor = System.Drawing.SystemColors.Control; 207 dockPaneStripGradient2.DockStripGradient = dockPanelGradient5; 208 tabGradient10.EndColor = System.Drawing.SystemColors.ControlLight; 209 tabGradient10.StartColor = System.Drawing.SystemColors.ControlLight; 210 tabGradient10.TextColor = System.Drawing.SystemColors.ControlText; 211 dockPaneStripGradient2.InactiveTabGradient = tabGradient10; 212 dockPaneStripSkin2.DocumentGradient = dockPaneStripGradient2; 213 dockPaneStripSkin2.TextFont = new System.Drawing.Font("Segoe UI", 9F); 214 tabGradient11.EndColor = System.Drawing.SystemColors.ActiveCaption; 215 tabGradient11.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; 216 tabGradient11.StartColor = System.Drawing.SystemColors.GradientActiveCaption; 217 tabGradient11.TextColor = System.Drawing.SystemColors.ActiveCaptionText; 218 dockPaneStripToolWindowGradient2.ActiveCaptionGradient = tabGradient11; 219 tabGradient12.EndColor = System.Drawing.SystemColors.Control; 220 tabGradient12.StartColor = System.Drawing.SystemColors.Control; 221 tabGradient12.TextColor = System.Drawing.SystemColors.ControlText; 222 dockPaneStripToolWindowGradient2.ActiveTabGradient = tabGradient12; 223 dockPanelGradient6.EndColor = System.Drawing.SystemColors.ControlLight; 224 dockPanelGradient6.StartColor = System.Drawing.SystemColors.ControlLight; 225 dockPaneStripToolWindowGradient2.DockStripGradient = dockPanelGradient6; 226 tabGradient13.EndColor = System.Drawing.SystemColors.InactiveCaption; 227 tabGradient13.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; 228 tabGradient13.StartColor = System.Drawing.SystemColors.GradientInactiveCaption; 229 tabGradient13.TextColor = System.Drawing.SystemColors.InactiveCaptionText; 230 dockPaneStripToolWindowGradient2.InactiveCaptionGradient = tabGradient13; 231 tabGradient14.EndColor = System.Drawing.Color.Transparent; 232 tabGradient14.StartColor = System.Drawing.Color.Transparent; 233 tabGradient14.TextColor = System.Drawing.SystemColors.ControlDarkDark; 234 dockPaneStripToolWindowGradient2.InactiveTabGradient = tabGradient14; 235 dockPaneStripSkin2.ToolWindowGradient = dockPaneStripToolWindowGradient2; 236 dockPanelSkin2.DockPaneStripSkin = dockPaneStripSkin2; 237 this.resultsDockPanel.Skin = dockPanelSkin2; 230 238 this.resultsDockPanel.TabIndex = 0; 231 239 // … … 236 244 this.runsTabPage.Name = "runsTabPage"; 237 245 this.runsTabPage.Padding = new System.Windows.Forms.Padding(3); 238 this.runsTabPage.Size = new System.Drawing.Size( 841, 454);246 this.runsTabPage.Size = new System.Drawing.Size(548, 476); 239 247 this.runsTabPage.TabIndex = 4; 240 248 this.runsTabPage.Text = "Runs"; … … 249 257 this.runsView.Name = "runsView"; 250 258 this.runsView.ReadOnly = false; 251 this.runsView.Size = new System.Drawing.Size( 835, 448);259 this.runsView.Size = new System.Drawing.Size(542, 470); 252 260 this.runsView.TabIndex = 0; 253 261 // … … 258 266 this.seededRunsTabPage.Name = "seededRunsTabPage"; 259 267 this.seededRunsTabPage.Padding = new System.Windows.Forms.Padding(3); 260 this.seededRunsTabPage.Size = new System.Drawing.Size( 841, 454);268 this.seededRunsTabPage.Size = new System.Drawing.Size(548, 476); 261 269 this.seededRunsTabPage.TabIndex = 5; 262 270 this.seededRunsTabPage.Text = "Seeded Runs"; … … 271 279 this.seededRunsView.Name = "seededRunsView"; 272 280 this.seededRunsView.ReadOnly = false; 273 this.seededRunsView.Size = new System.Drawing.Size( 835, 448);281 this.seededRunsView.Size = new System.Drawing.Size(542, 470); 274 282 this.seededRunsView.TabIndex = 1; 275 283 // … … 279 287 this.solutionSeedingTabPage.Name = "solutionSeedingTabPage"; 280 288 this.solutionSeedingTabPage.Padding = new System.Windows.Forms.Padding(3); 281 this.solutionSeedingTabPage.Size = new System.Drawing.Size( 841, 454);289 this.solutionSeedingTabPage.Size = new System.Drawing.Size(548, 476); 282 290 this.solutionSeedingTabPage.TabIndex = 1; 283 291 this.solutionSeedingTabPage.Text = "Seeding Pool"; … … 290 298 this.parametersTabPage.Name = "parametersTabPage"; 291 299 this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3); 292 this.parametersTabPage.Size = new System.Drawing.Size( 841, 454);300 this.parametersTabPage.Size = new System.Drawing.Size(548, 476); 293 301 this.parametersTabPage.TabIndex = 0; 294 302 this.parametersTabPage.Text = "Parameters"; … … 305 313 this.solverParametersView.ReadOnly = true; 306 314 this.solverParametersView.ShowDetails = true; 307 this.solverParametersView.Size = new System.Drawing.Size( 835, 448);315 this.solverParametersView.Size = new System.Drawing.Size(542, 470); 308 316 this.solverParametersView.TabIndex = 0; 309 317 // … … 314 322 this.operatorGraphTabPage.Name = "operatorGraphTabPage"; 315 323 this.operatorGraphTabPage.Padding = new System.Windows.Forms.Padding(3); 316 this.operatorGraphTabPage.Size = new System.Drawing.Size( 841, 454);324 this.operatorGraphTabPage.Size = new System.Drawing.Size(548, 476); 317 325 this.operatorGraphTabPage.TabIndex = 3; 318 326 this.operatorGraphTabPage.Text = "Operator Graph"; … … 328 336 this.operatorGraphViewHost.Name = "operatorGraphViewHost"; 329 337 this.operatorGraphViewHost.ReadOnly = true; 330 this.operatorGraphViewHost.Size = new System.Drawing.Size( 835, 448);338 this.operatorGraphViewHost.Size = new System.Drawing.Size(542, 470); 331 339 this.operatorGraphViewHost.TabIndex = 0; 332 340 this.operatorGraphViewHost.ViewsLabelVisible = true; … … 335 343 // algorithmStartButton 336 344 // 337 this.algorithmStartButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 338 this.algorithmStartButton.Location = new System.Drawing.Point(791, 55); 345 this.algorithmStartButton.Location = new System.Drawing.Point(91, 60); 339 346 this.algorithmStartButton.Name = "algorithmStartButton"; 340 347 this.algorithmStartButton.Size = new System.Drawing.Size(26, 23); … … 371 378 this.evaluationsLimitabel.Text = "Budget (FE):"; 372 379 // 373 // algorithmSuggestionLabel374 // 375 this. algorithmSuggestionLabel.AutoSize = true;376 this. algorithmSuggestionLabel.Location = new System.Drawing.Point(3, 59);377 this. algorithmSuggestionLabel.Name = "algorithmSuggestionLabel";378 this. algorithmSuggestionLabel.Size = new System.Drawing.Size(99, 13);379 this. algorithmSuggestionLabel.TabIndex = 9;380 this. algorithmSuggestionLabel.Text = "Suggested Solvers:";380 // recommenderLabel 381 // 382 this.recommenderLabel.AutoSize = true; 383 this.recommenderLabel.Location = new System.Drawing.Point(6, 9); 384 this.recommenderLabel.Name = "recommenderLabel"; 385 this.recommenderLabel.Size = new System.Drawing.Size(79, 13); 386 this.recommenderLabel.TabIndex = 9; 387 this.recommenderLabel.Text = "Recommender:"; 381 388 // 382 389 // suggestedInstancesComboBox … … 386 393 this.suggestedInstancesComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 387 394 this.suggestedInstancesComboBox.FormattingEnabled = true; 388 this.suggestedInstancesComboBox.Location = new System.Drawing.Point( 108, 56);395 this.suggestedInstancesComboBox.Location = new System.Drawing.Point(91, 33); 389 396 this.suggestedInstancesComboBox.Name = "suggestedInstancesComboBox"; 390 this.suggestedInstancesComboBox.Size = new System.Drawing.Size( 677, 21);397 this.suggestedInstancesComboBox.Size = new System.Drawing.Size(186, 21); 391 398 this.suggestedInstancesComboBox.TabIndex = 7; 392 399 this.suggestedInstancesComboBox.SelectedIndexChanged += new System.EventHandler(this.SuggestedInstancesComboBoxOnSelectedIndexChanged); 393 400 // 401 // recommenderComboBox 402 // 403 this.recommenderComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 404 | System.Windows.Forms.AnchorStyles.Right))); 405 this.recommenderComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 406 this.recommenderComboBox.FormattingEnabled = true; 407 this.recommenderComboBox.Location = new System.Drawing.Point(91, 6); 408 this.recommenderComboBox.Name = "recommenderComboBox"; 409 this.recommenderComboBox.Size = new System.Drawing.Size(154, 21); 410 this.recommenderComboBox.TabIndex = 7; 411 this.recommenderComboBox.SelectedIndexChanged += new System.EventHandler(this.RecommenderComboBoxOnSelectedIndexChanged); 412 // 413 // solverSplitContainer 414 // 415 this.solverSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 416 | System.Windows.Forms.AnchorStyles.Left) 417 | System.Windows.Forms.AnchorStyles.Right))); 418 this.solverSplitContainer.Location = new System.Drawing.Point(0, 56); 419 this.solverSplitContainer.Name = "solverSplitContainer"; 420 // 421 // solverSplitContainer.Panel1 422 // 423 this.solverSplitContainer.Panel1.Controls.Add(this.recommenderViewHost); 424 this.solverSplitContainer.Panel1.Controls.Add(this.instanceLabel); 425 this.solverSplitContainer.Panel1.Controls.Add(this.recommenderLabel); 426 this.solverSplitContainer.Panel1.Controls.Add(this.recommenderComboBox); 427 this.solverSplitContainer.Panel1.Controls.Add(this.algorithmCloneButton); 428 this.solverSplitContainer.Panel1.Controls.Add(this.suggestedInstancesComboBox); 429 this.solverSplitContainer.Panel1.Controls.Add(this.recommendRefreshButton); 430 this.solverSplitContainer.Panel1.Controls.Add(this.algorithmStartButton); 431 this.solverSplitContainer.Panel1.Padding = new System.Windows.Forms.Padding(3); 432 // 433 // solverSplitContainer.Panel2 434 // 435 this.solverSplitContainer.Panel2.Controls.Add(this.solverTabControl); 436 this.solverSplitContainer.Panel2.Padding = new System.Windows.Forms.Padding(3); 437 this.solverSplitContainer.Size = new System.Drawing.Size(849, 508); 438 this.solverSplitContainer.SplitterDistance = 283; 439 this.solverSplitContainer.TabIndex = 17; 440 // 441 // recommenderViewHost 442 // 443 this.recommenderViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 444 | System.Windows.Forms.AnchorStyles.Left) 445 | System.Windows.Forms.AnchorStyles.Right))); 446 this.recommenderViewHost.Caption = "View"; 447 this.recommenderViewHost.Content = null; 448 this.recommenderViewHost.Enabled = false; 449 this.recommenderViewHost.Location = new System.Drawing.Point(6, 89); 450 this.recommenderViewHost.Name = "recommenderViewHost"; 451 this.recommenderViewHost.ReadOnly = false; 452 this.recommenderViewHost.Size = new System.Drawing.Size(271, 412); 453 this.recommenderViewHost.TabIndex = 16; 454 this.recommenderViewHost.ViewsLabelVisible = true; 455 this.recommenderViewHost.ViewType = null; 456 // 457 // instanceLabel 458 // 459 this.instanceLabel.AutoSize = true; 460 this.instanceLabel.Location = new System.Drawing.Point(6, 36); 461 this.instanceLabel.Name = "instanceLabel"; 462 this.instanceLabel.Size = new System.Drawing.Size(51, 13); 463 this.instanceLabel.TabIndex = 9; 464 this.instanceLabel.Text = "Instance:"; 465 // 466 // recommendRefreshButton 467 // 468 this.recommendRefreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 469 this.recommendRefreshButton.Location = new System.Drawing.Point(251, 6); 470 this.recommendRefreshButton.Name = "recommendRefreshButton"; 471 this.recommendRefreshButton.Size = new System.Drawing.Size(26, 23); 472 this.recommendRefreshButton.TabIndex = 10; 473 this.recommendRefreshButton.Text = "Start"; 474 this.recommendRefreshButton.UseVisualStyleBackColor = true; 475 this.recommendRefreshButton.Click += new System.EventHandler(this.button1_Click); 476 // 394 477 // SolverView 395 478 // 396 479 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 397 480 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 481 this.Controls.Add(this.solverSplitContainer); 398 482 this.Controls.Add(this.minTargetView); 399 483 this.Controls.Add(this.maxEvaluationsView); 400 this.Controls.Add(this.algorithmCloneButton);401 484 this.Controls.Add(this.seedingStrategyPanel); 402 this.Controls.Add(this.solverTabControl);403 this.Controls.Add(this.algorithmStartButton);404 485 this.Controls.Add(this.minimumTargetLabel); 405 486 this.Controls.Add(this.seedingStrategyLabel); 406 487 this.Controls.Add(this.evaluationsLimitabel); 407 this.Controls.Add(this.algorithmSuggestionLabel);408 this.Controls.Add(this.suggestedInstancesComboBox);409 488 this.Name = "SolverView"; 410 489 this.Size = new System.Drawing.Size(849, 564); … … 416 495 this.parametersTabPage.ResumeLayout(false); 417 496 this.operatorGraphTabPage.ResumeLayout(false); 497 this.solverSplitContainer.Panel1.ResumeLayout(false); 498 this.solverSplitContainer.Panel1.PerformLayout(); 499 this.solverSplitContainer.Panel2.ResumeLayout(false); 500 ((System.ComponentModel.ISupportInitialize)(this.solverSplitContainer)).EndInit(); 501 this.solverSplitContainer.ResumeLayout(false); 418 502 this.ResumeLayout(false); 419 503 this.PerformLayout(); … … 434 518 private System.Windows.Forms.Label seedingStrategyLabel; 435 519 private System.Windows.Forms.Label evaluationsLimitabel; 436 private System.Windows.Forms.Label algorithmSuggestionLabel;520 private System.Windows.Forms.Label recommenderLabel; 437 521 private System.Windows.Forms.ComboBox suggestedInstancesComboBox; 438 522 private System.Windows.Forms.Button algorithmCloneButton; … … 446 530 private System.Windows.Forms.Label minimumTargetLabel; 447 531 private Data.Views.StringConvertibleValueView minTargetView; 532 private System.Windows.Forms.ComboBox recommenderComboBox; 533 private System.Windows.Forms.SplitContainer solverSplitContainer; 534 private MainForm.WindowsForms.ViewHost recommenderViewHost; 535 private System.Windows.Forms.Label instanceLabel; 536 private System.Windows.Forms.Button recommendRefreshButton; 448 537 } 449 538 } -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/SolverView.cs
r13759 r13774 44 44 algorithmCloneButton.Text = string.Empty; 45 45 algorithmCloneButton.Image = VSImageLibrary.Clone; 46 recommendRefreshButton.Text = string.Empty; 47 recommendRefreshButton.Image = VSImageLibrary.Refresh; 46 48 seedingStrategyView = new EnumValueView<SeedingStrategyTypes>() { 47 49 Dock = DockStyle.Fill … … 66 68 seedingStrategyView.Content = null; 67 69 seedingSolutionsView.Content = null; 70 recommenderViewHost.Content = null; 68 71 } else { 69 72 maxEvaluationsView.Content = Content.MaximumEvaluations; … … 73 76 seedingStrategyView.Content = Content.SeedingStrategy; 74 77 seedingSolutionsView.Content = Content.SolutionSeedingPool; 78 recommenderViewHost.Content = Content.AlgorithmInstanceRecommender; 75 79 } 76 80 } finally { SuppressEvents = false; } 77 81 UpdateSuggestedInstancesCombobox(); 82 UpdateRecommenderCombobox(); 78 83 } 79 84 … … 103 108 if (Content == null) return; 104 109 105 for (var i = 0; i < Content. SuggestedInstances.Count; i++) {106 suggestedInstancesComboBox.Items.Add(Content. SuggestedInstances[i]);107 if (prevSelection == null || Content. SuggestedInstances[i].Name == prevSelection.Name)110 for (var i = 0; i < Content.AlgorithmInstances.Count; i++) { 111 suggestedInstancesComboBox.Items.Add(Content.AlgorithmInstances[i]); 112 if (prevSelection == null || Content.AlgorithmInstances[i].Name == prevSelection.Name) 108 113 prevNewIndex = prevSelection == null ? 0 : i; 109 114 } 110 if (prevNewIndex >= 0) { 111 suggestedInstancesComboBox.SelectedIndex = prevNewIndex; 115 if (prevNewIndex >= 0) suggestedInstancesComboBox.SelectedIndex = prevNewIndex; 116 } 117 118 private void UpdateRecommenderCombobox() { 119 var prevSelection = Content.AlgorithmInstanceRecommender; 120 var prevNewIndex = -1; 121 recommenderComboBox.Items.Clear(); 122 if (Content == null) return; 123 124 /*var i = 0; 125 foreach (var type in ApplicationManager.Manager.GetTypes(typeof (IAlgorithmInstanceRecommender))) { 126 var r = (IAlgorithmInstanceRecommender)Activator.CreateInstance(type, BindingFlags.CreateInstance, Content); 127 recommenderComboBox.Items.Add(r); 128 if (prevSelection == null || type == prevSelection.GetType()) 129 prevNewIndex = prevSelection == null ? 0 : i; 130 i++; 112 131 } 132 if (prevNewIndex >= 0) recommenderComboBox.SelectedIndex = prevNewIndex;*/ 133 recommenderComboBox.Items.Add(new OverallBestRecommender(Content)); 134 if (prevSelection is OverallBestRecommender) recommenderComboBox.SelectedIndex = recommenderComboBox.Items.Count - 1; 135 recommenderComboBox.Items.Add(new KNearestNeighborRecommender(Content)); 136 if (prevSelection is KNearestNeighborRecommender) recommenderComboBox.SelectedIndex = recommenderComboBox.Items.Count - 1; 137 recommenderComboBox.Items.Add(new DistanceWeightedRecommender(Content)); 138 if (prevSelection is DistanceWeightedRecommender) recommenderComboBox.SelectedIndex = recommenderComboBox.Items.Count - 1; 113 139 } 114 140 … … 120 146 private void AlgorithmCloneButtonOnClick(object sender, EventArgs e) { 121 147 if (suggestedInstancesComboBox.SelectedIndex >= 0) 122 MainForm.ShowContent((IAlgorithm)Content. SuggestedInstances[suggestedInstancesComboBox.SelectedIndex].Clone());148 MainForm.ShowContent((IAlgorithm)Content.AlgorithmInstances[suggestedInstancesComboBox.SelectedIndex].Clone()); 123 149 } 124 150 … … 126 152 if (InvokeRequired) { Invoke((Action<object, EventArgs>)SuggestedInstancesComboBoxOnSelectedIndexChanged, sender, e); return; } 127 153 if (suggestedInstancesComboBox.SelectedIndex >= 0) { 128 var alg = Content. SuggestedInstances[suggestedInstancesComboBox.SelectedIndex];154 var alg = Content.AlgorithmInstances[suggestedInstancesComboBox.SelectedIndex]; 129 155 solverParametersView.Content = alg.Parameters; 130 156 var engineAlg = alg as EngineAlgorithm; … … 137 163 SetEnabledStateOfControls(); 138 164 } 165 166 private void RecommenderComboBoxOnSelectedIndexChanged(object sender, EventArgs e) { 167 if (InvokeRequired) { Invoke((Action<object, EventArgs>)RecommenderComboBoxOnSelectedIndexChanged, sender, e); return; } 168 if (recommenderComboBox.SelectedIndex < 0) return; 169 Content.AlgorithmInstanceRecommender = (IAlgorithmInstanceRecommender)recommenderComboBox.SelectedItem; 170 recommenderViewHost.Content = Content.AlgorithmInstanceRecommender; 171 Content.UpdateSuggestions(); 172 } 173 174 private void button1_Click(object sender, EventArgs e) { 175 Content.UpdateSuggestions(); 176 } 139 177 } 140 178 }
Note: See TracChangeset
for help on using the changeset viewer.