Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3198 for trunk/sources


Ignore:
Timestamp:
03/23/10 02:14:26 (15 years ago)
Author:
swagner
Message:

Renamed files/classes (#945).

Location:
trunk/sources
Files:
5 edited
5 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm.Views/3.3/GeneticAlgorithmView.Designer.cs

    r3196 r3198  
    2121
    2222namespace HeuristicLab.Algorithms.GeneticAlgorithm.Views {
    23   partial class SGAView {
     23  partial class GeneticAlgorithmView {
    2424    /// <summary>
    2525    /// Required designer variable.
     
    143143      this.descriptionTextBox.Size = new System.Drawing.Size(672, 20);
    144144      //
    145       // SGAView
     145      // GeneticAlgorithmView
    146146      //
    147147      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    148148      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    149       this.Name = "SGAView";
     149      this.Name = "GeneticAlgorithmView";
    150150      this.Size = new System.Drawing.Size(744, 576);
    151151      this.engineTabPage.ResumeLayout(false);
  • trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm.Views/3.3/GeneticAlgorithmView.cs

    r3196 r3198  
    2727  /// The base class for visual representations of items.
    2828  /// </summary>
    29   [View("SGA View")]
    30   [Content(typeof(SGA), true)]
    31   public sealed partial class SGAView : EngineAlgorithmView {
    32     public new SGA Content {
    33       get { return (SGA)base.Content; }
     29  [View("Genetic Algorithm View")]
     30  [Content(typeof(GeneticAlgorithm), true)]
     31  public sealed partial class GeneticAlgorithmView : EngineAlgorithmView {
     32    public new GeneticAlgorithm Content {
     33      get { return (GeneticAlgorithm)base.Content; }
    3434      set { base.Content = value; }
    3535    }
     
    3838    /// Initializes a new instance of <see cref="ItemBaseView"/>.
    3939    /// </summary>
    40     public SGAView() {
     40    public GeneticAlgorithmView() {
    4141      InitializeComponent();
    4242    }
     
    4545    /// </summary>
    4646    /// <param name="item">The item that should be displayed.</param>
    47     public SGAView(SGA content)
     47    public GeneticAlgorithmView(GeneticAlgorithm content)
    4848      : this() {
    4949      Content = content;
  • trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm.Views/3.3/HeuristicLab.Algorithms.GeneticAlgorithm.Views-3.3.csproj

    r3196 r3198  
    8585  </ItemGroup>
    8686  <ItemGroup>
    87     <Compile Include="HeuristicLabAlgorithmsGeneticAlgorithmViewsPlugin.cs" />
    88     <Compile Include="SGAView.cs">
     87    <Compile Include="GeneticAlgorithmView.cs">
    8988      <SubType>UserControl</SubType>
    9089    </Compile>
    91     <Compile Include="SGAView.Designer.cs">
    92       <DependentUpon>SGAView.cs</DependentUpon>
     90    <Compile Include="GeneticAlgorithmView.Designer.cs">
     91      <DependentUpon>GeneticAlgorithmView.cs</DependentUpon>
    9392    </Compile>
     93    <Compile Include="HeuristicLabAlgorithmsGeneticAlgorithmViewsPlugin.cs" />
    9494    <Compile Include="Properties\AssemblyInfo.cs" />
    9595  </ItemGroup>
  • trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs

    r3196 r3198  
    3434namespace HeuristicLab.Algorithms.GeneticAlgorithm {
    3535  /// <summary>
    36   /// A standard genetic algorithm.
     36  /// A genetic algorithm.
    3737  /// </summary>
    38   [Item("SGA", "A standard genetic algorithm.")]
     38  [Item("Genetic Algorithm", "A genetic algorithm.")]
    3939  [Creatable("Algorithms")]
    4040  [StorableClass]
    41   public sealed class SGA : EngineAlgorithm {
     41  public sealed class GeneticAlgorithm : EngineAlgorithm {
    4242    #region Problem Properties
    4343    public override Type ProblemType {
     
    123123      get { return (SolutionsCreator)RandomCreator.Successor; }
    124124    }
    125     private SGAMainLoop SGAMainLoop {
    126       get { return (SGAMainLoop)SolutionsCreator.Successor; }
     125    private GeneticAlgorithmMainLoop GeneticAlgorithmMainLoop {
     126      get { return (GeneticAlgorithmMainLoop)SolutionsCreator.Successor; }
    127127    }
    128128    private List<ISelector> selectors;
     
    132132    #endregion
    133133
    134     public SGA()
     134    public GeneticAlgorithm()
    135135      : base() {
    136136      Parameters.Add(new ValueParameter<IntValue>("Seed", "The random seed used to initialize the new pseudo random number generator.", new IntValue(0)));
     
    146146      RandomCreator randomCreator = new RandomCreator();
    147147      SolutionsCreator solutionsCreator = new SolutionsCreator();
    148       SGAMainLoop sgaMainLoop = new SGAMainLoop();
     148      GeneticAlgorithmMainLoop geneticAlgorithmMainLoop = new GeneticAlgorithmMainLoop();
    149149      OperatorGraph.InitialOperator = randomCreator;
    150150
     
    157157
    158158      solutionsCreator.NumberOfSolutionsParameter.ActualName = PopulationSizeParameter.Name;
    159       solutionsCreator.Successor = sgaMainLoop;
    160 
    161       sgaMainLoop.SelectorParameter.ActualName = SelectorParameter.Name;
    162       sgaMainLoop.CrossoverParameter.ActualName = CrossoverParameter.Name;
    163       sgaMainLoop.ElitesParameter.ActualName = ElitesParameter.Name;
    164       sgaMainLoop.MaximumGenerationsParameter.ActualName = MaximumGenerationsParameter.Name;
    165       sgaMainLoop.MutatorParameter.ActualName = MutatorParameter.Name;
    166       sgaMainLoop.MutationProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
    167       sgaMainLoop.RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName;
    168       sgaMainLoop.ResultsParameter.ActualName = "Results";
     159      solutionsCreator.Successor = geneticAlgorithmMainLoop;
     160
     161      geneticAlgorithmMainLoop.SelectorParameter.ActualName = SelectorParameter.Name;
     162      geneticAlgorithmMainLoop.CrossoverParameter.ActualName = CrossoverParameter.Name;
     163      geneticAlgorithmMainLoop.ElitesParameter.ActualName = ElitesParameter.Name;
     164      geneticAlgorithmMainLoop.MaximumGenerationsParameter.ActualName = MaximumGenerationsParameter.Name;
     165      geneticAlgorithmMainLoop.MutatorParameter.ActualName = MutatorParameter.Name;
     166      geneticAlgorithmMainLoop.MutationProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
     167      geneticAlgorithmMainLoop.RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName;
     168      geneticAlgorithmMainLoop.ResultsParameter.ActualName = "Results";
    169169
    170170      Initialze();
    171171    }
    172172    [StorableConstructor]
    173     private SGA(bool deserializing) : base() { }
     173    private GeneticAlgorithm(bool deserializing) : base() { }
    174174
    175175    public override IDeepCloneable Clone(Cloner cloner) {
    176       SGA clone = (SGA)base.Clone(cloner);
     176      GeneticAlgorithm clone = (GeneticAlgorithm)base.Clone(cloner);
    177177      clone.Initialze();
    178178      return clone;
     
    193193      foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
    194194      ParameterizeSolutionsCreator();
    195       ParameterizeSGAMainLoop();
     195      ParameterizeGeneticAlgorithmMainLoop();
    196196      ParameterizeSelectors();
    197197      UpdateCrossovers();
     
    210210      ParameterizeStochasticOperator(Problem.Evaluator);
    211211      ParameterizeSolutionsCreator();
    212       ParameterizeSGAMainLoop();
     212      ParameterizeGeneticAlgorithmMainLoop();
    213213      ParameterizeSelectors();
    214214      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
     
    217217    protected override void Problem_VisualizerChanged(object sender, EventArgs e) {
    218218      ParameterizeStochasticOperator(Problem.Visualizer);
    219       ParameterizeSGAMainLoop();
     219      ParameterizeGeneticAlgorithmMainLoop();
    220220      if (Problem.Visualizer != null) Problem.Visualizer.VisualizationParameter.ActualNameChanged += new EventHandler(Visualizer_VisualizationParameter_ActualNameChanged);
    221221      base.Problem_VisualizerChanged(sender, e);
     
    242242    }
    243243    private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
    244       ParameterizeSGAMainLoop();
     244      ParameterizeGeneticAlgorithmMainLoop();
    245245      ParameterizeSelectors();
    246246    }
    247247    private void Visualizer_VisualizationParameter_ActualNameChanged(object sender, EventArgs e) {
    248       ParameterizeSGAMainLoop();
     248      ParameterizeGeneticAlgorithmMainLoop();
    249249    }
    250250    #endregion
     
    271271      SolutionsCreator.SolutionCreatorParameter.ActualName = Problem.SolutionCreatorParameter.Name;
    272272    }
    273     private void ParameterizeSGAMainLoop() {
    274       SGAMainLoop.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
    275       SGAMainLoop.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
    276       SGAMainLoop.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
    277       SGAMainLoop.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
    278       SGAMainLoop.VisualizerParameter.ActualName = Problem.VisualizerParameter.Name;
     273    private void ParameterizeGeneticAlgorithmMainLoop() {
     274      GeneticAlgorithmMainLoop.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
     275      GeneticAlgorithmMainLoop.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
     276      GeneticAlgorithmMainLoop.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
     277      GeneticAlgorithmMainLoop.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
     278      GeneticAlgorithmMainLoop.VisualizerParameter.ActualName = Problem.VisualizerParameter.Name;
    279279      if (Problem.Visualizer != null)
    280         SGAMainLoop.VisualizationParameter.ActualName = Problem.Visualizer.VisualizationParameter.ActualName;
     280        GeneticAlgorithmMainLoop.VisualizationParameter.ActualName = Problem.Visualizer.VisualizationParameter.ActualName;
    281281    }
    282282    private void ParameterizeStochasticOperator(IOperator op) {
  • trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithmMainLoop.cs

    r3196 r3198  
    3131namespace HeuristicLab.Algorithms.GeneticAlgorithm {
    3232  /// <summary>
    33   /// An operator which represents the main loop of a standard genetic algorithm (SGA).
     33  /// An operator which represents the main loop of a genetic algorithm.
    3434  /// </summary>
    35   [Item("SGAMainLoop", "An operator which represents the main loop of a standard genetic algorithm (SGA).")]
     35  [Item("GeneticAlgorithmMainLoop", "An operator which represents the main loop of a genetic algorithm.")]
    3636  [StorableClass]
    37   public sealed class SGAMainLoop : AlgorithmOperator {
     37  public sealed class GeneticAlgorithmMainLoop : AlgorithmOperator {
    3838    #region Parameter properties
    3939    public ValueLookupParameter<IRandom> RandomParameter {
     
    8989
    9090    [StorableConstructor]
    91     private SGAMainLoop(bool deserializing) : base() { }
    92     public SGAMainLoop()
     91    private GeneticAlgorithmMainLoop(bool deserializing) : base() { }
     92    public GeneticAlgorithmMainLoop()
    9393      : base() {
    9494      Initialize();
     
    111111      Parameters.Add(new ValueLookupParameter<IOperator>("Visualizer", "The operator used to visualize solutions."));
    112112      Parameters.Add(new LookupParameter<IItem>("Visualization", "The item which represents the visualization of solutions."));
    113       Parameters.Add(new ScopeParameter("CurrentScope", "The current scope which represents a population of solutions on which the SGA should be applied."));
     113      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope which represents a population of solutions on which the genetic algorithm should be applied."));
    114114      #endregion
    115115
  • trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/HeuristicLab.Algorithms.GeneticAlgorithm-3.3.csproj

    r3196 r3198  
    8282  </ItemGroup>
    8383  <ItemGroup>
     84    <Compile Include="GeneticAlgorithm.cs" />
     85    <Compile Include="GeneticAlgorithmMainLoop.cs" />
    8486    <Compile Include="HeuristicLabAlgorithmsGeneticAlgorithmPlugin.cs" />
    85     <Compile Include="SGA.cs">
    86       <SubType>Code</SubType>
    87     </Compile>
    8887    <Compile Include="Properties\AssemblyInfo.cs" />
    89     <Compile Include="SGAMainLoop.cs" />
    9088  </ItemGroup>
    9189  <ItemGroup>
  • trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/Tests/HeuristicLab.Algorithms.GeneticAlgorithm-3.3.Tests.csproj

    r3196 r3198  
    156156  </ItemGroup>
    157157  <ItemGroup>
    158     <None Include="SGA.hl">
    159       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    160     </None>
     158    <None Include="GeneticAlgorithm.hl" />
    161159  </ItemGroup>
    162160  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  • trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/Tests/Properties/AssemblyInfo.cs

    r3196 r3198  
    77// associated with an assembly.
    88[assembly: AssemblyTitle("HeuristicLab.Algorithms.GeneticAlgorithm-3.3.Tests")]
    9 [assembly: AssemblyDescription("Unit tests for the HeuristicLab standard genetic algorithm (SGA)")]
     9[assembly: AssemblyDescription("Unit tests for the HeuristicLab genetic algorithm")]
    1010[assembly: AssemblyConfiguration("")]
    1111[assembly: AssemblyCompany("")]
  • trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/Tests/UnitTest.cs

    r3196 r3198  
    8080
    8181    [TestMethod]
    82     [DeploymentItem(@"SGA.hl")]
    83     public void SGAPerformanceTest() {
     82    [DeploymentItem(@"GeneticAlgorithm.hl")]
     83    public void GeneticAlgorithmPerformanceTest() {
    8484      ex = null;
    85       IAlgorithm sga = (IAlgorithm)XmlParser.Deserialize("SGA.hl");
    86       sga.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(sga_ExceptionOccurred);
    87       sga.Stopped += new EventHandler(sga_Stopped);
    88       sga.Prepare();
    89       sga.Start();
     85      IAlgorithm ga = (IAlgorithm)XmlParser.Deserialize("GeneticAlgorithm.hl");
     86      ga.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(ga_ExceptionOccurred);
     87      ga.Stopped += new EventHandler(ga_Stopped);
     88      ga.Prepare();
     89      ga.Start();
    9090      trigger.WaitOne();
    91       TestContext.WriteLine("Runtime: {0}", sga.ExecutionTime.ToString());
     91      TestContext.WriteLine("Runtime: {0}", ga.ExecutionTime.ToString());
    9292      if (ex != null) throw ex;
    9393    }
    9494
    95     private void sga_ExceptionOccurred(object sender, EventArgs<Exception> e) {
     95    private void ga_ExceptionOccurred(object sender, EventArgs<Exception> e) {
    9696      ex = e.Value;
    9797    }
    9898
    99     private void sga_Stopped(object sender, EventArgs e) {
     99    private void ga_Stopped(object sender, EventArgs e) {
    100100      trigger.Set();
    101101    }
Note: See TracChangeset for help on using the changeset viewer.