Changeset 78 for trunk/sources/HeuristicLab.ES/ES.cs
- Timestamp:
- 03/19/08 12:23:17 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.ES/ES.cs
r71 r78 159 159 op.OperatorGraph.InitialOperator = sp; 160 160 161 LeftSelector ls = new LeftSelector();162 ls.Name = "Child Selector";163 ls.GetVariableInfo("Selected").ActualName = "ESlambda";164 ls.GetVariable("CopySelected").Value = new BoolData(true);165 op.OperatorGraph.AddOperator( ls);166 sp.AddSubOperator( ls);161 RandomSelector rs = new RandomSelector(); 162 rs.Name = "Child Selector"; 163 rs.GetVariableInfo("Selected").ActualName = "ESlambda"; 164 rs.GetVariable("CopySelected").Value = new BoolData(true); 165 op.OperatorGraph.AddOperator(rs); 166 sp.AddSubOperator(rs); 167 167 168 168 SequentialSubScopesProcessor ssp = new SequentialSubScopesProcessor(); … … 334 334 public int Mu { 335 335 get { return myMu.Data; } 336 set { myMu.Data = value; } 336 set { 337 myMu.Data = value; 338 if (!PlusNotation && value >= Lambda) myLambda.Data = value + 1; 339 OnChanged(); 340 } 337 341 } 338 342 private IntData myLambda; 339 343 public int Lambda { 340 344 get { return myLambda.Data; } 341 set { myLambda.Data = value; } 345 set { 346 if (value > 0) { 347 if (PlusNotation) myLambda.Data = value; 348 else { 349 if (value > 1 && value < Mu) { 350 myLambda.Data = value; 351 myMu.Data = value - 1; 352 } else if (value == 1) { 353 myMu.Data = 1; 354 myLambda.Data = 2; 355 } else if (value > Mu) { 356 myLambda.Data = value; 357 } 358 } 359 OnChanged(); 360 } 361 } 342 362 } 343 363 private BoolData myPlusNotation; 344 364 public bool PlusNotation { 345 365 get { return myPlusNotation.Data; } 346 set { myPlusNotation.Data = value; } 366 set { 367 if (!value && myPlusNotation.Data) { // from plus to point 368 if (Lambda <= Mu) { 369 myLambda.Data = Mu + 1; 370 } 371 } 372 myPlusNotation.Data = value; 373 OnChanged(); 374 } 347 375 } 348 376 private DoubleData myShakingFactor;
Note: See TracChangeset
for help on using the changeset viewer.