Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9066


Ignore:
Timestamp:
12/17/12 16:03:04 (12 years ago)
Author:
mkommend
Message:

#1997: Adapted IslandGA to allow subclassing.

Location:
branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.GeneticAlgorithm/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/HeuristicLab.Algorithms.GeneticAlgorithm-3.3.csproj

    r8600 r9066  
    101101  </PropertyGroup>
    102102  <ItemGroup>
     103    <Reference Include="HeuristicLab.Analysis-3.3">
     104      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
     105    </Reference>
     106    <Reference Include="HeuristicLab.Collections-3.3">
     107      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
     108    </Reference>
     109    <Reference Include="HeuristicLab.Common-3.3">
     110      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
     111    </Reference>
     112    <Reference Include="HeuristicLab.Core-3.3">
     113      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
     114    </Reference>
     115    <Reference Include="HeuristicLab.Data-3.3">
     116      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
     117    </Reference>
     118    <Reference Include="HeuristicLab.Operators-3.3">
     119      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
     120    </Reference>
     121    <Reference Include="HeuristicLab.Optimization-3.3">
     122      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
     123    </Reference>
     124    <Reference Include="HeuristicLab.Optimization.Operators-3.3">
     125      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath>
     126    </Reference>
     127    <Reference Include="HeuristicLab.Parameters-3.3">
     128      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
     129    </Reference>
     130    <Reference Include="HeuristicLab.Persistence-3.3">
     131      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
     132    </Reference>
     133    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
     134      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     135    </Reference>
     136    <Reference Include="HeuristicLab.Random-3.3">
     137      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
     138    </Reference>
     139    <Reference Include="HeuristicLab.Selection-3.3">
     140      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Selection-3.3.dll</HintPath>
     141    </Reference>
    103142    <Reference Include="System" />
    104143    <Reference Include="System.Core">
     
    115154    <Compile Include="Plugin.cs" />
    116155    <Compile Include="Properties\AssemblyInfo.cs" />
    117   </ItemGroup>
    118   <ItemGroup>
    119     <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
    120       <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
    121       <Name>HeuristicLab.Analysis-3.3</Name>
    122       <Private>False</Private>
    123     </ProjectReference>
    124     <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
    125       <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
    126       <Name>HeuristicLab.Collections-3.3</Name>
    127       <Private>False</Private>
    128     </ProjectReference>
    129     <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
    130       <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
    131       <Name>HeuristicLab.Common-3.3</Name>
    132       <Private>False</Private>
    133     </ProjectReference>
    134     <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
    135       <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
    136       <Name>HeuristicLab.Core-3.3</Name>
    137       <Private>False</Private>
    138     </ProjectReference>
    139     <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
    140       <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
    141       <Name>HeuristicLab.Data-3.3</Name>
    142       <Private>False</Private>
    143     </ProjectReference>
    144     <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
    145       <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
    146       <Name>HeuristicLab.Operators-3.3</Name>
    147       <Private>False</Private>
    148     </ProjectReference>
    149     <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">
    150       <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>
    151       <Name>HeuristicLab.Optimization.Operators-3.3</Name>
    152       <Private>False</Private>
    153     </ProjectReference>
    154     <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
    155       <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
    156       <Name>HeuristicLab.Optimization-3.3</Name>
    157       <Private>False</Private>
    158     </ProjectReference>
    159     <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
    160       <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
    161       <Name>HeuristicLab.Parameters-3.3</Name>
    162       <Private>False</Private>
    163     </ProjectReference>
    164     <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
    165       <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
    166       <Name>HeuristicLab.Persistence-3.3</Name>
    167       <Private>False</Private>
    168     </ProjectReference>
    169     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
    170       <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
    171       <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
    172       <Private>False</Private>
    173     </ProjectReference>
    174     <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
    175       <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>
    176       <Name>HeuristicLab.Random-3.3</Name>
    177       <Private>False</Private>
    178     </ProjectReference>
    179     <ProjectReference Include="..\..\HeuristicLab.Selection\3.3\HeuristicLab.Selection-3.3.csproj">
    180       <Project>{2C36CD4F-E5F5-43A4-801A-201EA895FE17}</Project>
    181       <Name>HeuristicLab.Selection-3.3</Name>
    182       <Private>False</Private>
    183     </ProjectReference>
    184156  </ItemGroup>
    185157  <ItemGroup>
     
    214186  -->
    215187  <PropertyGroup>
    216    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     188    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    217189set ProjectDir=$(ProjectDir)
    218190set SolutionDir=$(SolutionDir)
     
    221193call PreBuildEvent.cmd
    222194</PreBuildEvent>
    223 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
     195    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
    224196export ProjectDir=$(ProjectDir)
    225197export SolutionDir=$(SolutionDir)
  • branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithm.cs

    r9039 r9066  
    4141  [Creatable("Algorithms")]
    4242  [StorableClass]
    43   public sealed class IslandGeneticAlgorithm : HeuristicOptimizationEngineAlgorithm, IStorableContent {
     43  public class IslandGeneticAlgorithm : HeuristicOptimizationEngineAlgorithm, IStorableContent {
    4444    public string Filename { get; set; }
    4545
     
    5555
    5656    #region Parameter Properties
    57     private ValueParameter<IntValue> SeedParameter {
     57    public ValueParameter<IntValue> SeedParameter {
    5858      get { return (ValueParameter<IntValue>)Parameters["Seed"]; }
    5959    }
    60     private ValueParameter<BoolValue> SetSeedRandomlyParameter {
     60    public ValueParameter<BoolValue> SetSeedRandomlyParameter {
    6161      get { return (ValueParameter<BoolValue>)Parameters["SetSeedRandomly"]; }
    6262    }
    63     private ValueParameter<IntValue> NumberOfIslandsParameter {
     63    public ValueParameter<IntValue> NumberOfIslandsParameter {
    6464      get { return (ValueParameter<IntValue>)Parameters["NumberOfIslands"]; }
    6565    }
    66     private ValueParameter<IntValue> MigrationIntervalParameter {
     66    public ValueParameter<IntValue> MigrationIntervalParameter {
    6767      get { return (ValueParameter<IntValue>)Parameters["MigrationInterval"]; }
    6868    }
    69     private ValueParameter<PercentValue> MigrationRateParameter {
     69    public ValueParameter<PercentValue> MigrationRateParameter {
    7070      get { return (ValueParameter<PercentValue>)Parameters["MigrationRate"]; }
    7171    }
     
    7979      get { return (IConstrainedValueParameter<IReplacer>)Parameters["ImmigrationReplacer"]; }
    8080    }
    81     private ValueParameter<IntValue> PopulationSizeParameter {
     81    public ValueParameter<IntValue> PopulationSizeParameter {
    8282      get { return (ValueParameter<IntValue>)Parameters["PopulationSize"]; }
    8383    }
    84     private ValueParameter<IntValue> MaximumGenerationsParameter {
     84    public ValueParameter<IntValue> MaximumGenerationsParameter {
    8585      get { return (ValueParameter<IntValue>)Parameters["MaximumGenerations"]; }
    8686    }
     
    9191      get { return (IConstrainedValueParameter<ICrossover>)Parameters["Crossover"]; }
    9292    }
    93     private ValueParameter<PercentValue> MutationProbabilityParameter {
     93    public ValueParameter<PercentValue> MutationProbabilityParameter {
    9494      get { return (ValueParameter<PercentValue>)Parameters["MutationProbability"]; }
    9595    }
     
    9797      get { return (IConstrainedValueParameter<IManipulator>)Parameters["Mutator"]; }
    9898    }
    99     private ValueParameter<IntValue> ElitesParameter {
     99    public ValueParameter<IntValue> ElitesParameter {
    100100      get { return (ValueParameter<IntValue>)Parameters["Elites"]; }
    101101    }
    102     private ValueParameter<MultiAnalyzer> AnalyzerParameter {
     102    public ValueParameter<MultiAnalyzer> AnalyzerParameter {
    103103      get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; }
    104104    }
    105     private ValueParameter<MultiAnalyzer> IslandAnalyzerParameter {
     105    public ValueParameter<MultiAnalyzer> IslandAnalyzerParameter {
    106106      get { return (ValueParameter<MultiAnalyzer>)Parameters["IslandAnalyzer"]; }
    107107    }
     
    196196
    197197    [StorableConstructor]
    198     private IslandGeneticAlgorithm(bool deserializing) : base(deserializing) { }
     198    protected IslandGeneticAlgorithm(bool deserializing) : base(deserializing) { }
    199199    [StorableHook(HookType.AfterDeserialization)]
    200200    private void AfterDeserialization() {
    201201      Initialize();
    202202    }
    203     private IslandGeneticAlgorithm(IslandGeneticAlgorithm original, Cloner cloner)
     203    protected IslandGeneticAlgorithm(IslandGeneticAlgorithm original, Cloner cloner)
    204204      : base(original, cloner) {
    205205      islandQualityAnalyzer = cloner.Clone(original.islandQualityAnalyzer);
Note: See TracChangeset for help on using the changeset viewer.