Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/01/13 13:01:40 (11 years ago)
Author:
bburlacu
Message:

#1772: Merged remaining trunk changes into the EvolutionaryTracking branch.

Location:
branches/HeuristicLab.EvolutionaryTracking
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionaryTracking

  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Selection/3.3/HeuristicLab.Selection-3.3.csproj

    r8806 r9835  
    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>
     
    6161  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    6262    <DebugSymbols>true</DebugSymbols>
    63     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     63    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    6464    <DefineConstants>DEBUG;TRACE</DefineConstants>
    6565    <DebugType>full</DebugType>
     
    6969  </PropertyGroup>
    7070  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    71     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     71    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    7272    <DefineConstants>TRACE</DefineConstants>
    7373    <DocumentationFile>
     
    8181  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
    8282    <DebugSymbols>true</DebugSymbols>
    83     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     83    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    8484    <DefineConstants>DEBUG;TRACE</DefineConstants>
    8585    <DebugType>full</DebugType>
     
    8989  </PropertyGroup>
    9090  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
    91     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     91    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    9292    <DefineConstants>TRACE</DefineConstants>
    9393    <DocumentationFile>
     
    100100  </PropertyGroup>
    101101  <ItemGroup>
     102    <Reference Include="HeuristicLab.Collections-3.3">
     103      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
     104      <Private>False</Private>
     105    </Reference>
     106    <Reference Include="HeuristicLab.Common-3.3">
     107      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
     108      <Private>False</Private>
     109    </Reference>
     110    <Reference Include="HeuristicLab.Core-3.3">
     111      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
     112      <Private>False</Private>
     113    </Reference>
     114    <Reference Include="HeuristicLab.Data-3.3">
     115      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
     116      <Private>False</Private>
     117    </Reference>
     118    <Reference Include="HeuristicLab.Operators-3.3">
     119      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
     120      <Private>False</Private>
     121    </Reference>
     122    <Reference Include="HeuristicLab.Optimization-3.3">
     123      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
     124      <Private>False</Private>
     125    </Reference>
     126    <Reference Include="HeuristicLab.Parameters-3.3">
     127      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
     128      <Private>False</Private>
     129    </Reference>
     130    <Reference Include="HeuristicLab.Persistence-3.3">
     131      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
     132      <Private>False</Private>
     133    </Reference>
     134    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
     135      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     136      <Private>False</Private>
     137    </Reference>
    102138    <Reference Include="System" />
    103139    <Reference Include="System.Core">
     
    144180  </ItemGroup>
    145181  <ItemGroup>
    146     <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
    147       <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
    148       <Name>HeuristicLab.Collections-3.3</Name>
    149       <Private>False</Private>
    150     </ProjectReference>
    151     <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
    152       <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
    153       <Name>HeuristicLab.Common-3.3</Name>
    154       <Private>False</Private>
    155     </ProjectReference>
    156     <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
    157       <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
    158       <Name>HeuristicLab.Core-3.3</Name>
    159       <Private>False</Private>
    160     </ProjectReference>
    161     <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
    162       <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
    163       <Name>HeuristicLab.Data-3.3</Name>
    164       <Private>False</Private>
    165     </ProjectReference>
    166     <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
    167       <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
    168       <Name>HeuristicLab.Operators-3.3</Name>
    169       <Private>False</Private>
    170     </ProjectReference>
    171     <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
    172       <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
    173       <Name>HeuristicLab.Optimization-3.3</Name>
    174       <Private>False</Private>
    175     </ProjectReference>
    176     <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
    177       <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
    178       <Name>HeuristicLab.Parameters-3.3</Name>
    179       <Private>False</Private>
    180     </ProjectReference>
    181     <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
    182       <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
    183       <Name>HeuristicLab.Persistence-3.3</Name>
    184       <Private>False</Private>
    185     </ProjectReference>
    186     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
    187       <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
    188       <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
    189       <Private>False</Private>
    190     </ProjectReference>
    191   </ItemGroup>
    192   <ItemGroup>
    193182    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
    194183      <Visible>False</Visible>
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Selection/3.3/Selector.cs

    r9456 r9835  
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2828
     29using CloneMapType = HeuristicLab.Core.ItemDictionary<HeuristicLab.Core.IItem, HeuristicLab.Core.IItem>;
     30
    2931namespace HeuristicLab.Selection {
    3032  /// <summary>
     
    3436  [StorableClass]
    3537  public abstract class Selector : SingleSuccessorOperator {
     38    protected const string GlobalCloneMapParameterName = "GlobalCloneMap";
     39
    3640    public override bool CanChangeName {
    3741      get { return false; }
     
    4549    }
    4650
     51    public LookupParameter<CloneMapType> GlobalCloneMapParameter {
     52      get { return (LookupParameter<CloneMapType>)Parameters[GlobalCloneMapParameterName]; }
     53    }
     54
     55    public CloneMapType GlobalCloneMap {
     56      get { return GlobalCloneMapParameter.ActualValue; }
     57    }
    4758    [StorableConstructor]
    4859    protected Selector(bool deserializing) : base(deserializing) { }
    4960    protected Selector(Selector original, Cloner cloner) : base(original, cloner) { }
    5061
     62    [StorableHook(HookType.AfterDeserialization)]
     63    private void AfterDeserialization() {
     64      if (!Parameters.ContainsKey("CurrentScope"))
     65        Parameters.Add(new ScopeParameter("CurrentScope", "The current scope from which sub-scopes should be selected."));
     66      if (!Parameters.ContainsKey(GlobalCloneMapParameterName))
     67        Parameters.Add(new LookupParameter<CloneMapType>(GlobalCloneMapParameterName, "A global map keeping track of trees and their clones (made during selection)."));
     68    }
     69
    5170    protected Selector()
    5271      : base() {
    5372      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope from which sub-scopes should be selected."));
     73      Parameters.Add(new LookupParameter<CloneMapType>(GlobalCloneMapParameterName, "A global map keeping track of trees and their clones (made during selection)."));
    5474    }
    5575
    5676    public sealed override IOperation Apply() {
    5777      List<IScope> scopes = new List<IScope>(CurrentScope.SubScopes);
     78
     79      if (GlobalCloneMap == null) {
     80        var gScope = ExecutionContext.Scope;
     81        while (gScope.Parent != null) gScope = gScope.Parent;
     82        gScope.Variables.Add(new Variable(GlobalCloneMapParameterName, new CloneMapType()));
     83      }
    5884      IScope[] selected = Select(scopes);
    5985
Note: See TracChangeset for help on using the changeset viewer.