Changeset 896 for trunk/sources
- Timestamp:
- 12/04/08 09:01:27 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.ES/ES.cs
r98 r896 35 35 36 36 namespace HeuristicLab.ES { 37 /// <summary> 38 /// Class for the heuristic optimization technique "evolution strategy". 39 /// </summary> 37 40 public class ES : ItemBase, IEditable { 38 41 #region Create Operators 42 /// <summary> 43 /// Creates a new evolution strategy. 44 /// </summary> 45 /// <param name="engine">The engine of the ES to create.</param> 39 46 public static void Create(IEngine engine) { 40 47 engine.OperatorGraph.Clear(); … … 373 380 #region Properties 374 381 private IEngine myEngine; 382 /// <summary> 383 /// Gets the engine of the current instance. 384 /// </summary> 375 385 public IEngine Engine { 376 386 get { return myEngine; } 377 387 } 378 388 private BoolData mySetSeedRandomly; 389 /// <summary> 390 /// Gets or sets the boolean flag whether to set the seed randomly or not. 391 /// </summary> 379 392 public bool SetSeedRandomly { 380 393 get { return mySetSeedRandomly.Data; } … … 382 395 } 383 396 private IntData mySeed; 397 /// <summary> 398 /// Gets or sets the seed of the current instance. 399 /// </summary> 400 /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ItemBase"/> 401 /// in the setter.</remarks> 384 402 public int Seed { 385 403 get { return mySeed.Data; } … … 390 408 } 391 409 private IntData myMu; 410 /// <summary> 411 /// Gets or sets the µ value of the current instance. 412 /// </summary> 413 /// <remarks>Sets also the lambda and the rho value. Calls <see cref="ItemBase.OnChanged"/> of 414 /// base class <see cref="ItemBase"/>.</remarks> 392 415 public int Mu { 393 416 get { return myMu.Data; } … … 402 425 } 403 426 private IntData myRho; 427 /// <summary> 428 /// Gets or sets the rho value of the current instance. 429 /// </summary> 430 /// <remarks>Sets also the µ value. Calls <see cref="ItemBase.OnChanged"/> of 431 /// base class <see cref="ItemBase"/>.</remarks> 404 432 public int Rho { 405 433 get { return myRho.Data; } … … 413 441 } 414 442 private IntData myLambda; 443 /// <summary> 444 /// Gets or sets the lambda value of the current instance. 445 /// </summary> 446 /// <remarks>May also change the µ value under certain circumstances. 447 /// Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ItemBase"/>.</remarks> 415 448 public int Lambda { 416 449 get { return myLambda.Data; } … … 434 467 } 435 468 private BoolData myPlusNotation; 469 /// <summary> 470 /// Gets or sets the boolean flag whether it is a plus notation or not. 471 /// </summary> 472 /// <remarks>May also set the lambda value under certain circumstances. 473 /// Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ItemBase"/>.</remarks> 436 474 public bool PlusNotation { 437 475 get { return myPlusNotation.Data; } … … 447 485 } 448 486 private DoubleData myShakingFactor; 487 /// <summary> 488 /// Gets or sets the shaking factor of the current instance. 489 /// </summary> 449 490 public double ShakingFactor { 450 491 get { return myShakingFactor.Data; } … … 452 493 } 453 494 private DoubleData mySuccessProbability; 495 454 496 private DoubleData myTargetSuccessProbability; 497 /// <summary> 498 /// Gets or sets the success probability. 499 /// </summary> 500 /// <remarks>Gets the target success probability and sets also the target success probability.</remarks> 455 501 public double SuccessProbability { 456 502 get { return myTargetSuccessProbability.Data; } … … 461 507 } 462 508 private DoubleData myLearningRate; 509 /// <summary> 510 /// Gets or sets the learning rate. 511 /// </summary> 512 /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ItemBase"/> 513 /// in the setter.</remarks> 463 514 public double LearningRate { 464 515 get { return myLearningRate.Data; } … … 471 522 } 472 523 private DoubleData myDampeningFactor; 524 /// <summary> 525 /// Gets or sets the dampening factor. 526 /// </summary> 527 /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ItemBase"/> 528 /// in the setter.</remarks> 473 529 public double DampeningFactor { 474 530 get { return myDampeningFactor.Data; } … … 481 537 } 482 538 private IntData myMaximumGenerations; 539 /// <summary> 540 /// Gets or sets the maximum number of generations. 541 /// </summary> 483 542 public int MaximumGenerations { 484 543 get { return myMaximumGenerations.Data; } … … 486 545 } 487 546 private BoolData myUseSuccessRule; 547 /// <summary> 548 /// Gets or sets the boolean flag whether to use the success rule or not. 549 /// </summary> 488 550 public bool UseSuccessRule { 489 551 get { return myUseSuccessRule.Data; } … … 493 555 private IOperator myESMain; 494 556 private IOperator myVariableInjection; 557 /// <summary> 558 /// Gets or sets the problem injection operator. 559 /// </summary> 495 560 public IOperator ProblemInjector { 496 561 get { return myVariableInjection.SubOperators[0]; } … … 503 568 } 504 569 private IOperator myPopulationInitialization; 570 /// <summary> 571 /// Gets or sets the solution generation operator. 572 /// </summary> 505 573 public IOperator SolutionGenerator { 506 574 get { return myPopulationInitialization.SubOperators[0]; } … … 512 580 } 513 581 } 582 /// <summary> 583 /// Gets or sets the evaluation operator. 584 /// </summary> 514 585 public IOperator Evaluator { 515 586 get { return myPopulationInitialization.SubOperators[1]; } … … 522 593 } 523 594 } 595 /// <summary> 596 /// Gets or sets the mutation operator. 597 /// </summary> 524 598 public IOperator Mutator { 525 599 get { return myESMain.SubOperators[0]; } … … 531 605 } 532 606 } 607 /// <summary> 608 /// Gets or sets the recombination operator. 609 /// </summary> 533 610 public IOperator Recombinator { 534 611 get { return myESMain.SubOperators[2]; } … … 542 619 #endregion 543 620 621 /// <summary> 622 /// Initializes a new instance of <see cref="ES"/> having a <see cref="SequentialEngine"/> as engine. 623 /// </summary> 544 624 public ES() { 545 625 myEngine = new SequentialEngine.SequentialEngine(); … … 548 628 } 549 629 630 /// <summary> 631 /// Creates a new instance of <see cref="ESEditor"/> to display the current instance. 632 /// </summary> 633 /// <returns>The created view as <see cref="ESEditor"/>.</returns> 550 634 public override IView CreateView() { 551 635 return new ESEditor(this); 552 636 } 637 /// <summary> 638 /// Creates a new instance of <see cref="ESEditor"/> to display the current instance. 639 /// </summary> 640 /// <returns>The created editor as <see cref="ESEditor"/>.</returns> 553 641 public virtual IEditor CreateEditor() { 554 642 return new ESEditor(this); 555 643 } 556 644 645 /// <summary> 646 /// Clones the current instance (deep clone). 647 /// </summary> 648 /// <remarks>Uses <see cref="Auxiliary.Clone"/> method of the <see cref="Auxiliary"/> class to 649 /// clone the engine.</remarks> 650 /// <param name="clonedObjects">A dictionary of all already cloned objects. 651 /// (Needed to avoid cycles.)</param> 652 /// <returns>The cloned object as <see cref="ES"/>.</returns> 557 653 public override object Clone(IDictionary<Guid, object> clonedObjects) { 558 654 ES clone = new ES(); … … 601 697 602 698 #region Persistence Methods 699 /// <summary> 700 /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>. 701 /// </summary> 702 /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>. 703 /// <br/>The engine of the current instance is saved as child node with tag name <c>Engine</c>.</remarks> 704 /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param> 705 /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param> 706 /// <param name="persistedObjects">The dictionary of all already persisted objects. 707 /// (Needed to avoid cycles.)</param> 708 /// <returns>The saved <see cref="XmlNode"/>.</returns> 603 709 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) { 604 710 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 606 712 return node; 607 713 } 714 /// <summary> 715 /// Loads the persisted ES from the specified <paramref name="node"/>. 716 /// </summary> 717 /// <remarks>Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.<br/> 718 /// The engine must be saved as child node with tag name <c>Engine</c> (see 719 /// <see cref="GetXmlNode"/>).</remarks> 720 /// <param name="node">The <see cref="XmlNode"/> where the value is saved.</param> 721 /// <param name="restoredObjects">The dictionary of all already restored objects. 722 /// (Needed to avoid cycles.)</param> 608 723 public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) { 609 724 base.Populate(node, restoredObjects); -
trunk/sources/HeuristicLab.ES/ESEditor.cs
r98 r896 31 31 32 32 namespace HeuristicLab.ES { 33 /// <summary> 34 /// Class for visual representation of an <see cref="ES"/>. 35 /// </summary> 33 36 public partial class ESEditor : EditorBase { 34 37 private ChooseOperatorDialog chooseOperatorDialog; 35 38 39 /// <summary> 40 /// Gets or sets the evolution strategy to display. 41 /// </summary> 42 /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="EditorBase"/>. 43 /// No own data storage present.</remarks> 36 44 public ES ES { 37 45 get { return (ES)Item; } … … 39 47 } 40 48 49 /// <summary> 50 /// Initializes a new instance of <see cref="ESEditor"/>. 51 /// </summary> 41 52 public ESEditor() { 42 53 InitializeComponent(); 43 54 } 55 /// <summary> 56 /// Initializes a new instance of <see cref="ESEditor"/> with the given <paramref name="es"/>. 57 /// </summary> 58 /// <param name="es">The evolution strategy to display.</param> 44 59 public ESEditor(ES es) 45 60 : this() { … … 47 62 } 48 63 64 /// <summary> 65 /// Removes all event handlers from the underlying <see cref="ES"/>. 66 /// </summary> 67 /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="EditorBase"/>.</remarks> 49 68 protected override void RemoveItemEvents() { 50 69 ES.Engine.ExceptionOccurred -= new EventHandler<ExceptionEventArgs>(Engine_ExceptionOccurred); … … 54 73 base.RemoveItemEvents(); 55 74 } 75 /// <summary> 76 /// Adds event handlers to the underlying <see cref="ES"/>. 77 /// </summary> 78 /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="EditorBase"/>.</remarks> 56 79 protected override void AddItemEvents() { 57 80 base.AddItemEvents(); … … 72 95 } 73 96 97 /// <summary> 98 /// Updates all controls with the latest data of the model. 99 /// </summary> 100 /// <remarks>Calls <see cref="ViewBase.UpdateControls"/> of base class <see cref="EditorBase"/>.</remarks> 74 101 protected override void UpdateControls() { 75 102 base.UpdateControls(); -
trunk/sources/HeuristicLab.ES/ESRandomSelector.cs
r86 r896 28 28 29 29 namespace HeuristicLab.ES { 30 /// <summary> 31 /// Selects rho*lambda individuals with each rho successing individuals being selected 32 /// from the parent population without repetitions. 33 /// </summary> 30 34 public class ESRandomSelector : OperatorBase { 35 /// <inheritdoc select="summary"/> 31 36 public override string Description { 32 37 get { … … 35 40 } 36 41 42 /// <summary> 43 /// Initializes a new instance of <see cref="ESRandomSelector"/> with three variable infos 44 /// (<c>Random</c>, <c>Lambda</c> and <c>Rho</c>). 45 /// </summary> 37 46 public ESRandomSelector() 38 47 : base() { … … 42 51 } 43 52 53 /// <summary> 54 /// Separates the sub scopes of the given <paramref name="scope"/> in <c>Selected</c> and 55 /// <c>Remaining</c> and selects rho*lambda individuals with each rho successing individuals 56 /// being selected from the parent population without repetitions. 57 /// </summary> 58 /// <param name="scope">The current scope where to perform the selection.</param> 59 /// <returns><c>null</c>.</returns> 44 60 public override IOperation Apply(IScope scope) { 45 61 IScope source = new Scope("Remaining"); … … 58 74 } 59 75 76 /// <summary> 77 /// Selects rho*lambda individuals with each rho successing individuals being selected 78 /// from the parent population (<paramref name="source"/>) without repetitions. 79 /// </summary> 80 /// <exception cref="InvalidOperationException">Thrown when more parents than available should be 81 /// selected per child.</exception> 82 /// <param name="source">The scope where to select the individuals.</param> 83 /// <param name="target">The target scope where to insert the selected individuals.</param> 60 84 protected virtual void Select(IScope source, IScope target) { 61 85 IRandom random = GetVariableValue<IRandom>("Random", source, true); -
trunk/sources/HeuristicLab.ES/HeuristicLabESPlugin.cs
r582 r896 26 26 27 27 namespace HeuristicLab.ES { 28 /// <summary> 29 /// Plugin class for HeuristicLab.ES plugin. 30 /// </summary> 28 31 [ClassInfo(Name = "HeuristicLab.ES-3.2")] 29 32 [PluginFile(Filename = "HeuristicLab.ES-3.2.dll", Filetype = PluginFileType.Assembly)] -
trunk/sources/HeuristicLab.ES/SelfAdaptiveMutationStrengthAdjuster.cs
r99 r896 28 28 29 29 namespace HeuristicLab.ES { 30 /// <summary> 31 /// Mutates the endogenous strategy parameters. 32 /// </summary> 30 33 public class SelfAdaptiveMutationStrengthAdjuster : OperatorBase { 34 /// <inheritdoc select="summary"/> 31 35 public override string Description { 32 36 get { return @"Mutates the endogenous strategy parameters"; } 33 37 } 34 38 39 /// <summary> 40 /// Initializes a new instance of <see cref="SelfAdaptiveMutationStrengthAdjuster"/> with four 41 /// variable infos (<c>Random</c>, <c>StrategyVector</c>, <c>GeneralLearningRate</c> and 42 /// <c>LearningRate</c>). 43 /// </summary> 35 44 public SelfAdaptiveMutationStrengthAdjuster() 36 45 : base() { … … 41 50 } 42 51 52 /// <summary> 53 /// Mutates the endogenous strategy parameters. 54 /// </summary> 55 /// <remarks>Calls <see cref="OperatorBase.Apply"/> of base class <see cref="OperatorBase"/>.</remarks> 56 /// <param name="scope">The current scope to mutate.</param> 57 /// <inheritdoc select="returns"/> 43 58 public override IOperation Apply(IScope scope) { 44 59 IRandom random = GetVariableValue<IRandom>("Random", scope, true); -
trunk/sources/HeuristicLab.ES/VariableStrengthRepeatingManipulator.cs
r96 r896 29 29 30 30 namespace HeuristicLab.ES { 31 /// <summary> 32 /// Applies its sub operator a number of times depending on the <c>ShakingFactor</c>. 33 /// </summary> 31 34 public class VariableStrengthRepeatingManipulator : OperatorBase { 35 /// <inheritdoc select="summary"/> 32 36 public override string Description { 33 37 get { return @"Applies its suboperator a number of times depending on the ShakingFactor"; } 34 38 } 35 39 40 /// <summary> 41 /// Initializes a new instance of <see cref="VariableStrengthRepeatingManipulator"/> with two variable 42 /// infos (<c>Random</c> and <c>ShakingFactor</c>). 43 /// </summary> 36 44 public VariableStrengthRepeatingManipulator() 37 45 : base() { … … 40 48 } 41 49 50 /// <summary> 51 /// Applies its suboperator a number of times depending on the <c>ShakingFactor</c>. 52 /// </summary> 53 /// <param name="scope">The current scope where to apply the operator.</param> 54 /// <returns>A new <see cref="CompositeOperation"/>, containing a specified number of 55 /// the same operations with the same operator, the number depending on the <c>ShakingFactor</c>.</returns> 42 56 public override IOperation Apply(IScope scope) { 43 57 IRandom random = GetVariableValue<IRandom>("Random", scope, true); -
trunk/sources/HeuristicLab.Operators/SubScopesRemover.cs
r801 r896 31 31 /// </summary> 32 32 public class SubScopesRemover : OperatorBase { 33 /// <inheritdoc />33 /// <inheritdoc select="summary"/> 34 34 public override string Description { 35 35 get { -
trunk/sources/HeuristicLab.Routing.TSP/DistanceMatrixPathTSPEvaluator.cs
r884 r896 33 33 /// </summary> 34 34 public class DistanceMatrixPathTSPEvaluator : SingleObjectiveEvaluatorBase { 35 /// <inheritdoc />35 /// <inheritdoc select="summary"/> 36 36 public override string Description { 37 37 get { return @"TODO\r\nOperator description still missing ..."; } -
trunk/sources/HeuristicLab.Routing.TSP/RoundedEuclideanPathTSPEvaluator.cs
r884 r896 33 33 /// </summary> 34 34 public class RoundedEuclideanPathTSPEvaluator : PathTSPEvaluatorBase { 35 /// <inheritdoc />35 /// <inheritdoc select="summary"/> 36 36 public override string Description { 37 37 get { return @"TODO\r\nOperator description still missing ..."; } -
trunk/sources/HeuristicLab.Routing.TSP/TSPInjector.cs
r884 r896 33 33 /// </summary> 34 34 public class TSPInjector : OperatorBase { 35 /// <inheritdoc />35 /// <inheritdoc select="summary"/> 36 36 public override string Description { 37 37 get { return @"TODO\r\nOperator description still missing ..."; } -
trunk/sources/HeuristicLab.Routing.TSP/TSPRoundedEuclideanDistanceMatrixInjector.cs
r884 r896 32 32 /// </summary> 33 33 public class TSPRoundedEuclideanDistanceMatrixInjector : TSPDistanceMatrixInjectorBase { 34 /// <inheritdoc />34 /// <inheritdoc select="summary"/> 35 35 public override string Description { 36 36 get { return @"TODO\r\nOperator description still missing ..."; } -
trunk/sources/HeuristicLab.Routing.TSP/TSPTourInjector.cs
r884 r896 33 33 /// </summary> 34 34 public class TSPTourInjector : OperatorBase { 35 /// <inheritdoc />35 /// <inheritdoc select="summary"/> 36 36 public override string Description { 37 37 get { return @"TODO\r\nOperator description still missing ..."; }
Note: See TracChangeset
for help on using the changeset viewer.