Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1222


Ignore:
Timestamp:
02/24/09 00:58:23 (15 years ago)
Author:
abeham
Message:

Updated ES to uniformly distributed initialization of strategy vector #495
Fixed Plus/Comma display bug on load #491
Removed some unnecessary references
Added necessary reference to RealVector

Location:
trunk/sources/HeuristicLab.ES
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.ES/ES.cs

    r1091 r1222  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Text;
    2524using System.Xml;
    2625using HeuristicLab.Core;
    2726using HeuristicLab.Data;
    28 using HeuristicLab.SequentialEngine;
    2927using HeuristicLab.Operators;
    3028using HeuristicLab.Random;
    3129using HeuristicLab.Logging;
    3230using HeuristicLab.Selection;
    33 using HeuristicLab.Selection.OffspringSelection;
    34 using HeuristicLab.Evolutionary;
     31using HeuristicLab.RealVector;
    3532
    3633namespace HeuristicLab.ES {
     
    132129      vi.AddVariable(new Variable("EvaluatedSolutions", new IntData()));
    133130      vi.AddVariable(new Variable("PlusNotation", new BoolData(true)));
     131      vi.AddVariable(new Variable("ProblemDimension", new IntData(1)));
     132      vi.AddVariable(new Variable("ShakingFactorsMin", new DoubleData(0.1)));
     133      vi.AddVariable(new Variable("ShakingFactorsMax", new DoubleData(5.0)));
    134134      vi.AddVariable(new Variable("Generations", new IntData()));
    135135      vi.AddVariable(new Variable("MaximumGenerations", new IntData(1000)));
    136       vi.AddVariable(new Variable("GeneralLearningRate", new DoubleData(0.1)));
    137       vi.AddVariable(new Variable("LearningRate", new DoubleData(0.1)));
     136      vi.AddVariable(new Variable("GeneralLearningRate", new DoubleData(1.0 / Math.Sqrt(2))));
     137      vi.AddVariable(new Variable("LearningRate", new DoubleData(1.0 / Math.Sqrt(2))));
    138138      op.OperatorGraph.AddOperator(vi);
    139139      sp.AddSubOperator(vi);
     
    177177      sp2.AddSubOperator(c);
    178178
    179       VariableInjector vi = new VariableInjector();
    180       vi.AddVariable(new Variable("ShakingFactors", new DoubleArrayData(new double[] { 5.0 })));
    181       op.OperatorGraph.AddOperator(vi);
    182       sp2.AddSubOperator(vi);
     179      UniformRandomRealVectorGenerator urrvg = new UniformRandomRealVectorGenerator();
     180      urrvg.GetVariableInfo("Length").ActualName = "ProblemDimension";
     181      urrvg.GetVariableInfo("Minimum").ActualName = "ShakingFactorsMin";
     182      urrvg.GetVariableInfo("Maximum").ActualName = "ShakingFactorsMax";
     183      urrvg.GetVariableInfo("RealVector").ActualName = "ShakingFactors";
     184      op.OperatorGraph.AddOperator(urrvg);
     185      sp2.AddSubOperator(urrvg);
    183186
    184187      Sorter s = new Sorter();
     
    456459      }
    457460    }
    458     private DoubleArrayData myShakingFactors;
    459     /// <summary>
    460     /// Gets or sets the initial strategy vector s(0).
     461    private IntData myProblemDimension;
     462    /// <summary>
     463    /// Gets or sets the problem dimension which determines the length of the strategy vector.
    461464    /// </summary>
    462465    /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ItemBase"/>
    463466    /// in the setter.</remarks>
    464     public double[] ShakingFactors {
    465       get { return myShakingFactors.Data; }
    466       set { myShakingFactors.Data = value; }
     467    public int ProblemDimension {
     468      get { return myProblemDimension.Data; }
     469      set { myProblemDimension.Data = value; }
     470    }
     471    private DoubleData myShakingFactorsMin;
     472    /// <summary>
     473    /// Gets or sets the minimal value for each dimension of the strategy vector.
     474    /// </summary>
     475    /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ItemBase"/>
     476    /// in the setter.</remarks>
     477    public double ShakingFactorsMin {
     478      get { return myShakingFactorsMin.Data; }
     479      set {
     480        myShakingFactorsMin.Data = value;
     481        OnChanged();
     482      }
     483    }
     484    private DoubleData myShakingFactorsMax;
     485    /// <summary>
     486    /// Gets or sets the maximal value for each dimension of the strategy vector.
     487    /// </summary>
     488    /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ItemBase"/>
     489    /// in the setter.</remarks>
     490    public double ShakingFactorsMax {
     491      get { return myShakingFactorsMax.Data; }
     492      set {
     493        myShakingFactorsMax.Data = value;
     494        OnChanged();
     495      }
    467496    }
    468497    private DoubleData myGeneralLearningRate;
     
    633662      myMaximumGenerations = vi.GetVariable("MaximumGenerations").GetValue<IntData>();
    634663      myPlusNotation = vi.GetVariable("PlusNotation").GetValue<BoolData>();
     664      myProblemDimension = vi.GetVariable("ProblemDimension").GetValue<IntData>();
     665      myShakingFactorsMin = vi.GetVariable("ShakingFactorsMin").GetValue<DoubleData>();
     666      myShakingFactorsMax = vi.GetVariable("ShakingFactorsMax").GetValue<DoubleData>();
    635667      myGeneralLearningRate = vi.GetVariable("GeneralLearningRate").GetValue<DoubleData>();
    636668      myLearningRate = vi.GetVariable("LearningRate").GetValue<DoubleData>();
     
    638670      CombinedOperator co3 = (CombinedOperator)sp1.SubOperators[1];
    639671      myPopulationInitialization = co3;
    640       // Variable Injector
    641       VariableInjector vi2 = (VariableInjector)co3.OperatorGraph.InitialOperator.SubOperators[1].SubOperators[0].SubOperators[3];
    642       myShakingFactors = vi2.GetVariable("ShakingFactors").GetValue<DoubleArrayData>();
    643672      // ES Main
    644673      CombinedOperator co4 = (CombinedOperator)sp1.SubOperators[2];
  • trunk/sources/HeuristicLab.ES/ESEditor.Designer.cs

    r1112 r1222  
    5151      this.tabControl = new System.Windows.Forms.TabControl();
    5252      this.parametersTabPage = new System.Windows.Forms.TabPage();
     53      this.leftBracketLabelRight = new System.Windows.Forms.Label();
     54      this.semicolonLabel = new System.Windows.Forms.Label();
     55      this.leftBracketLabelLeft = new System.Windows.Forms.Label();
     56      this.shakingFactorsUpperBoundTextBox = new System.Windows.Forms.TextBox();
    5357      this.successRuleGroupBox = new System.Windows.Forms.GroupBox();
    5458      this.learningRateTextBox = new System.Windows.Forms.TextBox();
    55       this.label1 = new System.Windows.Forms.Label();
     59      this.learningRateLabel = new System.Windows.Forms.Label();
    5660      this.generalLearningRateTextBox = new System.Windows.Forms.TextBox();
    57       this.targetSuccessRateLabel = new System.Windows.Forms.Label();
    58       this.label8 = new System.Windows.Forms.Label();
    59       this.label7 = new System.Windows.Forms.Label();
     61      this.generalLearningRateLabel = new System.Windows.Forms.Label();
     62      this.learningRateVariableNameLabel = new System.Windows.Forms.Label();
     63      this.generalLearningRateVariableNameLabel = new System.Windows.Forms.Label();
    6064      this.parentSelectionGroupBox = new System.Windows.Forms.GroupBox();
    6165      this.commaRadioButton = new System.Windows.Forms.RadioButton();
     
    8185      this.setRandomSeedRandomlyCheckBox = new System.Windows.Forms.CheckBox();
    8286      this.problemDimensionTextBox = new System.Windows.Forms.TextBox();
    83       this.initialMutationStrengthVectorTextBox = new System.Windows.Forms.TextBox();
     87      this.shakingFactorsLowerBoundTextBox = new System.Windows.Forms.TextBox();
    8488      this.evaluationLabel = new System.Windows.Forms.Label();
    8589      this.mutationLabel = new System.Windows.Forms.Label();
     
    8791      this.problemInitializationLabel = new System.Windows.Forms.Label();
    8892      this.problemDimensionLabel = new System.Windows.Forms.Label();
    89       this.initialMutationStrengthLabel = new System.Windows.Forms.Label();
     93      this.mutationStrengthLabel = new System.Windows.Forms.Label();
    9094      this.mutationRateLabel = new System.Windows.Forms.Label();
    9195      this.maximumGenerationsTextBox = new System.Windows.Forms.TextBox();
     
    9599      this.setRandomSeedRandomlyLabel = new System.Windows.Forms.Label();
    96100      this.randomSeedLabel = new System.Windows.Forms.Label();
    97       this.label6 = new System.Windows.Forms.Label();
    98       this.label5 = new System.Windows.Forms.Label();
    99       this.label4 = new System.Windows.Forms.Label();
    100       this.label3 = new System.Windows.Forms.Label();
    101       this.label2 = new System.Windows.Forms.Label();
     101      this.problemDimensionVariableNameLabel = new System.Windows.Forms.Label();
     102      this.shakingFactorsVariableNameLabel = new System.Windows.Forms.Label();
     103      this.maximumGenerationsVariableNameLabel = new System.Windows.Forms.Label();
     104      this.esLambdaVariableNameLabel = new System.Windows.Forms.Label();
     105      this.esRhoVariableNameLabel = new System.Windows.Forms.Label();
     106      this.esMuVariableNameLabel = new System.Windows.Forms.Label();
    102107      this.populationSizeLabel = new System.Windows.Forms.Label();
    103108      this.lambdaTextBox = new System.Windows.Forms.TextBox();
     
    141146      // parametersTabPage
    142147      //
     148      this.parametersTabPage.Controls.Add(this.leftBracketLabelRight);
     149      this.parametersTabPage.Controls.Add(this.semicolonLabel);
     150      this.parametersTabPage.Controls.Add(this.leftBracketLabelLeft);
     151      this.parametersTabPage.Controls.Add(this.shakingFactorsUpperBoundTextBox);
    143152      this.parametersTabPage.Controls.Add(this.successRuleGroupBox);
    144153      this.parametersTabPage.Controls.Add(this.parentSelectionGroupBox);
     
    163172      this.parametersTabPage.Controls.Add(this.setRandomSeedRandomlyCheckBox);
    164173      this.parametersTabPage.Controls.Add(this.problemDimensionTextBox);
    165       this.parametersTabPage.Controls.Add(this.initialMutationStrengthVectorTextBox);
     174      this.parametersTabPage.Controls.Add(this.shakingFactorsLowerBoundTextBox);
    166175      this.parametersTabPage.Controls.Add(this.evaluationLabel);
    167176      this.parametersTabPage.Controls.Add(this.mutationLabel);
     
    169178      this.parametersTabPage.Controls.Add(this.problemInitializationLabel);
    170179      this.parametersTabPage.Controls.Add(this.problemDimensionLabel);
    171       this.parametersTabPage.Controls.Add(this.initialMutationStrengthLabel);
     180      this.parametersTabPage.Controls.Add(this.mutationStrengthLabel);
    172181      this.parametersTabPage.Controls.Add(this.mutationRateLabel);
    173182      this.parametersTabPage.Controls.Add(this.maximumGenerationsTextBox);
     
    177186      this.parametersTabPage.Controls.Add(this.setRandomSeedRandomlyLabel);
    178187      this.parametersTabPage.Controls.Add(this.randomSeedLabel);
    179       this.parametersTabPage.Controls.Add(this.label6);
    180       this.parametersTabPage.Controls.Add(this.label5);
    181       this.parametersTabPage.Controls.Add(this.label4);
    182       this.parametersTabPage.Controls.Add(this.label3);
    183       this.parametersTabPage.Controls.Add(this.label2);
     188      this.parametersTabPage.Controls.Add(this.problemDimensionVariableNameLabel);
     189      this.parametersTabPage.Controls.Add(this.shakingFactorsVariableNameLabel);
     190      this.parametersTabPage.Controls.Add(this.maximumGenerationsVariableNameLabel);
     191      this.parametersTabPage.Controls.Add(this.esLambdaVariableNameLabel);
     192      this.parametersTabPage.Controls.Add(this.esRhoVariableNameLabel);
     193      this.parametersTabPage.Controls.Add(this.esMuVariableNameLabel);
    184194      this.parametersTabPage.Controls.Add(this.populationSizeLabel);
    185195      this.parametersTabPage.Controls.Add(this.lambdaTextBox);
     
    192202      this.parametersTabPage.UseVisualStyleBackColor = true;
    193203      //
     204      // leftBracketLabelRight
     205      //
     206      this.leftBracketLabelRight.Anchor = System.Windows.Forms.AnchorStyles.None;
     207      this.leftBracketLabelRight.AutoSize = true;
     208      this.leftBracketLabelRight.Location = new System.Drawing.Point(344, 175);
     209      this.leftBracketLabelRight.Name = "leftBracketLabelRight";
     210      this.leftBracketLabelRight.Size = new System.Drawing.Size(10, 13);
     211      this.leftBracketLabelRight.TabIndex = 21;
     212      this.leftBracketLabelRight.Text = "[";
     213      //
     214      // semicolonLabel
     215      //
     216      this.semicolonLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
     217      this.semicolonLabel.AutoSize = true;
     218      this.semicolonLabel.Location = new System.Drawing.Point(254, 175);
     219      this.semicolonLabel.Name = "semicolonLabel";
     220      this.semicolonLabel.Size = new System.Drawing.Size(10, 13);
     221      this.semicolonLabel.TabIndex = 19;
     222      this.semicolonLabel.Text = ";";
     223      //
     224      // leftBracketLabelLeft
     225      //
     226      this.leftBracketLabelLeft.Anchor = System.Windows.Forms.AnchorStyles.None;
     227      this.leftBracketLabelLeft.AutoSize = true;
     228      this.leftBracketLabelLeft.Location = new System.Drawing.Point(165, 175);
     229      this.leftBracketLabelLeft.Name = "leftBracketLabelLeft";
     230      this.leftBracketLabelLeft.Size = new System.Drawing.Size(10, 13);
     231      this.leftBracketLabelLeft.TabIndex = 17;
     232      this.leftBracketLabelLeft.Text = "[";
     233      //
     234      // shakingFactorsUpperBoundTextBox
     235      //
     236      this.shakingFactorsUpperBoundTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
     237      this.shakingFactorsUpperBoundTextBox.Location = new System.Drawing.Point(273, 172);
     238      this.shakingFactorsUpperBoundTextBox.Name = "shakingFactorsUpperBoundTextBox";
     239      this.shakingFactorsUpperBoundTextBox.Size = new System.Drawing.Size(65, 20);
     240      this.shakingFactorsUpperBoundTextBox.TabIndex = 20;
     241      this.toolTip.SetToolTip(this.shakingFactorsUpperBoundTextBox, resources.GetString("shakingFactorsUpperBoundTextBox.ToolTip"));
     242      //
    194243      // successRuleGroupBox
    195244      //
    196245      this.successRuleGroupBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    197246      this.successRuleGroupBox.Controls.Add(this.learningRateTextBox);
    198       this.successRuleGroupBox.Controls.Add(this.label1);
     247      this.successRuleGroupBox.Controls.Add(this.learningRateLabel);
    199248      this.successRuleGroupBox.Controls.Add(this.generalLearningRateTextBox);
    200       this.successRuleGroupBox.Controls.Add(this.targetSuccessRateLabel);
    201       this.successRuleGroupBox.Controls.Add(this.label8);
    202       this.successRuleGroupBox.Controls.Add(this.label7);
     249      this.successRuleGroupBox.Controls.Add(this.generalLearningRateLabel);
     250      this.successRuleGroupBox.Controls.Add(this.learningRateVariableNameLabel);
     251      this.successRuleGroupBox.Controls.Add(this.generalLearningRateVariableNameLabel);
    203252      this.successRuleGroupBox.Location = new System.Drawing.Point(9, 230);
    204253      this.successRuleGroupBox.Name = "successRuleGroupBox";
    205254      this.successRuleGroupBox.Size = new System.Drawing.Size(476, 74);
    206       this.successRuleGroupBox.TabIndex = 40;
     255      this.successRuleGroupBox.TabIndex = 26;
    207256      this.successRuleGroupBox.TabStop = false;
    208257      this.successRuleGroupBox.Text = "Mutation Strength Adjustment";
     
    214263      this.learningRateTextBox.Name = "learningRateTextBox";
    215264      this.learningRateTextBox.Size = new System.Drawing.Size(186, 20);
    216       this.learningRateTextBox.TabIndex = 17;
    217       this.toolTip.SetToolTip(this.learningRateTextBox, @"Automatically updates when Problem Dimension (dim) is changed.
    218 The used formula is: tau = 1 / Sqrt(2*Sqrt(dim))");
    219       //
    220       // label1
    221       //
    222       this.label1.Anchor = System.Windows.Forms.AnchorStyles.Top;
    223       this.label1.AutoSize = true;
    224       this.label1.Location = new System.Drawing.Point(7, 48);
    225       this.label1.Name = "label1";
    226       this.label1.Size = new System.Drawing.Size(92, 13);
    227       this.label1.TabIndex = 16;
    228       this.label1.Text = "Learning Rate (τ):";
     265      this.learningRateTextBox.TabIndex = 4;
     266      this.toolTip.SetToolTip(this.learningRateTextBox, "Automatically updates when Problem Dimension (dim) is changed.\r\nThe used formula " +
     267              "is: tau = 1 / Sqrt(2*Sqrt(dim))");
     268      //
     269      // learningRateLabel
     270      //
     271      this.learningRateLabel.Anchor = System.Windows.Forms.AnchorStyles.Top;
     272      this.learningRateLabel.AutoSize = true;
     273      this.learningRateLabel.Location = new System.Drawing.Point(7, 48);
     274      this.learningRateLabel.Name = "learningRateLabel";
     275      this.learningRateLabel.Size = new System.Drawing.Size(92, 13);
     276      this.learningRateLabel.TabIndex = 3;
     277      this.learningRateLabel.Text = "Learning Rate (τ):";
    229278      //
    230279      // generalLearningRateTextBox
     
    234283      this.generalLearningRateTextBox.Name = "generalLearningRateTextBox";
    235284      this.generalLearningRateTextBox.Size = new System.Drawing.Size(186, 20);
    236       this.generalLearningRateTextBox.TabIndex = 15;
    237       this.toolTip.SetToolTip(this.generalLearningRateTextBox, @"Automatically updates when Problem Dimension (dim) is changed.
    238 The used formula is: tau0 = 1 / Sqrt(2*dim)");
    239       //
    240       // targetSuccessRateLabel
    241       //
    242       this.targetSuccessRateLabel.Anchor = System.Windows.Forms.AnchorStyles.Top;
    243       this.targetSuccessRateLabel.AutoSize = true;
    244       this.targetSuccessRateLabel.Location = new System.Drawing.Point(7, 22);
    245       this.targetSuccessRateLabel.Name = "targetSuccessRateLabel";
    246       this.targetSuccessRateLabel.Size = new System.Drawing.Size(138, 13);
    247       this.targetSuccessRateLabel.TabIndex = 14;
    248       this.targetSuccessRateLabel.Text = "General Learning Rate (τ0):";
    249       //
    250       // label8
    251       //
    252       this.label8.Anchor = System.Windows.Forms.AnchorStyles.None;
    253       this.label8.AutoSize = true;
    254       this.label8.Location = new System.Drawing.Point(348, 48);
    255       this.label8.Name = "label8";
    256       this.label8.Size = new System.Drawing.Size(77, 13);
    257       this.label8.TabIndex = 4;
    258       this.label8.Text = "(LearningRate)";
    259       //
    260       // label7
    261       //
    262       this.label7.Anchor = System.Windows.Forms.AnchorStyles.None;
    263       this.label7.AutoSize = true;
    264       this.label7.Location = new System.Drawing.Point(348, 22);
    265       this.label7.Name = "label7";
    266       this.label7.Size = new System.Drawing.Size(114, 13);
    267       this.label7.TabIndex = 4;
    268       this.label7.Text = "(GeneralLearningRate)";
     285      this.generalLearningRateTextBox.TabIndex = 1;
     286      this.toolTip.SetToolTip(this.generalLearningRateTextBox, "Automatically updates when Problem Dimension (dim) is changed.\r\nThe used formula " +
     287              "is: tau0 = 1 / Sqrt(2*dim)");
     288      //
     289      // generalLearningRateLabel
     290      //
     291      this.generalLearningRateLabel.Anchor = System.Windows.Forms.AnchorStyles.Top;
     292      this.generalLearningRateLabel.AutoSize = true;
     293      this.generalLearningRateLabel.Location = new System.Drawing.Point(7, 22);
     294      this.generalLearningRateLabel.Name = "generalLearningRateLabel";
     295      this.generalLearningRateLabel.Size = new System.Drawing.Size(138, 13);
     296      this.generalLearningRateLabel.TabIndex = 0;
     297      this.generalLearningRateLabel.Text = "General Learning Rate (τ0):";
     298      //
     299      // learningRateVariableNameLabel
     300      //
     301      this.learningRateVariableNameLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
     302      this.learningRateVariableNameLabel.AutoSize = true;
     303      this.learningRateVariableNameLabel.Location = new System.Drawing.Point(348, 48);
     304      this.learningRateVariableNameLabel.Name = "learningRateVariableNameLabel";
     305      this.learningRateVariableNameLabel.Size = new System.Drawing.Size(77, 13);
     306      this.learningRateVariableNameLabel.TabIndex = 5;
     307      this.learningRateVariableNameLabel.Text = "(LearningRate)";
     308      //
     309      // generalLearningRateVariableNameLabel
     310      //
     311      this.generalLearningRateVariableNameLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
     312      this.generalLearningRateVariableNameLabel.AutoSize = true;
     313      this.generalLearningRateVariableNameLabel.Location = new System.Drawing.Point(348, 22);
     314      this.generalLearningRateVariableNameLabel.Name = "generalLearningRateVariableNameLabel";
     315      this.generalLearningRateVariableNameLabel.Size = new System.Drawing.Size(114, 13);
     316      this.generalLearningRateVariableNameLabel.TabIndex = 2;
     317      this.generalLearningRateVariableNameLabel.Text = "(GeneralLearningRate)";
    269318      //
    270319      // parentSelectionGroupBox
     
    276325      this.parentSelectionGroupBox.Name = "parentSelectionGroupBox";
    277326      this.parentSelectionGroupBox.Size = new System.Drawing.Size(186, 38);
    278       this.parentSelectionGroupBox.TabIndex = 39;
     327      this.parentSelectionGroupBox.TabIndex = 27;
    279328      this.parentSelectionGroupBox.TabStop = false;
    280329      this.parentSelectionGroupBox.Text = "Parent Selection";
     
    310359      this.setRecombinationButton.Name = "setRecombinationButton";
    311360      this.setRecombinationButton.Size = new System.Drawing.Size(43, 20);
    312       this.setRecombinationButton.TabIndex = 38;
     361      this.setRecombinationButton.TabIndex = 47;
    313362      this.setRecombinationButton.Text = "Set...";
    314363      this.setRecombinationButton.UseVisualStyleBackColor = true;
     
    321370      this.viewRecombinationButton.Name = "viewRecombinationButton";
    322371      this.viewRecombinationButton.Size = new System.Drawing.Size(53, 20);
    323       this.viewRecombinationButton.TabIndex = 37;
     372      this.viewRecombinationButton.TabIndex = 46;
    324373      this.viewRecombinationButton.Text = "View...";
    325374      this.viewRecombinationButton.UseVisualStyleBackColor = true;
     
    333382      this.recombinationTextBox.ReadOnly = true;
    334383      this.recombinationTextBox.Size = new System.Drawing.Size(186, 20);
    335       this.recombinationTextBox.TabIndex = 36;
     384      this.recombinationTextBox.TabIndex = 45;
    336385      //
    337386      // recombinationLabel
     
    342391      this.recombinationLabel.Name = "recombinationLabel";
    343392      this.recombinationLabel.Size = new System.Drawing.Size(81, 13);
    344       this.recombinationLabel.TabIndex = 35;
     393      this.recombinationLabel.TabIndex = 44;
    345394      this.recombinationLabel.Text = "Recombination:";
    346395      //
     
    351400      this.rhoTextBox.Name = "rhoTextBox";
    352401      this.rhoTextBox.Size = new System.Drawing.Size(186, 20);
    353       this.rhoTextBox.TabIndex = 7;
     402      this.rhoTextBox.TabIndex = 8;
    354403      //
    355404      // rhoLabel
     
    361410      this.rhoLabel.Name = "rhoLabel";
    362411      this.rhoLabel.Size = new System.Drawing.Size(45, 13);
    363       this.rhoLabel.TabIndex = 6;
     412      this.rhoLabel.TabIndex = 7;
    364413      this.rhoLabel.Text = "Rho (ρ):";
    365414      //
     
    370419      this.setEvaluationButton.Name = "setEvaluationButton";
    371420      this.setEvaluationButton.Size = new System.Drawing.Size(43, 20);
    372       this.setEvaluationButton.TabIndex = 34;
     421      this.setEvaluationButton.TabIndex = 43;
    373422      this.setEvaluationButton.Text = "Set...";
    374423      this.setEvaluationButton.UseVisualStyleBackColor = true;
     
    381430      this.setMutationButton.Name = "setMutationButton";
    382431      this.setMutationButton.Size = new System.Drawing.Size(43, 20);
    383       this.setMutationButton.TabIndex = 30;
     432      this.setMutationButton.TabIndex = 39;
    384433      this.setMutationButton.Text = "Set...";
    385434      this.setMutationButton.UseVisualStyleBackColor = true;
     
    392441      this.setSolutionGenerationButton.Name = "setSolutionGenerationButton";
    393442      this.setSolutionGenerationButton.Size = new System.Drawing.Size(43, 20);
    394       this.setSolutionGenerationButton.TabIndex = 26;
     443      this.setSolutionGenerationButton.TabIndex = 35;
    395444      this.setSolutionGenerationButton.Text = "Set...";
    396445      this.setSolutionGenerationButton.UseVisualStyleBackColor = true;
     
    403452      this.viewEvaluationButton.Name = "viewEvaluationButton";
    404453      this.viewEvaluationButton.Size = new System.Drawing.Size(53, 20);
    405       this.viewEvaluationButton.TabIndex = 33;
     454      this.viewEvaluationButton.TabIndex = 42;
    406455      this.viewEvaluationButton.Text = "View...";
    407456      this.viewEvaluationButton.UseVisualStyleBackColor = true;
     
    414463      this.viewMutationButton.Name = "viewMutationButton";
    415464      this.viewMutationButton.Size = new System.Drawing.Size(53, 20);
    416       this.viewMutationButton.TabIndex = 29;
     465      this.viewMutationButton.TabIndex = 38;
    417466      this.viewMutationButton.Text = "View...";
    418467      this.viewMutationButton.UseVisualStyleBackColor = true;
     
    425474      this.viewSolutionGenerationButton.Name = "viewSolutionGenerationButton";
    426475      this.viewSolutionGenerationButton.Size = new System.Drawing.Size(53, 20);
    427       this.viewSolutionGenerationButton.TabIndex = 25;
     476      this.viewSolutionGenerationButton.TabIndex = 34;
    428477      this.viewSolutionGenerationButton.Text = "View...";
    429478      this.viewSolutionGenerationButton.UseVisualStyleBackColor = true;
     
    436485      this.viewProblemInitializationButton.Name = "viewProblemInitializationButton";
    437486      this.viewProblemInitializationButton.Size = new System.Drawing.Size(53, 20);
    438       this.viewProblemInitializationButton.TabIndex = 21;
     487      this.viewProblemInitializationButton.TabIndex = 30;
    439488      this.viewProblemInitializationButton.Text = "View...";
    440489      this.viewProblemInitializationButton.UseVisualStyleBackColor = true;
     
    447496      this.setProblemInitializationButton.Name = "setProblemInitializationButton";
    448497      this.setProblemInitializationButton.Size = new System.Drawing.Size(43, 20);
    449       this.setProblemInitializationButton.TabIndex = 22;
     498      this.setProblemInitializationButton.TabIndex = 31;
    450499      this.setProblemInitializationButton.Text = "Set...";
    451500      this.setProblemInitializationButton.UseVisualStyleBackColor = true;
     
    459508      this.evaluationTextBox.ReadOnly = true;
    460509      this.evaluationTextBox.Size = new System.Drawing.Size(186, 20);
    461       this.evaluationTextBox.TabIndex = 32;
     510      this.evaluationTextBox.TabIndex = 41;
    462511      //
    463512      // mutationTextBox
     
    468517      this.mutationTextBox.ReadOnly = true;
    469518      this.mutationTextBox.Size = new System.Drawing.Size(186, 20);
    470       this.mutationTextBox.TabIndex = 28;
     519      this.mutationTextBox.TabIndex = 37;
    471520      //
    472521      // solutionGenerationTextBox
     
    477526      this.solutionGenerationTextBox.ReadOnly = true;
    478527      this.solutionGenerationTextBox.Size = new System.Drawing.Size(186, 20);
    479       this.solutionGenerationTextBox.TabIndex = 24;
     528      this.solutionGenerationTextBox.TabIndex = 33;
    480529      //
    481530      // problemInitializationTextBox
     
    486535      this.problemInitializationTextBox.ReadOnly = true;
    487536      this.problemInitializationTextBox.Size = new System.Drawing.Size(186, 20);
    488       this.problemInitializationTextBox.TabIndex = 20;
     537      this.problemInitializationTextBox.TabIndex = 29;
    489538      //
    490539      // setRandomSeedRandomlyCheckBox
     
    501550      //
    502551      this.problemDimensionTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    503       this.problemDimensionTextBox.Location = new System.Drawing.Point(168, 172);
     552      this.problemDimensionTextBox.Location = new System.Drawing.Point(168, 198);
    504553      this.problemDimensionTextBox.Name = "problemDimensionTextBox";
    505554      this.problemDimensionTextBox.Size = new System.Drawing.Size(186, 20);
    506       this.problemDimensionTextBox.TabIndex = 13;
     555      this.problemDimensionTextBox.TabIndex = 24;
    507556      this.problemDimensionTextBox.Validated += new System.EventHandler(this.problemDimensionTextBox_Validated);
    508557      //
    509       // initialMutationStrengthVectorTextBox
    510       //
    511       this.initialMutationStrengthVectorTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    512       this.initialMutationStrengthVectorTextBox.Location = new System.Drawing.Point(168, 198);
    513       this.initialMutationStrengthVectorTextBox.Name = "initialMutationStrengthVectorTextBox";
    514       this.initialMutationStrengthVectorTextBox.Size = new System.Drawing.Size(186, 20);
    515       this.initialMutationStrengthVectorTextBox.TabIndex = 13;
    516       this.toolTip.SetToolTip(this.initialMutationStrengthVectorTextBox, resources.GetString("initialMutationStrengthVectorTextBox.ToolTip"));
    517       this.initialMutationStrengthVectorTextBox.Validated += new System.EventHandler(this.initialMutationStrengthVectorTextBox_Validated);
     558      // shakingFactorsLowerBoundTextBox
     559      //
     560      this.shakingFactorsLowerBoundTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
     561      this.shakingFactorsLowerBoundTextBox.Location = new System.Drawing.Point(181, 172);
     562      this.shakingFactorsLowerBoundTextBox.Name = "shakingFactorsLowerBoundTextBox";
     563      this.shakingFactorsLowerBoundTextBox.Size = new System.Drawing.Size(65, 20);
     564      this.shakingFactorsLowerBoundTextBox.TabIndex = 18;
     565      this.toolTip.SetToolTip(this.shakingFactorsLowerBoundTextBox, resources.GetString("shakingFactorsLowerBoundTextBox.ToolTip"));
    518566      //
    519567      // evaluationLabel
     
    524572      this.evaluationLabel.Name = "evaluationLabel";
    525573      this.evaluationLabel.Size = new System.Drawing.Size(60, 13);
    526       this.evaluationLabel.TabIndex = 31;
     574      this.evaluationLabel.TabIndex = 40;
    527575      this.evaluationLabel.Text = "&Evaluation:";
    528576      //
     
    534582      this.mutationLabel.Name = "mutationLabel";
    535583      this.mutationLabel.Size = new System.Drawing.Size(51, 13);
    536       this.mutationLabel.TabIndex = 27;
     584      this.mutationLabel.TabIndex = 36;
    537585      this.mutationLabel.Text = "&Mutation:";
    538586      //
     
    544592      this.solutionGenerationLabel.Name = "solutionGenerationLabel";
    545593      this.solutionGenerationLabel.Size = new System.Drawing.Size(103, 13);
    546       this.solutionGenerationLabel.TabIndex = 23;
     594      this.solutionGenerationLabel.TabIndex = 32;
    547595      this.solutionGenerationLabel.Text = "&Solution Generation:";
    548596      //
     
    554602      this.problemInitializationLabel.Name = "problemInitializationLabel";
    555603      this.problemInitializationLabel.Size = new System.Drawing.Size(105, 13);
    556       this.problemInitializationLabel.TabIndex = 19;
     604      this.problemInitializationLabel.TabIndex = 28;
    557605      this.problemInitializationLabel.Text = "&Problem Initialization:";
    558606      //
     
    561609      this.problemDimensionLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    562610      this.problemDimensionLabel.AutoSize = true;
    563       this.problemDimensionLabel.Location = new System.Drawing.Point(7, 175);
     611      this.problemDimensionLabel.Location = new System.Drawing.Point(6, 201);
    564612      this.problemDimensionLabel.Name = "problemDimensionLabel";
    565613      this.problemDimensionLabel.Size = new System.Drawing.Size(100, 13);
    566       this.problemDimensionLabel.TabIndex = 12;
     614      this.problemDimensionLabel.TabIndex = 23;
    567615      this.problemDimensionLabel.Text = "Problem Dimension:";
    568616      //
    569       // initialMutationStrengthLabel
    570       //
    571       this.initialMutationStrengthLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    572       this.initialMutationStrengthLabel.AutoSize = true;
    573       this.initialMutationStrengthLabel.Location = new System.Drawing.Point(6, 201);
    574       this.initialMutationStrengthLabel.Name = "initialMutationStrengthLabel";
    575       this.initialMutationStrengthLabel.Size = new System.Drawing.Size(155, 13);
    576       this.initialMutationStrengthLabel.TabIndex = 12;
    577       this.initialMutationStrengthLabel.Text = "Initial Mutation Strength Vector:";
     617      // mutationStrengthLabel
     618      //
     619      this.mutationStrengthLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
     620      this.mutationStrengthLabel.AutoSize = true;
     621      this.mutationStrengthLabel.Location = new System.Drawing.Point(6, 175);
     622      this.mutationStrengthLabel.Name = "mutationStrengthLabel";
     623      this.mutationStrengthLabel.Size = new System.Drawing.Size(128, 13);
     624      this.mutationStrengthLabel.TabIndex = 16;
     625      this.mutationStrengthLabel.Text = "Mutation Strength Vector:";
    578626      //
    579627      // mutationRateLabel
     
    585633      this.mutationRateLabel.Name = "mutationRateLabel";
    586634      this.mutationRateLabel.Size = new System.Drawing.Size(62, 13);
    587       this.mutationRateLabel.TabIndex = 8;
     635      this.mutationRateLabel.TabIndex = 10;
    588636      this.mutationRateLabel.Text = "Lambda (λ):";
    589637      //
     
    594642      this.maximumGenerationsTextBox.Name = "maximumGenerationsTextBox";
    595643      this.maximumGenerationsTextBox.Size = new System.Drawing.Size(186, 20);
    596       this.maximumGenerationsTextBox.TabIndex = 11;
     644      this.maximumGenerationsTextBox.TabIndex = 14;
    597645      //
    598646      // maximumGenerationsLabel
     
    603651      this.maximumGenerationsLabel.Name = "maximumGenerationsLabel";
    604652      this.maximumGenerationsLabel.Size = new System.Drawing.Size(114, 13);
    605       this.maximumGenerationsLabel.TabIndex = 10;
     653      this.maximumGenerationsLabel.TabIndex = 13;
    606654      this.maximumGenerationsLabel.Text = "Maximum &Generations:";
    607655      //
     
    642690      this.randomSeedLabel.Text = "&Random Seed:";
    643691      //
    644       // label6
    645       //
    646       this.label6.Anchor = System.Windows.Forms.AnchorStyles.None;
    647       this.label6.AutoSize = true;
    648       this.label6.Location = new System.Drawing.Point(357, 201);
    649       this.label6.Name = "label6";
    650       this.label6.Size = new System.Drawing.Size(87, 13);
    651       this.label6.TabIndex = 4;
    652       this.label6.Text = "(ShakingFactors)";
    653       //
    654       // label5
    655       //
    656       this.label5.Anchor = System.Windows.Forms.AnchorStyles.None;
    657       this.label5.AutoSize = true;
    658       this.label5.Location = new System.Drawing.Point(357, 149);
    659       this.label5.Name = "label5";
    660       this.label5.Size = new System.Drawing.Size(114, 13);
    661       this.label5.TabIndex = 4;
    662       this.label5.Text = "(MaximumGenerations)";
    663       //
    664       // label4
    665       //
    666       this.label4.Anchor = System.Windows.Forms.AnchorStyles.None;
    667       this.label4.AutoSize = true;
    668       this.label4.Location = new System.Drawing.Point(356, 123);
    669       this.label4.Name = "label4";
    670       this.label4.Size = new System.Drawing.Size(61, 13);
    671       this.label4.TabIndex = 4;
    672       this.label4.Text = "(ESlambda)";
    673       //
    674       // label3
    675       //
    676       this.label3.Anchor = System.Windows.Forms.AnchorStyles.None;
    677       this.label3.AutoSize = true;
    678       this.label3.Location = new System.Drawing.Point(357, 97);
    679       this.label3.Name = "label3";
    680       this.label3.Size = new System.Drawing.Size(42, 13);
    681       this.label3.TabIndex = 4;
    682       this.label3.Text = "(ESrho)";
    683       //
    684       // label2
    685       //
    686       this.label2.Anchor = System.Windows.Forms.AnchorStyles.None;
    687       this.label2.AutoSize = true;
    688       this.label2.Location = new System.Drawing.Point(357, 71);
    689       this.label2.Name = "label2";
    690       this.label2.Size = new System.Drawing.Size(41, 13);
    691       this.label2.TabIndex = 4;
    692       this.label2.Text = "(ESmu)";
     692      // problemDimensionVariableNameLabel
     693      //
     694      this.problemDimensionVariableNameLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
     695      this.problemDimensionVariableNameLabel.AutoSize = true;
     696      this.problemDimensionVariableNameLabel.Location = new System.Drawing.Point(357, 201);
     697      this.problemDimensionVariableNameLabel.Name = "problemDimensionVariableNameLabel";
     698      this.problemDimensionVariableNameLabel.Size = new System.Drawing.Size(100, 13);
     699      this.problemDimensionVariableNameLabel.TabIndex = 25;
     700      this.problemDimensionVariableNameLabel.Text = "(ProblemDimension)";
     701      //
     702      // shakingFactorsVariableNameLabel
     703      //
     704      this.shakingFactorsVariableNameLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
     705      this.shakingFactorsVariableNameLabel.AutoSize = true;
     706      this.shakingFactorsVariableNameLabel.Location = new System.Drawing.Point(357, 175);
     707      this.shakingFactorsVariableNameLabel.Name = "shakingFactorsVariableNameLabel";
     708      this.shakingFactorsVariableNameLabel.Size = new System.Drawing.Size(87, 13);
     709      this.shakingFactorsVariableNameLabel.TabIndex = 22;
     710      this.shakingFactorsVariableNameLabel.Text = "(ShakingFactors)";
     711      //
     712      // maximumGenerationsVariableNameLabel
     713      //
     714      this.maximumGenerationsVariableNameLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
     715      this.maximumGenerationsVariableNameLabel.AutoSize = true;
     716      this.maximumGenerationsVariableNameLabel.Location = new System.Drawing.Point(357, 149);
     717      this.maximumGenerationsVariableNameLabel.Name = "maximumGenerationsVariableNameLabel";
     718      this.maximumGenerationsVariableNameLabel.Size = new System.Drawing.Size(114, 13);
     719      this.maximumGenerationsVariableNameLabel.TabIndex = 15;
     720      this.maximumGenerationsVariableNameLabel.Text = "(MaximumGenerations)";
     721      //
     722      // esLambdaVariableNameLabel
     723      //
     724      this.esLambdaVariableNameLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
     725      this.esLambdaVariableNameLabel.AutoSize = true;
     726      this.esLambdaVariableNameLabel.Location = new System.Drawing.Point(357, 123);
     727      this.esLambdaVariableNameLabel.Name = "esLambdaVariableNameLabel";
     728      this.esLambdaVariableNameLabel.Size = new System.Drawing.Size(61, 13);
     729      this.esLambdaVariableNameLabel.TabIndex = 12;
     730      this.esLambdaVariableNameLabel.Text = "(ESlambda)";
     731      //
     732      // esRhoVariableNameLabel
     733      //
     734      this.esRhoVariableNameLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
     735      this.esRhoVariableNameLabel.AutoSize = true;
     736      this.esRhoVariableNameLabel.Location = new System.Drawing.Point(357, 97);
     737      this.esRhoVariableNameLabel.Name = "esRhoVariableNameLabel";
     738      this.esRhoVariableNameLabel.Size = new System.Drawing.Size(42, 13);
     739      this.esRhoVariableNameLabel.TabIndex = 9;
     740      this.esRhoVariableNameLabel.Text = "(ESrho)";
     741      //
     742      // esMuVariableNameLabel
     743      //
     744      this.esMuVariableNameLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
     745      this.esMuVariableNameLabel.AutoSize = true;
     746      this.esMuVariableNameLabel.Location = new System.Drawing.Point(357, 71);
     747      this.esMuVariableNameLabel.Name = "esMuVariableNameLabel";
     748      this.esMuVariableNameLabel.Size = new System.Drawing.Size(41, 13);
     749      this.esMuVariableNameLabel.TabIndex = 6;
     750      this.esMuVariableNameLabel.Text = "(ESmu)";
    693751      //
    694752      // populationSizeLabel
     
    709767      this.lambdaTextBox.Name = "lambdaTextBox";
    710768      this.lambdaTextBox.Size = new System.Drawing.Size(186, 20);
    711       this.lambdaTextBox.TabIndex = 9;
     769      this.lambdaTextBox.TabIndex = 11;
    712770      //
    713771      // scopesTabPage
     
    810868    private System.Windows.Forms.TextBox maximumGenerationsTextBox;
    811869    private System.Windows.Forms.Label maximumGenerationsLabel;
    812     private System.Windows.Forms.TextBox initialMutationStrengthVectorTextBox;
    813     private System.Windows.Forms.Label initialMutationStrengthLabel;
     870    private System.Windows.Forms.TextBox shakingFactorsLowerBoundTextBox;
     871    private System.Windows.Forms.Label mutationStrengthLabel;
    814872    private System.Windows.Forms.TextBox randomSeedTextBox;
    815873    private System.Windows.Forms.Label setRandomSeedRandomlyLabel;
     
    835893    private System.Windows.Forms.Button viewProblemInitializationButton;
    836894    private System.Windows.Forms.TextBox generalLearningRateTextBox;
    837     private System.Windows.Forms.Label targetSuccessRateLabel;
     895    private System.Windows.Forms.Label generalLearningRateLabel;
    838896    private System.Windows.Forms.Button setRecombinationButton;
    839897    private System.Windows.Forms.Button viewRecombinationButton;
     
    847905    private System.Windows.Forms.GroupBox successRuleGroupBox;
    848906    private System.Windows.Forms.TextBox learningRateTextBox;
    849     private System.Windows.Forms.Label label1;
    850     private System.Windows.Forms.Label label5;
    851     private System.Windows.Forms.Label label4;
    852     private System.Windows.Forms.Label label3;
    853     private System.Windows.Forms.Label label2;
    854     private System.Windows.Forms.Label label6;
    855     private System.Windows.Forms.Label label8;
    856     private System.Windows.Forms.Label label7;
     907    private System.Windows.Forms.Label learningRateLabel;
     908    private System.Windows.Forms.Label maximumGenerationsVariableNameLabel;
     909    private System.Windows.Forms.Label esLambdaVariableNameLabel;
     910    private System.Windows.Forms.Label esRhoVariableNameLabel;
     911    private System.Windows.Forms.Label esMuVariableNameLabel;
     912    private System.Windows.Forms.Label shakingFactorsVariableNameLabel;
     913    private System.Windows.Forms.Label learningRateVariableNameLabel;
     914    private System.Windows.Forms.Label generalLearningRateVariableNameLabel;
    857915    private System.Windows.Forms.ToolTip toolTip;
    858916    private System.Windows.Forms.TextBox problemDimensionTextBox;
    859917    private System.Windows.Forms.Label problemDimensionLabel;
     918    private System.Windows.Forms.Label leftBracketLabelRight;
     919    private System.Windows.Forms.Label semicolonLabel;
     920    private System.Windows.Forms.Label leftBracketLabelLeft;
     921    private System.Windows.Forms.TextBox shakingFactorsUpperBoundTextBox;
     922    private System.Windows.Forms.Label problemDimensionVariableNameLabel;
    860923  }
    861924}
  • trunk/sources/HeuristicLab.ES/ESEditor.cs

    r1112 r1222  
    5252    public ESEditor() {
    5353      InitializeComponent();
    54       problemDimensionTextBox.Text = "1";
    5554    }
    5655    /// <summary>
     
    6160      : this() {
    6261      ES = es;
    63       int dimension = es.ShakingFactors.Length;
    64       problemDimensionTextBox.Text = dimension.ToString();
    6562    }
    6663
     
    114111        evaluationTextBox.Text = ES.Evaluator.GetType().Name;
    115112        recombinationTextBox.Text = ES.Recombinator.GetType().Name;
    116         initialMutationStrengthVectorTextBox.Text = ArrayToString<double>(ES.ShakingFactors);
     113        plusRadioButton.Checked = ES.PlusNotation;
     114        commaRadioButton.Checked = !ES.PlusNotation;
    117115      }
    118116    }
     
    125123      lambdaTextBox.DataBindings.Add("Text", ES, "Lambda");
    126124      maximumGenerationsTextBox.DataBindings.Add("Text", ES, "MaximumGenerations");
     125      shakingFactorsLowerBoundTextBox.DataBindings.Add("Text", ES, "ShakingFactorsMin");
     126      shakingFactorsUpperBoundTextBox.DataBindings.Add("Text", ES, "ShakingFactorsMax");
     127      problemDimensionTextBox.DataBindings.Add("Text", ES, "ProblemDimension");
    127128      generalLearningRateTextBox.DataBindings.Add("Text", ES, "GeneralLearningRate");
    128129      learningRateTextBox.DataBindings.Add("Text", ES, "LearningRate");
     
    241242    #endregion
    242243
    243     private string ArrayToString<T>(T[] array) {
    244       StringBuilder s = new StringBuilder();
    245       foreach (T element in array)
    246         s.Append(element + "; ");
    247       s.Remove(s.Length - 2, 2);
    248       return s.ToString();
    249     }
    250 
    251     private double[] StringToDoubleArray(string str) {
    252      
    253       string[] s = str.Split(new char[] { ';' });
    254       double[] tmp = new double[s.Length];
    255       try {
    256         for (int i = 0; i < s.Length; i++) {
    257           tmp[i] = double.Parse(s[i]);
    258         }
    259       } catch (FormatException) {       
    260         return null;
    261       }
    262       return tmp;
    263     }
    264 
    265     private void initialMutationStrengthVectorTextBox_Validated(object sender, EventArgs e) {
    266       double[] tmp = StringToDoubleArray(initialMutationStrengthVectorTextBox.Text);
    267       if (tmp != null) ES.ShakingFactors = tmp;
    268       else MessageBox.Show("Please use colons \";\" (without the quotes) to delimite the items like this: " + (1.2).ToString() + ";" + (1.1).ToString() + ";" + (3.453).ToString());
    269       int dim = int.Parse(problemDimensionTextBox.Text);
    270       if (ES.ShakingFactors.Length != dim) {
    271         problemDimensionTextBox.Text = ES.ShakingFactors.Length.ToString();
    272         UpdateLearningRates();
    273       }
     244    private void problemDimensionTextBox_Validated(object sender, EventArgs e) {
     245      UpdateLearningRates();
    274246      Refresh();
    275     }
    276 
    277     private void problemDimensionTextBox_Validated(object sender, EventArgs e) {
    278       double[] tmp = StringToDoubleArray(initialMutationStrengthVectorTextBox.Text);
    279       if (tmp != null) {
    280         int dim = 0;
    281         try {
    282           dim = int.Parse(problemDimensionTextBox.Text);
    283           if (dim < 1) throw new FormatException();
    284         } catch (FormatException) {
    285           MessageBox.Show("Problem Dimension must contain an integer > 0");
    286         }
    287         double[] shakingFactors = new double[dim];
    288         for (int i = 0; i < dim; i++) {
    289           shakingFactors[i] = tmp[i % tmp.Length];
    290         }
    291         ES.ShakingFactors = shakingFactors;
    292         UpdateLearningRates();
    293         Refresh();
    294       }
    295247    }
    296248
  • trunk/sources/HeuristicLab.ES/ESEditor.resx

    r1112 r1222  
    121121    <value>7, 3</value>
    122122  </metadata>
    123   <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    124     <value>7, 3</value>
    125   </metadata>
    126   <data name="initialMutationStrengthVectorTextBox.ToolTip" xml:space="preserve">
     123  <data name="shakingFactorsUpperBoundTextBox.ToolTip" xml:space="preserve">
     124    <value>Enter a pattern that is used to generate the initial strategy vector.
     125This can be a single number, or a pattern of numbers which is used until the dimension is reached.
     126Use the colon ; to separate two numbers.</value>
     127  </data>
     128  <data name="shakingFactorsLowerBoundTextBox.ToolTip" xml:space="preserve">
    127129    <value>Enter a pattern that is used to generate the initial strategy vector.
    128130This can be a single number, or a pattern of numbers which is used until the dimension is reached.
  • trunk/sources/HeuristicLab.ES/HeuristicLab.ES.csproj

    r852 r1222  
    9090      <Name>HeuristicLab.Data</Name>
    9191    </ProjectReference>
    92     <ProjectReference Include="..\HeuristicLab.Evolutionary\HeuristicLab.Evolutionary.csproj">
    93       <Project>{F5614C53-153C-4A37-A608-121E1C087F07}</Project>
    94       <Name>HeuristicLab.Evolutionary</Name>
    95     </ProjectReference>
    9692    <ProjectReference Include="..\HeuristicLab.Logging\HeuristicLab.Logging.csproj">
    9793      <Project>{4095C92C-5A4C-44BC-9963-5F384CF5CC3F}</Project>
     
    110106      <Name>HeuristicLab.Random</Name>
    111107    </ProjectReference>
    112     <ProjectReference Include="..\HeuristicLab.Selection.OffspringSelection\HeuristicLab.Selection.OffspringSelection.csproj">
    113       <Project>{205898D3-2717-4686-AF17-52409B7EC0C6}</Project>
    114       <Name>HeuristicLab.Selection.OffspringSelection</Name>
     108    <ProjectReference Include="..\HeuristicLab.RealVector\HeuristicLab.RealVector.csproj">
     109      <Project>{2D4E4565-3ED9-4BEB-AE75-39D871843D24}</Project>
     110      <Name>HeuristicLab.RealVector</Name>
    115111    </ProjectReference>
    116112    <ProjectReference Include="..\HeuristicLab.Selection\HeuristicLab.Selection.csproj">
  • trunk/sources/HeuristicLab.ES/HeuristicLabESPlugin.cs

    r896 r1222  
    3333  [Dependency(Dependency = "HeuristicLab.Core-3.2")]
    3434  [Dependency(Dependency = "HeuristicLab.Data-3.2")]
    35   [Dependency(Dependency = "HeuristicLab.Evolutionary-3.2")]
    3635  [Dependency(Dependency = "HeuristicLab.Logging-3.2")]
    3736  [Dependency(Dependency = "HeuristicLab.Operators-3.2")]
    3837  [Dependency(Dependency = "HeuristicLab.Random-3.2")]
    3938  [Dependency(Dependency = "HeuristicLab.Selection-3.2")]
    40   [Dependency(Dependency = "HeuristicLab.Selection.OffspringSelection-3.2")]
    4139  [Dependency(Dependency = "HeuristicLab.SequentialEngine-3.2")]
     40  [Dependency(Dependency = "HeuristicLab.RealVector-3.2")]
    4241  public class HeuristicLabESPlugin : PluginBase {
    4342  }
Note: See TracChangeset for help on using the changeset viewer.