Free cookie consent management tool by TermsFeed Policy Generator

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

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

Location:
branches/CMAES/HeuristicLab.Problems.TestFunctions
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • 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.