Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9121


Ignore:
Timestamp:
01/07/13 20:21:07 (11 years ago)
Author:
abeham
Message:

#1961: Added wiring code, removed obsolete parameters, simplified mainloop slightly, changed sigmabounds to a matrix

Location:
branches/CMAES
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/CMAES/CMAES.sln

    r9115 r9121  
    77EndProject
    88Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Optimization-3.3", "HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj", "{14AB8D24-25BC-400C-A846-4627AA945192}"
     9EndProject
     10Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.TestFunctions-3.3", "HeuristicLab.Problems.TestFunctions\3.3\HeuristicLab.Problems.TestFunctions-3.3.csproj", "{88B9B0E3-344E-4196-82A3-0F9732506FE8}"
    911EndProject
    1012Global
     
    5456    {14AB8D24-25BC-400C-A846-4627AA945192}.Release|x86.ActiveCfg = Release|x86
    5557    {14AB8D24-25BC-400C-A846-4627AA945192}.Release|x86.Build.0 = Release|x86
     58    {88B9B0E3-344E-4196-82A3-0F9732506FE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     59    {88B9B0E3-344E-4196-82A3-0F9732506FE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
     60    {88B9B0E3-344E-4196-82A3-0F9732506FE8}.Debug|x64.ActiveCfg = Debug|x64
     61    {88B9B0E3-344E-4196-82A3-0F9732506FE8}.Debug|x64.Build.0 = Debug|x64
     62    {88B9B0E3-344E-4196-82A3-0F9732506FE8}.Debug|x86.ActiveCfg = Debug|x86
     63    {88B9B0E3-344E-4196-82A3-0F9732506FE8}.Debug|x86.Build.0 = Debug|x86
     64    {88B9B0E3-344E-4196-82A3-0F9732506FE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
     65    {88B9B0E3-344E-4196-82A3-0F9732506FE8}.Release|Any CPU.Build.0 = Release|Any CPU
     66    {88B9B0E3-344E-4196-82A3-0F9732506FE8}.Release|x64.ActiveCfg = Release|x64
     67    {88B9B0E3-344E-4196-82A3-0F9732506FE8}.Release|x64.Build.0 = Release|x64
     68    {88B9B0E3-344E-4196-82A3-0F9732506FE8}.Release|x86.ActiveCfg = Release|x86
     69    {88B9B0E3-344E-4196-82A3-0F9732506FE8}.Release|x86.Build.0 = Release|x86
    5670  EndGlobalSection
    5771  GlobalSection(SolutionProperties) = preSolution
    5872    HideSolutionNode = FALSE
    5973  EndGlobalSection
     74  GlobalSection(Performance) = preSolution
     75    HasPerformanceSessions = true
     76  EndGlobalSection
    6077EndGlobal
  • branches/CMAES/HeuristicLab.Encodings.RealVectorEncoding/3.3/CMAESOperators/CMAInitializer.cs

    r9118 r9121  
    4848    }
    4949
    50     public IValueLookupParameter<DoubleArray> MaxSigmaParameter {
    51       get { return (IValueLookupParameter<DoubleArray>)Parameters["MaxSigma"]; }
    52     }
    53 
    54     public IValueLookupParameter<DoubleArray> MinSigmaParameter {
    55       get { return (IValueLookupParameter<DoubleArray>)Parameters["MinSigma"]; }
     50    public IValueLookupParameter<DoubleMatrix> SigmaBoundsParameter {
     51      get { return (IValueLookupParameter<DoubleMatrix>)Parameters["SigmaBounds"]; }
    5652    }
    5753
     
    8884      Parameters.Add(new ValueLookupParameter<IntValue>("Dimension", "The problem dimension (N)."));
    8985      Parameters.Add(new ValueLookupParameter<DoubleArray>("InitialSigma", "The initial value for Sigma (need to be > 0), can be single dimensioned or an array that should be equal to the size of the vector.", new DoubleArray(new[] { 0.5 })));
    90       Parameters.Add(new ValueLookupParameter<DoubleArray>("MaxSigma", "The maximum sigma value can be omitted, given as one value for all dimensions or a value for each dimension."));
    91       Parameters.Add(new ValueLookupParameter<DoubleArray>("MinSigma", "The minimum sigma value can be omitted, given as one value for all dimensions or a value for each dimension."));
     86      Parameters.Add(new ValueLookupParameter<DoubleMatrix>("SigmaBounds", "The bounds for sigma value can be omitted, given as one value for all dimensions or a value for each dimension. First column specifies minimum, second column maximum value."));
    9287      Parameters.Add(new LookupParameter<IntValue>("Iterations", "The current iteration that is being processed."));
    9388      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumIterations", "The maximum number of iterations to be processed."));
    94       Parameters.Add(new ValueLookupParameter<IntValue>("InitialIterations", "The number of iterations that should be performed using the diagonal covariance matrix only."));
     89      Parameters.Add(new ValueLookupParameter<IntValue>("InitialIterations", "The number of iterations that should be performed using the diagonal covariance matrix only.", new IntValue(0)));
    9590      Parameters.Add(new LookupParameter<IntValue>("PopulationSize", "The population size (lambda)."));
    9691      Parameters.Add(new LookupParameter<IntValue>("Mu", "The number of offspring considered for updating of the strategy parameters."));
     
    132127
    133128      // ensure maximal and minimal standard deviations
    134       var minSigma = MinSigmaParameter.ActualValue;
    135       if (minSigma != null && minSigma.Length > 0) {
     129      var sigmaBounds = SigmaBoundsParameter.ActualValue;
     130      if (sigmaBounds != null && sigmaBounds.Rows > 0) {
    136131        for (int i = 0; i < N; i++) {
    137           var d = minSigma[(int)Math.Min(i, minSigma.Length - 1)];
     132          var d = sigmaBounds[(int)Math.Min(i, sigmaBounds.Rows - 1), 0];
    138133          if (d > sigma * minSqrtdiagC) sigma = d / minSqrtdiagC;
    139134        }
    140       }
    141       var maxSigma = MaxSigmaParameter.ActualValue;
    142       if (maxSigma != null && maxSigma.Length > 0) {
    143135        for (int i = 0; i < N; i++) {
    144           var d = maxSigma[(int)Math.Min(i, maxSigma.Length - 1)];
     136          var d = sigmaBounds[(int)Math.Min(i, sigmaBounds.Rows - 1), 1];
    145137          if (d > sigma * maxSqrtdiagC) sigma = d / maxSqrtdiagC;
    146138        }
     
    181173      sp.BDz = new DoubleArray(BDz);
    182174      sp.Sigma = new DoubleValue(sigma);
    183       if (maxSigma != null) sp.MaxSigma = (DoubleArray)maxSigma.Clone();
    184       if (minSigma != null) sp.MinSigma = (DoubleArray)minSigma.Clone();
     175      if (sigmaBounds != null) sp.SigmaBounds = (DoubleMatrix)sigmaBounds.Clone();
    185176      sp.InitialIterations = new IntValue(initialIterations.Value);
    186177
  • branches/CMAES/HeuristicLab.Encodings.RealVectorEncoding/3.3/CMAESOperators/CMAMutator.cs

    r9118 r9121  
    105105      } else {
    106106        bool inRange;
     107        var B = sp.B;
    107108        tries = 0;
    108109        do {
     
    116117            var sum = 0.0;
    117118            for (int j = 0; j < arx.Length; j++)
    118               sum += sp.B[i, j] * artmp[j];
     119              sum += B[i, j] * artmp[j];
    119120            arx[i] = copy[i] + sp.Sigma.Value * sum; // m + sig * Normal(0,C)
    120121            if (bounds[i % bounds.Rows, 0] > arx[i] || arx[i] > bounds[i % bounds.Rows, 1])
  • branches/CMAES/HeuristicLab.Encodings.RealVectorEncoding/3.3/CMAESOperators/CMAParameters.cs

    r9118 r9121  
    5656
    5757    [Storable]
    58     private DoubleArray minSigma;
    59     public DoubleArray MinSigma {
    60       get { return minSigma; }
    61       set {
    62         if (minSigma == value) return;
    63         minSigma = value;
    64         OnPropertyChanged("MinSigma");
    65       }
    66     }
    67 
    68     [Storable]
    69     private DoubleArray maxSigma;
    70     public DoubleArray MaxSigma {
    71       get { return maxSigma; }
    72       set {
    73         if (maxSigma == value) return;
    74         maxSigma = value;
    75         OnPropertyChanged("MaxSigma");
     58    private DoubleMatrix sigmaBounds;
     59    public DoubleMatrix SigmaBounds {
     60      get { return sigmaBounds; }
     61      set {
     62        if (sigmaBounds == value) return;
     63        sigmaBounds = value;
     64        OnPropertyChanged("SigmaBounds");
    7665      }
    7766    }
     
    129118        cs = value;
    130119        OnPropertyChanged("CS");
    131       }
    132     }
    133 
    134     [Storable]
    135     private DoubleValue c1;
    136     public DoubleValue C1 {
    137       get { return c1; }
    138       set {
    139         if (c1 == value) return;
    140         c1 = value;
    141         OnPropertyChanged("C1");
    142       }
    143     }
    144 
    145     [Storable]
    146     private DoubleValue cmu;
    147     public DoubleValue CMU {
    148       get { return cmu; }
    149       set {
    150         if (cmu == value) return;
    151         cmu = value;
    152         OnPropertyChanged("CMU");
    153120      }
    154121    }
     
    292259      this.axisRatio = cloner.Clone(original.axisRatio);
    293260      this.b = cloner.Clone(original.b);
     261      this.bDz = cloner.Clone(original.bDz);
    294262      this.c = cloner.Clone(original.c);
    295       this.c1 = cloner.Clone(original.c1);
    296       this.cc = cloner.Clone(original.cc);
    297263      this.cCov = cloner.Clone(original.cCov);
    298264      this.cCovSep = cloner.Clone(original.cCovSep);
     265      this.cc = cloner.Clone(original.cc);
    299266      this.chiN = cloner.Clone(original.chiN);
    300       this.cmu = cloner.Clone(original.cmu);
    301267      this.cs = cloner.Clone(original.cs);
    302268      this.d = cloner.Clone(original.d);
     269      this.damps = cloner.Clone(original.damps);
    303270      this.initialIterations = cloner.Clone(original.initialIterations);
    304       this.bDz = cloner.Clone(original.bDz);
    305       this.maxSigma = cloner.Clone(original.maxSigma);
    306       this.minSigma = cloner.Clone(original.minSigma);
    307271      this.mu = cloner.Clone(original.mu);
    308272      this.muCov = cloner.Clone(original.muCov);
     
    311275      this.ps = cloner.Clone(original.ps);
    312276      this.sigma = cloner.Clone(original.sigma);
     277      this.sigmaBounds = cloner.Clone(original.sigmaBounds);
    313278      this.weights = cloner.Clone(original.weights);
    314279    }
  • branches/CMAES/HeuristicLab.Encodings.RealVectorEncoding/3.3/CMAESOperators/CMAUpdater.cs

    r9118 r9121  
    157157
    158158      // ensure maximal and minimal standard deviations
    159       if (sp.MinSigma != null && sp.MinSigma.Length > 0) {
    160         for (int i = 0; i < N; i++) {
    161           var d = sp.MinSigma[Math.Min(i, sp.MinSigma.Length - 1)];
     159      if (sp.SigmaBounds != null && sp.SigmaBounds.Rows > 0) {
     160        for (int i = 0; i < N; i++) {
     161          var d = sp.SigmaBounds[Math.Min(i, sp.SigmaBounds.Rows - 1), 0];
    162162          if (d > sp.Sigma.Value * minSqrtdiagC) sp.Sigma.Value = d / minSqrtdiagC;
    163163        }
    164       }
    165       if (sp.MaxSigma != null && sp.MaxSigma.Length > 0) {
    166         for (int i = 0; i < N; i++) {
    167           var d = sp.MaxSigma[Math.Min(i, sp.MaxSigma.Length - 1)];
     164        for (int i = 0; i < N; i++) {
     165          var d = sp.SigmaBounds[Math.Min(i, sp.SigmaBounds.Rows - 1), 1];
    168166          if (d > sp.Sigma.Value * maxSqrtdiagC) sp.Sigma.Value = d / maxSqrtdiagC;
    169167        }
  • branches/CMAES/HeuristicLab.Optimization/3.3/Interfaces/ICMAESInitializer.cs

    r9115 r9121  
    3030    Type CMAType { get; }
    3131
     32    ILookupParameter<IntValue> PopulationSizeParameter { get; }
    3233    ILookupParameter<IntValue> MuParameter { get; }
     34    IValueLookupParameter<DoubleArray> InitialSigmaParameter { get; }
    3335  }
    3436}
  • branches/CMAES/HeuristicLab.Problems.TestFunctions/3.3/HeuristicLab.Problems.TestFunctions-3.3.csproj

    r8720 r9121  
    4141    <DebugType>full</DebugType>
    4242    <Optimize>false</Optimize>
    43     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     43    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    4444    <DefineConstants>DEBUG;TRACE</DefineConstants>
    4545    <ErrorReport>prompt</ErrorReport>
     
    5050    <DebugType>pdbonly</DebugType>
    5151    <Optimize>true</Optimize>
    52     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     52    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    5353    <DefineConstants>TRACE</DefineConstants>
    5454    <ErrorReport>prompt</ErrorReport>
     
    5858  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
    5959    <DebugSymbols>true</DebugSymbols>
    60     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     60    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    6161    <DefineConstants>DEBUG;TRACE</DefineConstants>
    6262    <DebugType>full</DebugType>
     
    6666  </PropertyGroup>
    6767  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
    68     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     68    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    6969    <DefineConstants>TRACE</DefineConstants>
    7070    <Optimize>true</Optimize>
     
    7676  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    7777    <DebugSymbols>true</DebugSymbols>
    78     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     78    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    7979    <DefineConstants>DEBUG;TRACE</DefineConstants>
    8080    <DebugType>full</DebugType>
     
    8484  </PropertyGroup>
    8585  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    86     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     86    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    8787    <DefineConstants>TRACE</DefineConstants>
    8888    <Optimize>true</Optimize>
     
    9393  </PropertyGroup>
    9494  <ItemGroup>
     95    <Reference Include="HeuristicLab.Analysis-3.3">
     96      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
     97      <Private>False</Private>
     98    </Reference>
     99    <Reference Include="HeuristicLab.Collections-3.3">
     100      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
     101      <Private>False</Private>
     102    </Reference>
     103    <Reference Include="HeuristicLab.Common-3.3">
     104      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
     105      <Private>False</Private>
     106    </Reference>
     107    <Reference Include="HeuristicLab.Common.Resources-3.3">
     108      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
     109      <Private>False</Private>
     110    </Reference>
     111    <Reference Include="HeuristicLab.Core-3.3">
     112      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
     113      <Private>False</Private>
     114    </Reference>
     115    <Reference Include="HeuristicLab.Data-3.3">
     116      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
     117      <Private>False</Private>
     118    </Reference>
     119    <Reference Include="HeuristicLab.Operators-3.3">
     120      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
     121      <Private>False</Private>
     122    </Reference>
     123    <Reference Include="HeuristicLab.Optimization.Operators-3.3">
     124      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath>
     125      <Private>False</Private>
     126    </Reference>
     127    <Reference Include="HeuristicLab.Parameters-3.3">
     128      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
     129      <Private>False</Private>
     130    </Reference>
     131    <Reference Include="HeuristicLab.Persistence-3.3">
     132      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
     133      <Private>False</Private>
     134    </Reference>
     135    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
     136      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     137      <Private>False</Private>
     138    </Reference>
    95139    <Reference Include="System" />
    96140    <Reference Include="System.Core">
     
    162206  </ItemGroup>
    163207  <ItemGroup>
    164     <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
    165       <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
    166       <Name>HeuristicLab.Analysis-3.3</Name>
    167     </ProjectReference>
    168     <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
    169       <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
    170       <Name>HeuristicLab.Collections-3.3</Name>
    171       <Private>False</Private>
    172     </ProjectReference>
    173     <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
    174       <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
    175       <Name>HeuristicLab.Common.Resources-3.3</Name>
    176       <Private>False</Private>
    177     </ProjectReference>
    178     <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
    179       <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
    180       <Name>HeuristicLab.Common-3.3</Name>
    181       <Private>False</Private>
    182     </ProjectReference>
    183     <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
    184       <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
    185       <Name>HeuristicLab.Core-3.3</Name>
    186       <Private>False</Private>
    187     </ProjectReference>
    188     <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
    189       <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
    190       <Name>HeuristicLab.Data-3.3</Name>
    191       <Private>False</Private>
    192     </ProjectReference>
    193208    <ProjectReference Include="..\..\HeuristicLab.Encodings.RealVectorEncoding\3.3\HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj">
    194209      <Project>{BB6D334A-4BB6-4674-9883-31A6EBB32CAB}</Project>
    195210      <Name>HeuristicLab.Encodings.RealVectorEncoding-3.3</Name>
    196211      <Private>False</Private>
    197     </ProjectReference>
    198     <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
    199       <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
    200       <Name>HeuristicLab.Operators-3.3</Name>
    201       <Private>False</Private>
    202     </ProjectReference>
    203     <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">
    204       <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>
    205       <Name>HeuristicLab.Optimization.Operators-3.3</Name>
    206212    </ProjectReference>
    207213    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
    208214      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
    209215      <Name>HeuristicLab.Optimization-3.3</Name>
    210       <Private>False</Private>
    211     </ProjectReference>
    212     <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
    213       <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
    214       <Name>HeuristicLab.Parameters-3.3</Name>
    215       <Private>False</Private>
    216     </ProjectReference>
    217     <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
    218       <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
    219       <Name>HeuristicLab.Persistence-3.3</Name>
    220       <Private>False</Private>
    221     </ProjectReference>
    222     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
    223       <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
    224       <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
    225216      <Private>False</Private>
    226217    </ProjectReference>
  • branches/CMAES/HeuristicLab.Problems.TestFunctions/3.3/SingleObjectiveTestFunctionProblem.cs

    r8720 r9121  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    2522using HeuristicLab.Analysis;
    2623using HeuristicLab.Common;
     
    3229using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3330using HeuristicLab.PluginInfrastructure;
     31using System;
     32using System.Collections.Generic;
     33using System.Linq;
    3434
    3535namespace HeuristicLab.Problems.TestFunctions {
     
    330330      try {
    331331        BestKnownSolutionParameter.Value = Evaluator.GetBestKnownSolution(ProblemSize.Value);
    332       }
    333       catch (ArgumentException e) {
     332      } catch (ArgumentException e) {
    334333        ErrorHandling.ShowErrorDialog(e);
    335334        ProblemSize.Value = Evaluator.MinimumProblemSize;
     
    337336    }
    338337    private void ParameterizeOperators() {
    339       foreach (IRealVectorCrossover op in Operators.OfType<IRealVectorCrossover>()) {
     338      foreach (var op in Operators.OfType<IRealVectorCrossover>()) {
    340339        op.ParentsParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
    341340        op.ParentsParameter.Hidden = true;
     
    345344        op.BoundsParameter.Hidden = true;
    346345      }
    347       foreach (IRealVectorManipulator op in Operators.OfType<IRealVectorManipulator>()) {
     346      foreach (var op in Operators.OfType<IRealVectorManipulator>()) {
    348347        op.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
    349348        op.RealVectorParameter.Hidden = true;
     
    351350        op.BoundsParameter.Hidden = true;
    352351      }
    353       foreach (IRealVectorMoveOperator op in Operators.OfType<IRealVectorMoveOperator>()) {
    354         op.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
    355         op.RealVectorParameter.Hidden = true;
    356       }
    357       foreach (IRealVectorMoveGenerator op in Operators.OfType<IRealVectorMoveGenerator>()) {
     352      foreach (var op in Operators.OfType<IRealVectorMoveOperator>()) {
     353        op.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
     354        op.RealVectorParameter.Hidden = true;
     355      }
     356      foreach (var op in Operators.OfType<IRealVectorMoveGenerator>()) {
    358357        op.BoundsParameter.ActualName = BoundsParameter.Name;
    359358        op.BoundsParameter.Hidden = true;
    360359      }
    361       foreach (ISingleObjectiveTestFunctionAdditiveMoveEvaluator op in Operators.OfType<ISingleObjectiveTestFunctionAdditiveMoveEvaluator>()) {
     360      foreach (var op in Operators.OfType<ISingleObjectiveTestFunctionAdditiveMoveEvaluator>()) {
    362361        op.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
    363362        op.QualityParameter.Hidden = true;
     
    365364        op.RealVectorParameter.Hidden = true;
    366365      }
    367       foreach (IRealVectorParticleCreator op in Operators.OfType<IRealVectorParticleCreator>()) {
     366      foreach (var op in Operators.OfType<IRealVectorParticleCreator>()) {
    368367        op.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
    369368        op.RealVectorParameter.Hidden = true;
     
    373372        op.ProblemSizeParameter.Hidden = true;
    374373      }
    375       foreach (IRealVectorParticleUpdater op in Operators.OfType<IRealVectorParticleUpdater>()) {
     374      foreach (var op in Operators.OfType<IRealVectorParticleUpdater>()) {
    376375        op.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
    377376        op.RealVectorParameter.Hidden = true;
     
    379378        op.BoundsParameter.Hidden = true;
    380379      }
    381       foreach (IRealVectorSwarmUpdater op in Operators.OfType<IRealVectorSwarmUpdater>()) {
     380      foreach (var op in Operators.OfType<IRealVectorSwarmUpdater>()) {
    382381        op.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
    383382        op.RealVectorParameter.Hidden = true;
     
    385384        op.MaximizationParameter.Hidden = true;
    386385      }
    387       foreach (IRealVectorMultiNeighborhoodShakingOperator op in Operators.OfType<IRealVectorMultiNeighborhoodShakingOperator>()) {
    388         op.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
    389         op.RealVectorParameter.Hidden = true;
    390       }
    391       foreach (ISingleObjectiveImprovementOperator op in Operators.OfType<ISingleObjectiveImprovementOperator>()) {
     386      foreach (var op in Operators.OfType<IRealVectorMultiNeighborhoodShakingOperator>()) {
     387        op.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
     388        op.RealVectorParameter.Hidden = true;
     389      }
     390      foreach (var op in Operators.OfType<ISingleObjectiveImprovementOperator>()) {
    392391        op.SolutionParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
    393392        op.SolutionParameter.Hidden = true;
    394393      }
    395       foreach (ISingleObjectivePathRelinker op in Operators.OfType<ISingleObjectivePathRelinker>()) {
     394      foreach (var op in Operators.OfType<ISingleObjectivePathRelinker>()) {
    396395        op.ParentsParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
    397396        op.ParentsParameter.Hidden = true;
    398397      }
    399       foreach (SingleObjectiveTestFunctionSimilarityCalculator op in Operators.OfType<SingleObjectiveTestFunctionSimilarityCalculator>()) {
     398      foreach (var op in Operators.OfType<SingleObjectiveTestFunctionSimilarityCalculator>()) {
    400399        op.SolutionVariableName = SolutionCreator.RealVectorParameter.ActualName;
    401400        op.QualityVariableName = Evaluator.QualityParameter.ActualName;
    402401        op.Bounds = Bounds;
    403402      }
     403      foreach (var op in Operators.OfType<CMAInitializer>()) {
     404        op.DimensionParameter.ActualName = ProblemSizeParameter.Name;
     405      }
     406      foreach (var op in Operators.OfType<CMAMutator>()) {
     407        op.BoundsParameter.ActualName = BoundsParameter.Name;
     408        op.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
     409      }
     410      foreach (var op in Operators.OfType<CMARecombinator>()) {
     411        op.MeanParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
     412        op.OffspringParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
     413      }
     414      foreach (var op in Operators.OfType<CMAUpdater>()) {
     415        op.MeansParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
     416        op.OffspringParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
     417      }
    404418    }
    405419    private void UpdateStrategyVectorBounds() {
    406       DoubleMatrix strategyBounds = (DoubleMatrix)Bounds.Clone();
     420      var strategyBounds = (DoubleMatrix)Bounds.Clone();
    407421      for (int i = 0; i < strategyBounds.Rows; i++) {
    408422        if (strategyBounds[i, 0] < 0) strategyBounds[i, 0] = 0;
Note: See TracChangeset for help on using the changeset viewer.