- Timestamp:
- 03/30/11 23:19:13 (14 years ago)
- Location:
- branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyAlgorithm.cs
r5640 r5900 25 25 using HeuristicLab.Optimization; 26 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.PluginInfrastructure; 27 28 28 29 namespace HeuristicLab.Clients.OKB.RunCreation { 29 30 [Item("Empty Algorithm", "A dummy algorithm which serves as a placeholder and cannot be executed.")] 30 31 [StorableClass] 32 [NonDiscoverableType] 31 33 public sealed class EmptyAlgorithm : HeuristicLab.Optimization.Algorithm { 32 34 private string exceptionMessage; -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyEvaluator.cs
r5640 r5900 26 26 using HeuristicLab.Optimization; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.PluginInfrastructure; 28 29 29 30 namespace HeuristicLab.Clients.OKB.RunCreation { 30 31 [Item("EmptyEvaluator", "A dummy evaluator which throws an exception when executed.")] 31 32 [StorableClass] 33 [NonDiscoverableType] 32 34 public sealed class EmptyEvaluator : Operator, IEvaluator { 33 35 private string exceptionMessage; -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyMultiObjectiveEvaluator.cs
r5640 r5900 28 28 using HeuristicLab.Parameters; 29 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 using HeuristicLab.PluginInfrastructure; 30 31 31 32 namespace HeuristicLab.Clients.OKB.RunCreation { 32 33 [Item("EmptyMultiObjectiveEvaluator", "A dummy multi-objective evaluator which throws an exception when executed.")] 33 34 [StorableClass] 35 [NonDiscoverableType] 34 36 public sealed class EmptyMultiObjectiveEvaluator : Operator, IMultiObjectiveEvaluator { 35 37 private string exceptionMessage; -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyMultiObjectiveProblem.cs
r5640 r5900 24 24 using HeuristicLab.Optimization; 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.PluginInfrastructure; 26 27 27 28 namespace HeuristicLab.Clients.OKB.RunCreation { 28 29 [Item("Empty Multi-Objective Problem", "A dummy multi-objective problem which serves as a placeholder and cannot be solved.")] 29 30 [StorableClass] 30 public sealed class EmptyMultiObjectiveProblem : MultiObjectiveProblem<EmptyMultiObjectiveEvaluator, EmptySolutionCreator> { 31 [NonDiscoverableType] 32 public sealed class EmptyMultiObjectiveProblem : MultiObjectiveHeuristicOptimizationProblem<EmptyMultiObjectiveEvaluator, EmptySolutionCreator> { 31 33 public override bool CanChangeName { 32 34 get { return false; } … … 39 41 private EmptyMultiObjectiveProblem(bool deserializing) : base(deserializing) { } 40 42 private EmptyMultiObjectiveProblem(EmptyMultiObjectiveProblem original, Cloner cloner) : base(original, cloner) { } 41 public EmptyMultiObjectiveProblem() 42 : base() { 43 SolutionCreator = new EmptySolutionCreator(); 44 Evaluator = new EmptyMultiObjectiveEvaluator(); 45 } 46 public EmptyMultiObjectiveProblem(string exceptionMessage) 47 : base() { 48 SolutionCreator = new EmptySolutionCreator(exceptionMessage); 49 Evaluator = new EmptyMultiObjectiveEvaluator(exceptionMessage); 50 } 43 public EmptyMultiObjectiveProblem() : base(new EmptyMultiObjectiveEvaluator(), new EmptySolutionCreator()) { } 44 public EmptyMultiObjectiveProblem(string exceptionMessage) : base(new EmptyMultiObjectiveEvaluator(exceptionMessage), new EmptySolutionCreator(exceptionMessage)) { } 51 45 52 46 public override IDeepCloneable Clone(Cloner cloner) { -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyProblem.cs
r5640 r5900 24 24 using HeuristicLab.Optimization; 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.PluginInfrastructure; 26 27 27 28 namespace HeuristicLab.Clients.OKB.RunCreation { 28 29 [Item("Empty Problem", "A dummy problem which serves as a placeholder and cannot be solved.")] 29 30 [StorableClass] 30 public sealed class EmptyProblem : Problem<EmptyEvaluator, EmptySolutionCreator> { 31 [NonDiscoverableType] 32 public sealed class EmptyProblem : HeuristicOptimizationProblem<EmptyEvaluator, EmptySolutionCreator> { 31 33 public override bool CanChangeName { 32 34 get { return false; } -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptySingleObjectiveEvaluator.cs
r5640 r5900 27 27 using HeuristicLab.Parameters; 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.PluginInfrastructure; 29 30 30 31 namespace HeuristicLab.Clients.OKB.RunCreation { 31 32 [Item("EmptySingleObjectiveEvaluator", "A dummy single-objective evaluator which throws an exception when executed.")] 32 33 [StorableClass] 34 [NonDiscoverableType] 33 35 public sealed class EmptySingleObjectiveEvaluator : Operator, ISingleObjectiveEvaluator { 34 36 private string exceptionMessage; -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptySingleObjectiveProblem.cs
r5640 r5900 24 24 using HeuristicLab.Optimization; 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.PluginInfrastructure; 26 27 27 28 namespace HeuristicLab.Clients.OKB.RunCreation { 28 29 [Item("Empty Single-Objective Problem", "A dummy single-objective problem which serves as a placeholder and cannot be solved.")] 29 30 [StorableClass] 30 public sealed class EmptySingleObjectiveProblem : SingleObjectiveProblem<EmptySingleObjectiveEvaluator, EmptySolutionCreator> { 31 [NonDiscoverableType] 32 public sealed class EmptySingleObjectiveProblem : SingleObjectiveHeuristicOptimizationProblem<EmptySingleObjectiveEvaluator, EmptySolutionCreator> { 31 33 public override bool CanChangeName { 32 34 get { return false; } … … 39 41 private EmptySingleObjectiveProblem(bool deserializing) : base(deserializing) { } 40 42 private EmptySingleObjectiveProblem(EmptySingleObjectiveProblem original, Cloner cloner) : base(original, cloner) { } 41 public EmptySingleObjectiveProblem() 42 : base() { 43 SolutionCreator = new EmptySolutionCreator(); 44 Evaluator = new EmptySingleObjectiveEvaluator(); 45 } 46 public EmptySingleObjectiveProblem(string exceptionMessage) 47 : base() { 48 SolutionCreator = new EmptySolutionCreator(exceptionMessage); 49 Evaluator = new EmptySingleObjectiveEvaluator(exceptionMessage); 50 } 43 public EmptySingleObjectiveProblem() : base(new EmptySingleObjectiveEvaluator(), new EmptySolutionCreator()) { } 44 public EmptySingleObjectiveProblem(string exceptionMessage) : base(new EmptySingleObjectiveEvaluator(exceptionMessage), new EmptySolutionCreator(exceptionMessage)) { } 51 45 52 46 public override IDeepCloneable Clone(Cloner cloner) { -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptySolutionCreator.cs
r5640 r5900 26 26 using HeuristicLab.Optimization; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.PluginInfrastructure; 28 29 29 30 namespace HeuristicLab.Clients.OKB.RunCreation { 30 31 [Item("EmptySolutionCreator", "A dummy solution creator which throws an exception when executed.")] 31 32 [StorableClass] 33 [NonDiscoverableType] 32 34 public sealed class EmptySolutionCreator : Operator, ISolutionCreator { 33 35 private string exceptionMessage; -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/ItemWrapper.cs
r5640 r5900 25 25 using HeuristicLab.Core; 26 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.PluginInfrastructure; 27 28 28 29 namespace HeuristicLab.Clients.OKB.RunCreation { 29 30 [Item("ItemWrapper", "A wrapper which wraps an IItem.")] 30 31 [StorableClass] 32 [NonDiscoverableType] 31 33 public class ItemWrapper<T> : IItem where T : class, IItem { 32 34 private T wrappedItem; -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/MultiObjectiveOKBProblem.cs
r5640 r5900 30 30 [Creatable("Optimization Knowledge Base (OKB)")] 31 31 [StorableClass] 32 public sealed class MultiObjectiveOKBProblem : OKBProblem, IMultiObjective Problem, IStorableContent {32 public sealed class MultiObjectiveOKBProblem : OKBProblem, IMultiObjectiveHeuristicOptimizationProblem, IStorableContent { 33 33 public string Filename { get; set; } 34 34 35 35 public override Type ProblemType { 36 get { return typeof(IMultiObjective Problem); }36 get { return typeof(IMultiObjectiveHeuristicOptimizationProblem); } 37 37 } 38 public new IMultiObjective Problem Problem {39 get { return base.Problem as IMultiObjective Problem; }38 public new IMultiObjectiveHeuristicOptimizationProblem Problem { 39 get { return base.Problem as IMultiObjectiveHeuristicOptimizationProblem; } 40 40 } 41 41 public IParameter MaximizationParameter { -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/NamedItemWrapper.cs
r5640 r5900 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.PluginInfrastructure; 26 27 27 28 namespace HeuristicLab.Clients.OKB.RunCreation { 28 29 [Item("NamedItemWrapper", "A wrapper which wraps an INamedItem.")] 29 30 [StorableClass] 31 [NonDiscoverableType] 30 32 public class NamedItemWrapper<T> : ItemWrapper<T>, INamedItem where T : class, INamedItem { 31 33 protected override T WrappedItem { -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBProblem.cs
r5667 r5900 33 33 [Item("OKB Problem", "A base class for problems which are stored in the OKB.")] 34 34 [StorableClass] 35 public abstract class OKBProblem : Item, I Problem {35 public abstract class OKBProblem : Item, IHeuristicOptimizationProblem { 36 36 public virtual Type ProblemType { 37 get { return typeof(I Problem); }37 get { return typeof(IHeuristicOptimizationProblem); } 38 38 } 39 39 private long problemId; … … 41 41 get { return problemId; } 42 42 } 43 private I Problem problem;44 protected I Problem Problem {43 private IHeuristicOptimizationProblem problem; 44 protected IHeuristicOptimizationProblem Problem { 45 45 get { return problem; } 46 46 private set { … … 114 114 } 115 115 [Storable(Name = "Problem")] 116 private I Problem StorableProblem {116 private IHeuristicOptimizationProblem StorableProblem { 117 117 get { return problem; } 118 118 set { … … 131 131 RegisterProblemEvents(); 132 132 } 133 protected OKBProblem(I Problem initialProblem)133 protected OKBProblem(IHeuristicOptimizationProblem initialProblem) 134 134 : base() { 135 135 if (initialProblem == null) throw new ArgumentNullException("initialProblem", "Initial problem cannot be null."); … … 141 141 public void Load(long problemId) { 142 142 if (this.problemId != problemId) { 143 I Problem problem;143 IHeuristicOptimizationProblem problem; 144 144 byte[] problemData = RunCreationClient.GetProblemData(problemId); 145 145 using (MemoryStream stream = new MemoryStream(problemData)) { 146 problem = XmlParser.Deserialize<I Problem>(stream);146 problem = XmlParser.Deserialize<IHeuristicOptimizationProblem>(stream); 147 147 } 148 148 if (ProblemType.IsAssignableFrom(problem.GetType())) { -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/SingleObjectiveOKBProblem.cs
r5640 r5900 30 30 [Creatable("Optimization Knowledge Base (OKB)")] 31 31 [StorableClass] 32 public sealed class SingleObjectiveOKBProblem : OKBProblem, ISingleObjective Problem, IStorableContent {32 public sealed class SingleObjectiveOKBProblem : OKBProblem, ISingleObjectiveHeuristicOptimizationProblem, IStorableContent { 33 33 public string Filename { get; set; } 34 34 35 35 public override Type ProblemType { 36 get { return typeof(ISingleObjective Problem); }36 get { return typeof(ISingleObjectiveHeuristicOptimizationProblem); } 37 37 } 38 public new ISingleObjective Problem Problem {39 get { return base.Problem as ISingleObjective Problem; }38 public new ISingleObjectiveHeuristicOptimizationProblem Problem { 39 get { return base.Problem as ISingleObjectiveHeuristicOptimizationProblem; } 40 40 } 41 41 public IParameter BestKnownQualityParameter { -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBAlgorithmView.Designer.cs
r5667 r5900 71 71 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 72 72 this.nameTextBox.Location = new System.Drawing.Point(72, 29); 73 this.nameTextBox.Size = new System.Drawing.Size( 607, 20);73 this.nameTextBox.Size = new System.Drawing.Size(577, 20); 74 74 this.nameTextBox.TabIndex = 5; 75 75 // … … 79 79 this.nameLabel.TabIndex = 4; 80 80 // 81 // descriptionLabel 82 // 83 this.descriptionLabel.Location = new System.Drawing.Point(3, 58); 84 this.descriptionLabel.TabIndex = 6; 85 // 86 // descriptionTextBox 87 // 88 this.descriptionTextBox.Location = new System.Drawing.Point(72, 55); 89 this.descriptionTextBox.Size = new System.Drawing.Size(607, 20); 90 this.descriptionTextBox.TabIndex = 7; 81 // infoLabel 82 // 83 this.infoLabel.Location = new System.Drawing.Point(659, 32); 84 this.infoLabel.TabIndex = 6; 91 85 // 92 86 // tabControl … … 100 94 this.tabControl.Controls.Add(this.resultsTabPage); 101 95 this.tabControl.Controls.Add(this.runsTabPage); 102 this.tabControl.Location = new System.Drawing.Point(0, 81);96 this.tabControl.Location = new System.Drawing.Point(0, 55); 103 97 this.tabControl.Name = "tabControl"; 104 98 this.tabControl.SelectedIndex = 0; 105 this.tabControl.Size = new System.Drawing.Size(679, 3 71);106 this.tabControl.TabIndex = 8;99 this.tabControl.Size = new System.Drawing.Size(679, 397); 100 this.tabControl.TabIndex = 7; 107 101 // 108 102 // problemTabPage … … 115 109 this.problemTabPage.Name = "problemTabPage"; 116 110 this.problemTabPage.Padding = new System.Windows.Forms.Padding(3); 117 this.problemTabPage.Size = new System.Drawing.Size(671, 3 45);111 this.problemTabPage.Size = new System.Drawing.Size(671, 371); 118 112 this.problemTabPage.TabIndex = 0; 119 113 this.problemTabPage.Text = "Problem"; … … 134 128 this.problemViewHost.Name = "problemViewHost"; 135 129 this.problemViewHost.ReadOnly = false; 136 this.problemViewHost.Size = new System.Drawing.Size(659, 3 03);130 this.problemViewHost.Size = new System.Drawing.Size(659, 329); 137 131 this.problemViewHost.TabIndex = 3; 138 132 this.problemViewHost.ViewsLabelVisible = true; … … 257 251 this.startButton.Name = "startButton"; 258 252 this.startButton.Size = new System.Drawing.Size(24, 24); 259 this.startButton.TabIndex = 9;253 this.startButton.TabIndex = 8; 260 254 this.toolTip.SetToolTip(this.startButton, "Start/Resume Algorithm"); 261 255 this.startButton.UseVisualStyleBackColor = true; … … 269 263 this.pauseButton.Name = "pauseButton"; 270 264 this.pauseButton.Size = new System.Drawing.Size(24, 24); 271 this.pauseButton.TabIndex = 10;265 this.pauseButton.TabIndex = 9; 272 266 this.toolTip.SetToolTip(this.pauseButton, "Pause Algorithm"); 273 267 this.pauseButton.UseVisualStyleBackColor = true; … … 281 275 this.resetButton.Name = "resetButton"; 282 276 this.resetButton.Size = new System.Drawing.Size(24, 24); 283 this.resetButton.TabIndex = 1 2;277 this.resetButton.TabIndex = 11; 284 278 this.toolTip.SetToolTip(this.resetButton, "Reset Algorithm"); 285 279 this.resetButton.UseVisualStyleBackColor = true; … … 293 287 this.executionTimeLabel.Name = "executionTimeLabel"; 294 288 this.executionTimeLabel.Size = new System.Drawing.Size(83, 13); 295 this.executionTimeLabel.TabIndex = 1 3;289 this.executionTimeLabel.TabIndex = 12; 296 290 this.executionTimeLabel.Text = "&Execution Time:"; 297 291 // … … 303 297 this.executionTimeTextBox.ReadOnly = true; 304 298 this.executionTimeTextBox.Size = new System.Drawing.Size(137, 20); 305 this.executionTimeTextBox.TabIndex = 1 4;299 this.executionTimeTextBox.TabIndex = 13; 306 300 // 307 301 // openFileDialog … … 319 313 this.stopButton.Name = "stopButton"; 320 314 this.stopButton.Size = new System.Drawing.Size(24, 24); 321 this.stopButton.TabIndex = 1 1;315 this.stopButton.TabIndex = 10; 322 316 this.toolTip.SetToolTip(this.stopButton, "Stop Algorithm"); 323 317 this.stopButton.UseVisualStyleBackColor = true; … … 386 380 this.Name = "OKBAlgorithmView"; 387 381 this.Size = new System.Drawing.Size(679, 482); 382 this.Controls.SetChildIndex(this.infoLabel, 0); 388 383 this.Controls.SetChildIndex(this.resetButton, 0); 389 384 this.Controls.SetChildIndex(this.stopButton, 0); 390 385 this.Controls.SetChildIndex(this.executionTimeLabel, 0); 391 386 this.Controls.SetChildIndex(this.nameLabel, 0); 392 this.Controls.SetChildIndex(this.descriptionLabel, 0);393 387 this.Controls.SetChildIndex(this.executionTimeTextBox, 0); 394 this.Controls.SetChildIndex(this.descriptionTextBox, 0);395 388 this.Controls.SetChildIndex(this.pauseButton, 0); 396 389 this.Controls.SetChildIndex(this.nameTextBox, 0); -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBProblemView.Designer.cs
r5660 r5900 53 53 this.SuspendLayout(); 54 54 // 55 // parameterCollectionView56 //57 this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)58 | System.Windows.Forms.AnchorStyles.Left)59 | System.Windows.Forms.AnchorStyles.Right)));60 this.parameterCollectionView.Content = null;61 this.parameterCollectionView.Location = new System.Drawing.Point(0, 79);62 this.parameterCollectionView.Name = "parameterCollectionView";63 this.parameterCollectionView.Size = new System.Drawing.Size(706, 314);64 this.parameterCollectionView.TabIndex = 8;65 //66 55 // nameTextBox 67 56 // … … 69 58 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 70 59 this.nameTextBox.Location = new System.Drawing.Point(72, 27); 71 this.nameTextBox.Size = new System.Drawing.Size(6 34, 20);60 this.nameTextBox.Size = new System.Drawing.Size(604, 20); 72 61 this.nameTextBox.TabIndex = 5; 73 62 // … … 77 66 this.nameLabel.TabIndex = 4; 78 67 // 79 // descriptionLabel68 // infoLabel 80 69 // 81 this.descriptionLabel.Location = new System.Drawing.Point(3, 56); 82 this.descriptionLabel.TabIndex = 6; 83 // 84 // descriptionTextBox 85 // 86 this.descriptionTextBox.Location = new System.Drawing.Point(72, 53); 87 this.descriptionTextBox.Size = new System.Drawing.Size(634, 20); 88 this.descriptionTextBox.TabIndex = 7; 70 this.infoLabel.Location = new System.Drawing.Point(687, 30); 71 this.infoLabel.TabIndex = 6; 89 72 // 90 73 // problemComboBox … … 133 116 this.cloneProblemButton.Click += new System.EventHandler(this.cloneProblemButton_Click); 134 117 // 118 // parameterCollectionView 119 // 120 this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 121 | System.Windows.Forms.AnchorStyles.Left) 122 | System.Windows.Forms.AnchorStyles.Right))); 123 this.parameterCollectionView.Caption = "ParameterCollection View"; 124 this.parameterCollectionView.Content = null; 125 this.parameterCollectionView.Location = new System.Drawing.Point(0, 53); 126 this.parameterCollectionView.Name = "parameterCollectionView"; 127 this.parameterCollectionView.ReadOnly = false; 128 this.parameterCollectionView.Size = new System.Drawing.Size(706, 340); 129 this.parameterCollectionView.TabIndex = 7; 130 // 135 131 // OKBProblemView 136 132 // … … 138 134 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 139 135 this.Controls.Add(this.problemComboBox); 136 this.Controls.Add(this.parameterCollectionView); 140 137 this.Controls.Add(this.problemLabel); 141 138 this.Controls.Add(this.cloneProblemButton); 142 139 this.Controls.Add(this.refreshButton); 143 this.Controls.Add(this.parameterCollectionView);144 140 this.Name = "OKBProblemView"; 145 141 this.Size = new System.Drawing.Size(706, 393); … … 147 143 this.Controls.SetChildIndex(this.cloneProblemButton, 0); 148 144 this.Controls.SetChildIndex(this.problemLabel, 0); 149 this.Controls.SetChildIndex(this.descriptionLabel, 0);150 145 this.Controls.SetChildIndex(this.parameterCollectionView, 0); 151 146 this.Controls.SetChildIndex(this.nameTextBox, 0); 152 this.Controls.SetChildIndex(this.descriptionTextBox, 0);153 147 this.Controls.SetChildIndex(this.nameLabel, 0); 148 this.Controls.SetChildIndex(this.infoLabel, 0); 154 149 this.Controls.SetChildIndex(this.problemComboBox, 0); 155 150 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
Note: See TracChangeset
for help on using the changeset viewer.