Changeset 3429


Ignore:
Timestamp:
04/20/10 01:48:30 (11 years ago)
Author:
abeham
Message:

Added an OS Island GA #976
Wired the parallel parameter in the standard Island GA #971

Location:
trunk/sources
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithm.cs

    r3376 r3429  
    180180      get { return (RandomCreator)OperatorGraph.InitialOperator; }
    181181    }
     182    private UniformSubScopesProcessor IslandProcessor {
     183      get { return ((RandomCreator.Successor as SubScopesCreator).Successor as UniformSubScopesProcessor); }
     184    }
    182185    private SolutionsCreator SolutionsCreator {
    183       get { return (SolutionsCreator)((RandomCreator.Successor as SubScopesCreator).Successor as UniformSubScopesProcessor).Operator; }
     186      get { return (SolutionsCreator)IslandProcessor.Operator; }
    184187    }
    185188    private IslandGeneticAlgorithmMainLoop MainLoop {
    186       get { return (IslandGeneticAlgorithmMainLoop)((RandomCreator.Successor as SubScopesCreator).Successor as UniformSubScopesProcessor).Successor; }
     189      get { return (IslandGeneticAlgorithmMainLoop)IslandProcessor.Successor; }
    187190    }
    188191    #endregion
     
    226229      populationCreator.Successor = ussp1;
    227230
     231      ussp1.Parallel = null;
     232      ussp1.ParallelParameter.ActualName = ParallelParameter.Name;
    228233      ussp1.Operator = solutionsCreator;
    229234      ussp1.Successor = mainLoop;
  • trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.csproj

    r3384 r3429  
    8181  <ItemGroup>
    8282    <Compile Include="HeuristicLabAlgorithmsOffspringSelectionGeneticAlgorithmPlugin.cs" />
     83    <Compile Include="OffspringSelectionIslandGeneticAlgorithm.cs" />
     84    <Compile Include="OffspringSelectionIslandGeneticAlgorithmMainLoop.cs" />
    8385    <Compile Include="OffspringSelectionGeneticAlgorithm.cs" />
    8486    <Compile Include="OffspringSelectionGeneticAlgorithmMainLoop.cs" />
  • trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs

    r3427 r3429  
    3737  public sealed class OffspringSelectionGeneticAlgorithmMainLoop : AlgorithmOperator {
    3838    #region Parameter properties
    39     public ValueParameter<VariableCreator> VariableInitializerParameter {
    40       get { return (ValueParameter<VariableCreator>)Parameters["VariableInitializer"]; }
     39    public OptionalValueParameter<VariableCreator> VariableInitializerParameter {
     40      get { return (OptionalValueParameter<VariableCreator>)Parameters["VariableInitializer"]; }
    4141    }
    4242    public ValueLookupParameter<IRandom> RandomParameter {
     
    119119    private void Initialize() {
    120120      #region Create parameters
    121       Parameters.Add(new ValueParameter<VariableCreator>("VariableInitializer", "Operator to initialize some variables.", new VariableCreator()));
     121      Parameters.Add(new OptionalValueParameter<VariableCreator>("VariableInitializer", "Operator to initialize some variables.", new VariableCreator()));
    122122      Parameters.Add(new ValueLookupParameter<IRandom>("Random", "A pseudo random number generator."));
    123123      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false."));
Note: See TracChangeset for help on using the changeset viewer.