Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/30/10 22:50:59 (14 years ago)
Author:
cneumuel
Message:

#1215

  • enhanced combinations generator (now with batchruns!)
  • fixed ActualNames for metaopt-alg
  • added penalty for invalid solution-candidates (algs which throw exceptions)
  • migrated to .NET 4.0
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/Crossovers/ParameterConfigurationCrossover.cs

    r5112 r5184  
    1515  [Item("ParameterConfigurationCrossover", "TODO")]
    1616  [StorableClass]
    17   public class ParameterConfigurationCrossover : SingleSuccessorOperator, IParameterConfigurationOperator, ICrossover {
     17  public class ParameterConfigurationCrossover : SingleSuccessorOperator, IParameterConfigurationOperator, IParameterConfigurationCrossover {
    1818    public override bool CanChangeName {
    1919      get { return false; }
     
    2323      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    2424    }
    25     public ILookupParameter<ItemArray<IValueConfiguration>> ParentsParameter {
    26       get { return (ScopeTreeLookupParameter<IValueConfiguration>)Parameters["Parents"]; }
     25    public ILookupParameter<ItemArray<ParameterConfigurationTree>> ParentsParameter {
     26      get { return (ScopeTreeLookupParameter<ParameterConfigurationTree>)Parameters["Parents"]; }
    2727    }
    28     public ILookupParameter<IValueConfiguration> ChildParameter {
    29       get { return (ILookupParameter<IValueConfiguration>)Parameters["Child"]; }
     28    public ILookupParameter<ParameterConfigurationTree> ChildParameter {
     29      get { return (ILookupParameter<ParameterConfigurationTree>)Parameters["Child"]; }
    3030    }
    3131
     
    4343      : base() {
    4444      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic crossover operators."));
    45       Parameters.Add(new ScopeTreeLookupParameter<IValueConfiguration>("Parents", "The parent vectors which should be crossed."));
    46       ParentsParameter.ActualName = "ParameterConfigurationTree";
    47       Parameters.Add(new LookupParameter<IValueConfiguration>("Child", "The child vector resulting from the crossover."));
    48       ChildParameter.ActualName = "ParameterConfigurationTree";
     45      Parameters.Add(new ScopeTreeLookupParameter<ParameterConfigurationTree>("Parents", "The parent vectors which should be crossed."));
     46      Parameters.Add(new LookupParameter<ParameterConfigurationTree>("Child", "The child vector resulting from the crossover."));
    4947
    5048      Parameters.Add(new ValueLookupParameter<IIntValueCrossover>(MetaOptimizationProblem.IntValueCrossoverParameterName, ""));
     
    5654
    5755    public override IOperation Apply() {
    58       IValueConfiguration child1 = (IValueConfiguration)ParentsParameter.ActualValue[0].Clone();
    59       IValueConfiguration child2 = (IValueConfiguration)ParentsParameter.ActualValue[1];
     56      ParameterConfigurationTree child1 = (ParameterConfigurationTree)ParentsParameter.ActualValue[0].Clone();
     57      ParameterConfigurationTree child2 = (ParameterConfigurationTree)ParentsParameter.ActualValue[1];
    6058
    6159      //child1.Cross(child2, RandomParameter.ActualValue);
Note: See TracChangeset for help on using the changeset viewer.