Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1225 for trunk/sources


Ignore:
Timestamp:
02/24/09 13:15:48 (16 years ago)
Author:
abeham
Message:

Adapted SGA plugin to use new crossover model, added reference to HeuristicLab.Evolutionary (ticket #496)

Location:
trunk/sources/HeuristicLab.SGA
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.SGA/HeuristicLab.SGA.csproj

    r852 r1225  
    8484      <Name>HeuristicLab.Data</Name>
    8585    </ProjectReference>
     86    <ProjectReference Include="..\HeuristicLab.Evolutionary\HeuristicLab.Evolutionary.csproj">
     87      <Project>{F5614C53-153C-4A37-A608-121E1C087F07}</Project>
     88      <Name>HeuristicLab.Evolutionary</Name>
     89    </ProjectReference>
    8690    <ProjectReference Include="..\HeuristicLab.Logging\HeuristicLab.Logging.csproj">
    8791      <Project>{4095C92C-5A4C-44BC-9963-5F384CF5CC3F}</Project>
  • trunk/sources/HeuristicLab.SGA/HeuristicLabSGAPlugin.cs

    r1153 r1225  
    3333  [Dependency(Dependency = "HeuristicLab.Core-3.2")]
    3434  [Dependency(Dependency = "HeuristicLab.Data-3.2")]
     35  [Dependency(Dependency = "HeuristicLab.Evolutionary-3.2")]
    3536  [Dependency(Dependency = "HeuristicLab.Operators-3.2")]
    3637  [Dependency(Dependency = "HeuristicLab.Random-3.2")]
  • trunk/sources/HeuristicLab.SGA/SGA.cs

    r1153 r1225  
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Data;
     28using HeuristicLab.Evolutionary;
    2829using HeuristicLab.SequentialEngine;
    2930using HeuristicLab.Operators;
     
    266267      op.OperatorGraph.InitialOperator = sp1;
    267268
     269      ChildrenInitializer ci = new ChildrenInitializer();
     270      op.OperatorGraph.AddOperator(ci);
     271      sp1.AddSubOperator(ci);
     272
     273      UniformSequentialSubScopesProcessor ussp = new UniformSequentialSubScopesProcessor();
     274      op.OperatorGraph.AddOperator(ussp);
     275      sp1.AddSubOperator(ussp);
     276
     277      SequentialProcessor sp2 = new SequentialProcessor();
     278      op.OperatorGraph.AddOperator(sp2);
     279      ussp.AddSubOperator(sp2);
     280
    268281      OperatorExtractor oe1 = new OperatorExtractor();
    269282      oe1.Name = "Crossover";
    270283      oe1.GetVariableInfo("Operator").ActualName = "Crossover";
    271284      op.OperatorGraph.AddOperator(oe1);
    272       sp1.AddSubOperator(oe1);
    273 
    274       UniformSequentialSubScopesProcessor ussp = new UniformSequentialSubScopesProcessor();
    275       op.OperatorGraph.AddOperator(ussp);
    276       sp1.AddSubOperator(ussp);
    277 
    278       SequentialProcessor sp2 = new SequentialProcessor();
    279       op.OperatorGraph.AddOperator(sp2);
    280       ussp.AddSubOperator(sp2);
     285      sp2.AddSubOperator(oe1);
    281286
    282287      StochasticBranch hb = new StochasticBranch();
     
    296301      op.OperatorGraph.AddOperator(oe3);
    297302      sp2.AddSubOperator(oe3);
     303
     304      SubScopesRemover sr = new SubScopesRemover();
     305      sr.GetVariableInfo("SubScopeIndex").Local = true;
     306      op.OperatorGraph.AddOperator(sr);
     307      sp2.AddSubOperator(sr);
    298308
    299309      Counter c = new Counter();
Note: See TracChangeset for help on using the changeset viewer.