Free cookie consent management tool by TermsFeed Policy Generator

Changeset 86 for trunk


Ignore:
Timestamp:
03/21/08 13:26:23 (16 years ago)
Author:
abeham
Message:

Added the possibility to use Recombination in ES (ticket #64)

  • Added ES-specific RandomSelector that creates lambda parent groups of non repeating parents
  • Added the two recombination types: discrete and intermediate for RealVector
  • Updated the ES UI
Location:
trunk/sources
Files:
3 added
5 edited

Legend:

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

    r81 r86  
    7474      co3.AddSubOperator(eo3);
    7575
     76      // place holder for Recombinator
     77      EmptyOperator eo5 = new EmptyOperator();
     78      eo5.Name = "Recombinator";
     79      op.OperatorGraph.AddOperator(eo5);
     80      co3.AddSubOperator(eo5);
     81
    7682      return op;
    7783    }
     
    94100      VariableInjector vi = new VariableInjector();
    95101      vi.AddVariable(new Variable("ESmu", new IntData(1)));
     102      vi.AddVariable(new Variable("ESrho", new IntData(1)));
    96103      vi.AddVariable(new Variable("ESlambda", new IntData(1)));
    97104      vi.AddVariable(new Variable("EvaluatedSolutions", new IntData()));
     
    160167      op.OperatorGraph.InitialOperator = sp;
    161168
    162       RandomSelector rs = new RandomSelector();
     169      ESRandomSelector rs = new ESRandomSelector();
    163170      rs.Name = "Child Selector";
    164       rs.GetVariableInfo("Selected").ActualName = "ESlambda";
    165       rs.GetVariable("CopySelected").Value = new BoolData(true);
     171      rs.GetVariableInfo("Lambda").ActualName = "ESlambda";
     172      rs.GetVariableInfo("Rho").ActualName = "ESrho";
    166173      op.OperatorGraph.AddOperator(rs);
    167174      sp.AddSubOperator(rs);
     
    181188
    182189      ConditionalBranch cb1 = new ConditionalBranch();
    183       cb1.Name = "Point or Plus Replacement";
     190      cb1.Name = "Plus or Comma Replacement";
    184191      cb1.GetVariableInfo("Condition").ActualName = "PlusNotation";
    185192      op.OperatorGraph.AddOperator(cb1);
     
    192199
    193200      RightReducer rr = new RightReducer();
    194       rr.Name = "Point Replacement";
     201      rr.Name = "Comma Replacement";
    195202      op.OperatorGraph.AddOperator(rr);
    196203      cb1.AddSubOperator(rr);
     
    266273      sp2.AddSubOperator(oa);
    267274
     275      SequentialProcessor sp3 = new SequentialProcessor();
     276      op.OperatorGraph.AddOperator(sp3);
     277      oa.AddSubOperator(sp3);
     278      cb.AddSubOperator(sp3);
     279
     280      OperatorExtractor oe1 = new OperatorExtractor();
     281      oe1.Name = "Recombinator";
     282      oe1.GetVariableInfo("Operator").ActualName = "Recombinator";
     283      op.OperatorGraph.AddOperator(oe1);
     284      sp3.AddSubOperator(oe1);
     285
    268286      UniformSequentialSubScopesProcessor ussp = new UniformSequentialSubScopesProcessor();
    269287      op.OperatorGraph.AddOperator(ussp);
    270       oa.AddSubOperator(ussp);
    271       cb.AddSubOperator(ussp);
    272 
    273       SequentialProcessor sp3 = new SequentialProcessor();
    274       op.OperatorGraph.AddOperator(sp3);
    275       ussp.AddSubOperator(sp3);
    276 
    277       OperatorExtractor oe1 = new OperatorExtractor();
    278       oe1.Name = "Mutator";
    279       oe1.GetVariableInfo("Operator").ActualName = "Mutator";
    280       op.OperatorGraph.AddOperator(oe1);
    281       sp3.AddSubOperator(oe1);
     288      sp3.AddSubOperator(ussp);
     289
     290      SequentialProcessor sp4 = new SequentialProcessor();
     291      op.OperatorGraph.AddOperator(sp4);
     292      ussp.AddSubOperator(sp4);
    282293
    283294      OperatorExtractor oe2 = new OperatorExtractor();
    284       oe2.Name = "Evaluator";
    285       oe2.GetVariableInfo("Operator").ActualName = "Evaluator";
     295      oe2.Name = "Mutator";
     296      oe2.GetVariableInfo("Operator").ActualName = "Mutator";
    286297      op.OperatorGraph.AddOperator(oe2);
    287       sp3.AddSubOperator(oe2);
     298      sp4.AddSubOperator(oe2);
     299
     300      OperatorExtractor oe3 = new OperatorExtractor();
     301      oe3.Name = "Evaluator";
     302      oe3.GetVariableInfo("Operator").ActualName = "Evaluator";
     303      op.OperatorGraph.AddOperator(oe3);
     304      sp4.AddSubOperator(oe3);
    288305
    289306      Counter c = new Counter();
    290307      c.GetVariableInfo("Value").ActualName = "EvaluatedSolutions";
    291308      op.OperatorGraph.AddOperator(c);
    292       sp3.AddSubOperator(c);
     309      sp4.AddSubOperator(c);
    293310
    294311      SuccessRuleMutationStrengthAdjuster srmsa = new SuccessRuleMutationStrengthAdjuster();
     
    346363      get { return myMu.Data; }
    347364      set {
    348         myMu.Data = value;
    349         if (!PlusNotation && value >= Lambda) myLambda.Data = value + 1;
    350         OnChanged();
     365        if (value > 0) {
     366          myMu.Data = value;
     367          if (!PlusNotation && value >= Lambda) myLambda.Data = value + 1;
     368          if (value < Rho) myRho.Data = value;
     369          OnChanged();
     370        }
     371      }
     372    }
     373    private IntData myRho;
     374    public int Rho {
     375      get { return myRho.Data; }
     376      set {
     377        if (value > 0) {
     378          myRho.Data = value;
     379          if (value > Mu) Mu = value;
     380          OnChanged();
     381        }
    351382      }
    352383    }
     
    448479        myES.OperatorGraph.AddOperator(value);
    449480        myESMain.AddSubOperator(value, 0);
     481      }
     482    }
     483    public IOperator Recombinator {
     484      get { return myESMain.SubOperators[2]; }
     485      set {
     486        value.Name = "Recombinator";
     487        myES.OperatorGraph.RemoveOperator(Recombinator.Guid);
     488        myES.OperatorGraph.AddOperator(value);
     489        myESMain.AddSubOperator(value, 2);
    450490      }
    451491    }
     
    491531      VariableInjector vi = (VariableInjector)sp2.SubOperators[2];
    492532      myMu = vi.GetVariable("ESmu").GetValue<IntData>();
     533      myRho = vi.GetVariable("ESrho").GetValue<IntData>();
    493534      myLambda = vi.GetVariable("ESlambda").GetValue<IntData>();
    494535      myMaximumGenerations = vi.GetVariable("MaximumGenerations").GetValue<IntData>();
  • trunk/sources/HeuristicLab.ES/ESEditor.Designer.cs

    r81 r86  
    4949      this.tabControl = new System.Windows.Forms.TabControl();
    5050      this.parametersTabPage = new System.Windows.Forms.TabPage();
     51      this.useSuccessRuleCheckBox = new System.Windows.Forms.CheckBox();
    5152      this.targetSuccessRateTextBox = new System.Windows.Forms.TextBox();
    5253      this.targetSuccessRateLabel = new System.Windows.Forms.Label();
     
    8687      this.resetButton = new System.Windows.Forms.Button();
    8788      this.cloneEngineButton = new System.Windows.Forms.Button();
    88       this.useSuccessRuleCheckBox = new System.Windows.Forms.CheckBox();
     89      this.rhoLabel = new System.Windows.Forms.Label();
     90      this.rhoTextBox = new System.Windows.Forms.TextBox();
     91      this.recombinationLabel = new System.Windows.Forms.Label();
     92      this.recombinationTextBox = new System.Windows.Forms.TextBox();
     93      this.setRecombinationButton = new System.Windows.Forms.Button();
     94      this.viewRecombinationButton = new System.Windows.Forms.Button();
    8995      this.tabControl.SuspendLayout();
    9096      this.parametersTabPage.SuspendLayout();
     
    95101      //
    96102      this.executeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    97       this.executeButton.Location = new System.Drawing.Point(0, 396);
     103      this.executeButton.Location = new System.Drawing.Point(0, 459);
    98104      this.executeButton.Name = "executeButton";
    99105      this.executeButton.Size = new System.Drawing.Size(75, 23);
     
    113119      this.tabControl.Name = "tabControl";
    114120      this.tabControl.SelectedIndex = 0;
    115       this.tabControl.Size = new System.Drawing.Size(526, 390);
     121      this.tabControl.Size = new System.Drawing.Size(526, 453);
    116122      this.tabControl.TabIndex = 0;
    117123      //
    118124      // parametersTabPage
    119125      //
     126      this.parametersTabPage.Controls.Add(this.setRecombinationButton);
     127      this.parametersTabPage.Controls.Add(this.viewRecombinationButton);
     128      this.parametersTabPage.Controls.Add(this.recombinationTextBox);
     129      this.parametersTabPage.Controls.Add(this.recombinationLabel);
     130      this.parametersTabPage.Controls.Add(this.rhoTextBox);
     131      this.parametersTabPage.Controls.Add(this.rhoLabel);
    120132      this.parametersTabPage.Controls.Add(this.useSuccessRuleCheckBox);
    121133      this.parametersTabPage.Controls.Add(this.targetSuccessRateTextBox);
     
    154166      this.parametersTabPage.Name = "parametersTabPage";
    155167      this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3);
    156       this.parametersTabPage.Size = new System.Drawing.Size(518, 364);
     168      this.parametersTabPage.Size = new System.Drawing.Size(518, 427);
    157169      this.parametersTabPage.TabIndex = 0;
    158170      this.parametersTabPage.Text = "Parameters";
    159171      this.parametersTabPage.UseVisualStyleBackColor = true;
    160172      //
     173      // useSuccessRuleCheckBox
     174      //
     175      this.useSuccessRuleCheckBox.Anchor = System.Windows.Forms.AnchorStyles.None;
     176      this.useSuccessRuleCheckBox.AutoSize = true;
     177      this.useSuccessRuleCheckBox.Checked = true;
     178      this.useSuccessRuleCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
     179      this.useSuccessRuleCheckBox.Location = new System.Drawing.Point(411, 215);
     180      this.useSuccessRuleCheckBox.Name = "useSuccessRuleCheckBox";
     181      this.useSuccessRuleCheckBox.Size = new System.Drawing.Size(51, 17);
     182      this.useSuccessRuleCheckBox.TabIndex = 16;
     183      this.useSuccessRuleCheckBox.Text = "Use?";
     184      this.useSuccessRuleCheckBox.UseVisualStyleBackColor = true;
     185      this.useSuccessRuleCheckBox.CheckedChanged += new System.EventHandler(this.useSuccessRuleCheckBox_CheckedChanged);
     186      //
    161187      // targetSuccessRateTextBox
    162188      //
    163189      this.targetSuccessRateTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    164       this.targetSuccessRateTextBox.Location = new System.Drawing.Point(218, 182);
     190      this.targetSuccessRateTextBox.Location = new System.Drawing.Point(218, 213);
    165191      this.targetSuccessRateTextBox.Name = "targetSuccessRateTextBox";
    166192      this.targetSuccessRateTextBox.Size = new System.Drawing.Size(186, 20);
    167       this.targetSuccessRateTextBox.TabIndex = 39;
     193      this.targetSuccessRateTextBox.TabIndex = 15;
    168194      //
    169195      // targetSuccessRateLabel
     
    171197      this.targetSuccessRateLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    172198      this.targetSuccessRateLabel.AutoSize = true;
    173       this.targetSuccessRateLabel.Location = new System.Drawing.Point(65, 185);
     199      this.targetSuccessRateLabel.Location = new System.Drawing.Point(65, 216);
    174200      this.targetSuccessRateLabel.Name = "targetSuccessRateLabel";
    175201      this.targetSuccessRateLabel.Size = new System.Drawing.Size(111, 13);
    176       this.targetSuccessRateLabel.TabIndex = 38;
     202      this.targetSuccessRateLabel.TabIndex = 14;
    177203      this.targetSuccessRateLabel.Text = "Target Success Rate:";
    178204      //
     
    181207      this.plusNotationButton.Anchor = System.Windows.Forms.AnchorStyles.None;
    182208      this.plusNotationButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
    183       this.plusNotationButton.Location = new System.Drawing.Point(218, 208);
     209      this.plusNotationButton.Location = new System.Drawing.Point(218, 239);
    184210      this.plusNotationButton.Name = "plusNotationButton";
    185211      this.plusNotationButton.Size = new System.Drawing.Size(78, 24);
    186       this.plusNotationButton.TabIndex = 37;
     212      this.plusNotationButton.TabIndex = 18;
    187213      this.plusNotationButton.Text = "Plus";
    188214      this.plusNotationButton.UseVisualStyleBackColor = true;
     
    193219      this.plusNotationLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    194220      this.plusNotationLabel.AutoSize = true;
    195       this.plusNotationLabel.Location = new System.Drawing.Point(65, 214);
     221      this.plusNotationLabel.Location = new System.Drawing.Point(65, 245);
    196222      this.plusNotationLabel.Name = "plusNotationLabel";
    197       this.plusNotationLabel.Size = new System.Drawing.Size(102, 13);
    198       this.plusNotationLabel.TabIndex = 36;
    199       this.plusNotationLabel.Text = "Plus/Point Notation:";
     223      this.plusNotationLabel.Size = new System.Drawing.Size(113, 13);
     224      this.plusNotationLabel.TabIndex = 17;
     225      this.plusNotationLabel.Text = "Plus/Comma Notation:";
    200226      //
    201227      // setEvaluationButton
    202228      //
    203229      this.setEvaluationButton.Anchor = System.Windows.Forms.AnchorStyles.None;
    204       this.setEvaluationButton.Location = new System.Drawing.Point(469, 338);
     230      this.setEvaluationButton.Location = new System.Drawing.Point(469, 361);
    205231      this.setEvaluationButton.Name = "setEvaluationButton";
    206232      this.setEvaluationButton.Size = new System.Drawing.Size(43, 20);
    207       this.setEvaluationButton.TabIndex = 35;
     233      this.setEvaluationButton.TabIndex = 34;
    208234      this.setEvaluationButton.Text = "Set...";
    209235      this.setEvaluationButton.UseVisualStyleBackColor = true;
     
    213239      //
    214240      this.setMutationButton.Anchor = System.Windows.Forms.AnchorStyles.None;
    215       this.setMutationButton.Location = new System.Drawing.Point(469, 312);
     241      this.setMutationButton.Location = new System.Drawing.Point(469, 335);
    216242      this.setMutationButton.Name = "setMutationButton";
    217243      this.setMutationButton.Size = new System.Drawing.Size(43, 20);
    218       this.setMutationButton.TabIndex = 31;
     244      this.setMutationButton.TabIndex = 30;
    219245      this.setMutationButton.Text = "Set...";
    220246      this.setMutationButton.UseVisualStyleBackColor = true;
     
    224250      //
    225251      this.setSolutionGenerationButton.Anchor = System.Windows.Forms.AnchorStyles.None;
    226       this.setSolutionGenerationButton.Location = new System.Drawing.Point(469, 286);
     252      this.setSolutionGenerationButton.Location = new System.Drawing.Point(469, 309);
    227253      this.setSolutionGenerationButton.Name = "setSolutionGenerationButton";
    228254      this.setSolutionGenerationButton.Size = new System.Drawing.Size(43, 20);
    229       this.setSolutionGenerationButton.TabIndex = 19;
     255      this.setSolutionGenerationButton.TabIndex = 26;
    230256      this.setSolutionGenerationButton.Text = "Set...";
    231257      this.setSolutionGenerationButton.UseVisualStyleBackColor = true;
     
    235261      //
    236262      this.viewEvaluationButton.Anchor = System.Windows.Forms.AnchorStyles.None;
    237       this.viewEvaluationButton.Location = new System.Drawing.Point(410, 338);
     263      this.viewEvaluationButton.Location = new System.Drawing.Point(410, 361);
    238264      this.viewEvaluationButton.Name = "viewEvaluationButton";
    239265      this.viewEvaluationButton.Size = new System.Drawing.Size(53, 20);
    240       this.viewEvaluationButton.TabIndex = 34;
     266      this.viewEvaluationButton.TabIndex = 33;
    241267      this.viewEvaluationButton.Text = "View...";
    242268      this.viewEvaluationButton.UseVisualStyleBackColor = true;
     
    246272      //
    247273      this.viewMutationButton.Anchor = System.Windows.Forms.AnchorStyles.None;
    248       this.viewMutationButton.Location = new System.Drawing.Point(410, 312);
     274      this.viewMutationButton.Location = new System.Drawing.Point(410, 335);
    249275      this.viewMutationButton.Name = "viewMutationButton";
    250276      this.viewMutationButton.Size = new System.Drawing.Size(53, 20);
    251       this.viewMutationButton.TabIndex = 30;
     277      this.viewMutationButton.TabIndex = 29;
    252278      this.viewMutationButton.Text = "View...";
    253279      this.viewMutationButton.UseVisualStyleBackColor = true;
     
    257283      //
    258284      this.viewSolutionGenerationButton.Anchor = System.Windows.Forms.AnchorStyles.None;
    259       this.viewSolutionGenerationButton.Location = new System.Drawing.Point(410, 286);
     285      this.viewSolutionGenerationButton.Location = new System.Drawing.Point(410, 309);
    260286      this.viewSolutionGenerationButton.Name = "viewSolutionGenerationButton";
    261287      this.viewSolutionGenerationButton.Size = new System.Drawing.Size(53, 20);
    262       this.viewSolutionGenerationButton.TabIndex = 18;
     288      this.viewSolutionGenerationButton.TabIndex = 25;
    263289      this.viewSolutionGenerationButton.Text = "View...";
    264290      this.viewSolutionGenerationButton.UseVisualStyleBackColor = true;
     
    268294      //
    269295      this.viewProblemInitializationButton.Anchor = System.Windows.Forms.AnchorStyles.None;
    270       this.viewProblemInitializationButton.Location = new System.Drawing.Point(410, 260);
     296      this.viewProblemInitializationButton.Location = new System.Drawing.Point(410, 283);
    271297      this.viewProblemInitializationButton.Name = "viewProblemInitializationButton";
    272298      this.viewProblemInitializationButton.Size = new System.Drawing.Size(53, 20);
    273       this.viewProblemInitializationButton.TabIndex = 14;
     299      this.viewProblemInitializationButton.TabIndex = 21;
    274300      this.viewProblemInitializationButton.Text = "View...";
    275301      this.viewProblemInitializationButton.UseVisualStyleBackColor = true;
     
    279305      //
    280306      this.setProblemInitializationButton.Anchor = System.Windows.Forms.AnchorStyles.None;
    281       this.setProblemInitializationButton.Location = new System.Drawing.Point(469, 260);
     307      this.setProblemInitializationButton.Location = new System.Drawing.Point(469, 283);
    282308      this.setProblemInitializationButton.Name = "setProblemInitializationButton";
    283309      this.setProblemInitializationButton.Size = new System.Drawing.Size(43, 20);
    284       this.setProblemInitializationButton.TabIndex = 15;
     310      this.setProblemInitializationButton.TabIndex = 22;
    285311      this.setProblemInitializationButton.Text = "Set...";
    286312      this.setProblemInitializationButton.UseVisualStyleBackColor = true;
     
    290316      //
    291317      this.evaluationTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    292       this.evaluationTextBox.Location = new System.Drawing.Point(218, 338);
     318      this.evaluationTextBox.Location = new System.Drawing.Point(218, 361);
    293319      this.evaluationTextBox.Name = "evaluationTextBox";
    294320      this.evaluationTextBox.ReadOnly = true;
    295321      this.evaluationTextBox.Size = new System.Drawing.Size(186, 20);
    296       this.evaluationTextBox.TabIndex = 33;
     322      this.evaluationTextBox.TabIndex = 32;
    297323      //
    298324      // mutationTextBox
    299325      //
    300326      this.mutationTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    301       this.mutationTextBox.Location = new System.Drawing.Point(218, 312);
     327      this.mutationTextBox.Location = new System.Drawing.Point(218, 335);
    302328      this.mutationTextBox.Name = "mutationTextBox";
    303329      this.mutationTextBox.ReadOnly = true;
    304330      this.mutationTextBox.Size = new System.Drawing.Size(186, 20);
    305       this.mutationTextBox.TabIndex = 29;
     331      this.mutationTextBox.TabIndex = 28;
    306332      //
    307333      // solutionGenerationTextBox
    308334      //
    309335      this.solutionGenerationTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    310       this.solutionGenerationTextBox.Location = new System.Drawing.Point(218, 286);
     336      this.solutionGenerationTextBox.Location = new System.Drawing.Point(218, 309);
    311337      this.solutionGenerationTextBox.Name = "solutionGenerationTextBox";
    312338      this.solutionGenerationTextBox.ReadOnly = true;
    313339      this.solutionGenerationTextBox.Size = new System.Drawing.Size(186, 20);
    314       this.solutionGenerationTextBox.TabIndex = 17;
     340      this.solutionGenerationTextBox.TabIndex = 24;
    315341      //
    316342      // problemInitializationTextBox
    317343      //
    318344      this.problemInitializationTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    319       this.problemInitializationTextBox.Location = new System.Drawing.Point(218, 260);
     345      this.problemInitializationTextBox.Location = new System.Drawing.Point(218, 283);
    320346      this.problemInitializationTextBox.Name = "problemInitializationTextBox";
    321347      this.problemInitializationTextBox.ReadOnly = true;
    322348      this.problemInitializationTextBox.Size = new System.Drawing.Size(186, 20);
    323       this.problemInitializationTextBox.TabIndex = 13;
     349      this.problemInitializationTextBox.TabIndex = 20;
    324350      //
    325351      // setRandomSeedRandomlyCheckBox
     
    327353      this.setRandomSeedRandomlyCheckBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    328354      this.setRandomSeedRandomlyCheckBox.AutoSize = true;
    329       this.setRandomSeedRandomlyCheckBox.Location = new System.Drawing.Point(218, 6);
     355      this.setRandomSeedRandomlyCheckBox.Location = new System.Drawing.Point(218, 15);
    330356      this.setRandomSeedRandomlyCheckBox.Name = "setRandomSeedRandomlyCheckBox";
    331357      this.setRandomSeedRandomlyCheckBox.Size = new System.Drawing.Size(15, 14);
     
    336362      //
    337363      this.initialMutationStrengthTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    338       this.initialMutationStrengthTextBox.Location = new System.Drawing.Point(218, 156);
     364      this.initialMutationStrengthTextBox.Location = new System.Drawing.Point(218, 187);
    339365      this.initialMutationStrengthTextBox.Name = "initialMutationStrengthTextBox";
    340366      this.initialMutationStrengthTextBox.Size = new System.Drawing.Size(186, 20);
    341       this.initialMutationStrengthTextBox.TabIndex = 11;
     367      this.initialMutationStrengthTextBox.TabIndex = 13;
    342368      //
    343369      // evaluationLabel
     
    345371      this.evaluationLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    346372      this.evaluationLabel.AutoSize = true;
    347       this.evaluationLabel.Location = new System.Drawing.Point(65, 341);
     373      this.evaluationLabel.Location = new System.Drawing.Point(65, 364);
    348374      this.evaluationLabel.Name = "evaluationLabel";
    349375      this.evaluationLabel.Size = new System.Drawing.Size(60, 13);
    350       this.evaluationLabel.TabIndex = 32;
     376      this.evaluationLabel.TabIndex = 31;
    351377      this.evaluationLabel.Text = "&Evaluation:";
    352378      //
     
    355381      this.mutationLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    356382      this.mutationLabel.AutoSize = true;
    357       this.mutationLabel.Location = new System.Drawing.Point(65, 315);
     383      this.mutationLabel.Location = new System.Drawing.Point(65, 338);
    358384      this.mutationLabel.Name = "mutationLabel";
    359385      this.mutationLabel.Size = new System.Drawing.Size(51, 13);
    360       this.mutationLabel.TabIndex = 28;
     386      this.mutationLabel.TabIndex = 27;
    361387      this.mutationLabel.Text = "&Mutation:";
    362388      //
     
    365391      this.solutionGenerationLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    366392      this.solutionGenerationLabel.AutoSize = true;
    367       this.solutionGenerationLabel.Location = new System.Drawing.Point(65, 289);
     393      this.solutionGenerationLabel.Location = new System.Drawing.Point(65, 312);
    368394      this.solutionGenerationLabel.Name = "solutionGenerationLabel";
    369395      this.solutionGenerationLabel.Size = new System.Drawing.Size(103, 13);
    370       this.solutionGenerationLabel.TabIndex = 16;
     396      this.solutionGenerationLabel.TabIndex = 23;
    371397      this.solutionGenerationLabel.Text = "&Solution Generation:";
    372398      //
     
    375401      this.problemInitializationLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    376402      this.problemInitializationLabel.AutoSize = true;
    377       this.problemInitializationLabel.Location = new System.Drawing.Point(65, 263);
     403      this.problemInitializationLabel.Location = new System.Drawing.Point(65, 286);
    378404      this.problemInitializationLabel.Name = "problemInitializationLabel";
    379405      this.problemInitializationLabel.Size = new System.Drawing.Size(105, 13);
    380       this.problemInitializationLabel.TabIndex = 12;
     406      this.problemInitializationLabel.TabIndex = 19;
    381407      this.problemInitializationLabel.Text = "&Problem Initialization:";
    382408      //
     
    385411      this.initialMutationStrengthLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    386412      this.initialMutationStrengthLabel.AutoSize = true;
    387       this.initialMutationStrengthLabel.Location = new System.Drawing.Point(65, 159);
     413      this.initialMutationStrengthLabel.Location = new System.Drawing.Point(65, 190);
    388414      this.initialMutationStrengthLabel.Name = "initialMutationStrengthLabel";
    389415      this.initialMutationStrengthLabel.Size = new System.Drawing.Size(121, 13);
    390       this.initialMutationStrengthLabel.TabIndex = 10;
     416      this.initialMutationStrengthLabel.TabIndex = 12;
    391417      this.initialMutationStrengthLabel.Text = "Initial Mutation Strength:";
    392418      //
     
    395421      this.mutationRateLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    396422      this.mutationRateLabel.AutoSize = true;
    397       this.mutationRateLabel.Location = new System.Drawing.Point(65, 107);
     423      this.mutationRateLabel.Location = new System.Drawing.Point(65, 138);
    398424      this.mutationRateLabel.Name = "mutationRateLabel";
    399425      this.mutationRateLabel.Size = new System.Drawing.Size(48, 13);
     
    404430      //
    405431      this.maximumGenerationsTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    406       this.maximumGenerationsTextBox.Location = new System.Drawing.Point(218, 130);
     432      this.maximumGenerationsTextBox.Location = new System.Drawing.Point(218, 161);
    407433      this.maximumGenerationsTextBox.Name = "maximumGenerationsTextBox";
    408434      this.maximumGenerationsTextBox.Size = new System.Drawing.Size(186, 20);
    409       this.maximumGenerationsTextBox.TabIndex = 7;
     435      this.maximumGenerationsTextBox.TabIndex = 11;
    410436      //
    411437      // maximumGenerationsLabel
     
    413439      this.maximumGenerationsLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    414440      this.maximumGenerationsLabel.AutoSize = true;
    415       this.maximumGenerationsLabel.Location = new System.Drawing.Point(65, 133);
     441      this.maximumGenerationsLabel.Location = new System.Drawing.Point(65, 164);
    416442      this.maximumGenerationsLabel.Name = "maximumGenerationsLabel";
    417443      this.maximumGenerationsLabel.Size = new System.Drawing.Size(114, 13);
    418       this.maximumGenerationsLabel.TabIndex = 6;
     444      this.maximumGenerationsLabel.TabIndex = 10;
    419445      this.maximumGenerationsLabel.Text = "Maximum &Generations:";
    420446      //
     
    422448      //
    423449      this.randomSeedTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    424       this.randomSeedTextBox.Location = new System.Drawing.Point(218, 26);
     450      this.randomSeedTextBox.Location = new System.Drawing.Point(218, 35);
    425451      this.randomSeedTextBox.Name = "randomSeedTextBox";
    426452      this.randomSeedTextBox.Size = new System.Drawing.Size(186, 20);
     
    430456      //
    431457      this.muTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    432       this.muTextBox.Location = new System.Drawing.Point(218, 78);
     458      this.muTextBox.Location = new System.Drawing.Point(218, 83);
    433459      this.muTextBox.Name = "muTextBox";
    434460      this.muTextBox.Size = new System.Drawing.Size(186, 20);
     
    439465      this.setRandomSeedRandomlyLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    440466      this.setRandomSeedRandomlyLabel.AutoSize = true;
    441       this.setRandomSeedRandomlyLabel.Location = new System.Drawing.Point(65, 6);
     467      this.setRandomSeedRandomlyLabel.Location = new System.Drawing.Point(65, 15);
    442468      this.setRandomSeedRandomlyLabel.Name = "setRandomSeedRandomlyLabel";
    443469      this.setRandomSeedRandomlyLabel.Size = new System.Drawing.Size(147, 13);
     
    449475      this.randomSeedLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    450476      this.randomSeedLabel.AutoSize = true;
    451       this.randomSeedLabel.Location = new System.Drawing.Point(65, 29);
     477      this.randomSeedLabel.Location = new System.Drawing.Point(65, 38);
    452478      this.randomSeedLabel.Name = "randomSeedLabel";
    453479      this.randomSeedLabel.Size = new System.Drawing.Size(78, 13);
     
    459485      this.populationSizeLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    460486      this.populationSizeLabel.AutoSize = true;
    461       this.populationSizeLabel.Location = new System.Drawing.Point(65, 81);
     487      this.populationSizeLabel.Location = new System.Drawing.Point(65, 86);
    462488      this.populationSizeLabel.Name = "populationSizeLabel";
    463489      this.populationSizeLabel.Size = new System.Drawing.Size(25, 13);
     
    468494      //
    469495      this.lambdaTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    470       this.lambdaTextBox.Location = new System.Drawing.Point(218, 104);
     496      this.lambdaTextBox.Location = new System.Drawing.Point(218, 135);
    471497      this.lambdaTextBox.Name = "lambdaTextBox";
    472498      this.lambdaTextBox.Size = new System.Drawing.Size(186, 20);
     
    498524      this.abortButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    499525      this.abortButton.Enabled = false;
    500       this.abortButton.Location = new System.Drawing.Point(81, 396);
     526      this.abortButton.Location = new System.Drawing.Point(81, 459);
    501527      this.abortButton.Name = "abortButton";
    502528      this.abortButton.Size = new System.Drawing.Size(75, 23);
     
    509535      //
    510536      this.resetButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    511       this.resetButton.Location = new System.Drawing.Point(162, 396);
     537      this.resetButton.Location = new System.Drawing.Point(162, 459);
    512538      this.resetButton.Name = "resetButton";
    513539      this.resetButton.Size = new System.Drawing.Size(75, 23);
     
    520546      //
    521547      this.cloneEngineButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    522       this.cloneEngineButton.Location = new System.Drawing.Point(420, 396);
     548      this.cloneEngineButton.Location = new System.Drawing.Point(420, 459);
    523549      this.cloneEngineButton.Name = "cloneEngineButton";
    524550      this.cloneEngineButton.Size = new System.Drawing.Size(106, 23);
     
    528554      this.cloneEngineButton.Click += new System.EventHandler(this.cloneEngineButton_Click);
    529555      //
    530       // useSuccessRuleMutationStrengthAdjustmentCheckBox
    531       //
    532       this.useSuccessRuleCheckBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    533       this.useSuccessRuleCheckBox.AutoSize = true;
    534       this.useSuccessRuleCheckBox.Checked = true;
    535       this.useSuccessRuleCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
    536       this.useSuccessRuleCheckBox.Location = new System.Drawing.Point(411, 184);
    537       this.useSuccessRuleCheckBox.Name = "useSuccessRuleMutationStrengthAdjustmentCheckBox";
    538       this.useSuccessRuleCheckBox.Size = new System.Drawing.Size(51, 17);
    539       this.useSuccessRuleCheckBox.TabIndex = 40;
    540       this.useSuccessRuleCheckBox.Text = "Use?";
    541       this.useSuccessRuleCheckBox.UseVisualStyleBackColor = true;
    542       this.useSuccessRuleCheckBox.CheckedChanged += new System.EventHandler(this.useSuccessRuleCheckBox_CheckedChanged);
     556      // rhoLabel
     557      //
     558      this.rhoLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
     559      this.rhoLabel.AutoSize = true;
     560      this.rhoLabel.Location = new System.Drawing.Point(65, 112);
     561      this.rhoLabel.Name = "rhoLabel";
     562      this.rhoLabel.Size = new System.Drawing.Size(30, 13);
     563      this.rhoLabel.TabIndex = 6;
     564      this.rhoLabel.Text = "Rho:";
     565      //
     566      // rhoTextBox
     567      //
     568      this.rhoTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
     569      this.rhoTextBox.Location = new System.Drawing.Point(218, 109);
     570      this.rhoTextBox.Name = "rhoTextBox";
     571      this.rhoTextBox.Size = new System.Drawing.Size(186, 20);
     572      this.rhoTextBox.TabIndex = 7;
     573      //
     574      // recombinationLabel
     575      //
     576      this.recombinationLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
     577      this.recombinationLabel.AutoSize = true;
     578      this.recombinationLabel.Location = new System.Drawing.Point(65, 390);
     579      this.recombinationLabel.Name = "recombinationLabel";
     580      this.recombinationLabel.Size = new System.Drawing.Size(81, 13);
     581      this.recombinationLabel.TabIndex = 35;
     582      this.recombinationLabel.Text = "Recombination:";
     583      //
     584      // recombinationTextBox
     585      //
     586      this.recombinationTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
     587      this.recombinationTextBox.Location = new System.Drawing.Point(218, 387);
     588      this.recombinationTextBox.Name = "recombinationTextBox";
     589      this.recombinationTextBox.ReadOnly = true;
     590      this.recombinationTextBox.Size = new System.Drawing.Size(186, 20);
     591      this.recombinationTextBox.TabIndex = 36;
     592      //
     593      // setRecombinationButton
     594      //
     595      this.setRecombinationButton.Anchor = System.Windows.Forms.AnchorStyles.None;
     596      this.setRecombinationButton.Location = new System.Drawing.Point(469, 387);
     597      this.setRecombinationButton.Name = "setRecombinationButton";
     598      this.setRecombinationButton.Size = new System.Drawing.Size(43, 20);
     599      this.setRecombinationButton.TabIndex = 38;
     600      this.setRecombinationButton.Text = "Set...";
     601      this.setRecombinationButton.UseVisualStyleBackColor = true;
     602      this.setRecombinationButton.Click += new System.EventHandler(this.setRecombinationButton_Click);
     603      //
     604      // viewRecombinationButton
     605      //
     606      this.viewRecombinationButton.Anchor = System.Windows.Forms.AnchorStyles.None;
     607      this.viewRecombinationButton.Location = new System.Drawing.Point(410, 387);
     608      this.viewRecombinationButton.Name = "viewRecombinationButton";
     609      this.viewRecombinationButton.Size = new System.Drawing.Size(53, 20);
     610      this.viewRecombinationButton.TabIndex = 37;
     611      this.viewRecombinationButton.Text = "View...";
     612      this.viewRecombinationButton.UseVisualStyleBackColor = true;
     613      this.viewRecombinationButton.Click += new System.EventHandler(this.viewRecombinationButton_Click);
    543614      //
    544615      // ESEditor
     
    552623      this.Controls.Add(this.executeButton);
    553624      this.Name = "ESEditor";
    554       this.Size = new System.Drawing.Size(526, 419);
     625      this.Size = new System.Drawing.Size(526, 482);
    555626      this.tabControl.ResumeLayout(false);
    556627      this.parametersTabPage.ResumeLayout(false);
     
    604675    private System.Windows.Forms.Label targetSuccessRateLabel;
    605676    private System.Windows.Forms.CheckBox useSuccessRuleCheckBox;
     677    private System.Windows.Forms.Button setRecombinationButton;
     678    private System.Windows.Forms.Button viewRecombinationButton;
     679    private System.Windows.Forms.TextBox recombinationTextBox;
     680    private System.Windows.Forms.Label recombinationLabel;
     681    private System.Windows.Forms.TextBox rhoTextBox;
     682    private System.Windows.Forms.Label rhoLabel;
    606683  }
    607684}
  • trunk/sources/HeuristicLab.ES/ESEditor.cs

    r81 r86  
    6666      // neither Refresh() nor Update() work
    6767      muTextBox.Text = ES.Mu.ToString();
     68      rhoTextBox.Text = ES.Rho.ToString();
    6869      lambdaTextBox.Text = ES.Lambda.ToString();
    6970    }
     
    7980        mutationTextBox.Text = ES.Mutator.GetType().Name;
    8081        evaluationTextBox.Text = ES.Evaluator.GetType().Name;
     82        recombinationTextBox.Text = ES.Recombinator.GetType().Name;
    8183      }
    8284    }
     
    8688      randomSeedTextBox.DataBindings.Add("Text", ES, "Seed");
    8789      muTextBox.DataBindings.Add("Text", ES, "Mu");
     90      rhoTextBox.DataBindings.Add("Text", ES, "Rho");
    8891      lambdaTextBox.DataBindings.Add("Text", ES, "Lambda");
    8992      maximumGenerationsTextBox.DataBindings.Add("Text", ES, "MaximumGenerations");
     
    9699    private void plusNotationButton_Click(object sender, EventArgs e) {
    97100      if (plusNotationButton.Text.Equals("Plus")) {
    98         plusNotationButton.Text = "Point";
     101        plusNotationButton.Text = "Comma";
    99102      } else {
    100103        plusNotationButton.Text = "Plus";
     
    122125        PluginManager.ControlManager.ShowControl(view);
    123126    }
     127    private void viewRecombinationButton_Click(object sender, EventArgs e) {
     128      IView view = ES.Recombinator.CreateView();
     129      if (view != null)
     130        PluginManager.ControlManager.ShowControl(view);
     131    }
    124132    private void setProblemInitializationButton_Click(object sender, EventArgs e) {
    125133      if (chooseOperatorDialog == null) chooseOperatorDialog = new ChooseOperatorDialog();
     
    148156        ES.Evaluator = chooseOperatorDialog.Operator;
    149157        evaluationTextBox.Text = ES.Evaluator.GetType().Name;
     158      }
     159    }
     160    private void setRecombinationButton_Click(object sender, EventArgs e) {
     161      if (chooseOperatorDialog == null) chooseOperatorDialog = new ChooseOperatorDialog();
     162      if (chooseOperatorDialog.ShowDialog(this) == DialogResult.OK) {
     163        ES.Recombinator = chooseOperatorDialog.Operator;
     164        recombinationTextBox.Text = ES.Recombinator.GetType().Name;
    150165      }
    151166    }
  • trunk/sources/HeuristicLab.ES/HeuristicLab.ES.csproj

    r84 r86  
    5151  <ItemGroup>
    5252    <Compile Include="ES.cs" />
     53    <Compile Include="ESRandomSelector.cs" />
    5354    <Compile Include="HeuristicLabESPlugin.cs" />
    5455    <Compile Include="Properties\AssemblyInfo.cs" />
  • trunk/sources/HeuristicLab.RealVector/HeuristicLab.RealVector.csproj

    r85 r86  
    4545    <Compile Include="DiscreteCrossover.cs" />
    4646    <Compile Include="HeuristicCrossover.cs" />
     47    <Compile Include="IntermediateRecombination.cs" />
    4748    <Compile Include="RandomConvexCrossover.cs" />
    4849    <Compile Include="LocalCrossover.cs" />
     50    <Compile Include="DiscreteRecombination.cs" />
    4951    <Compile Include="UniformAllPositionsManipulator.cs" />
    5052    <Compile Include="UniformRandomRealVectorGenerator.cs" />
Note: See TracChangeset for help on using the changeset viewer.