Changeset 15625


Ignore:
Timestamp:
01/17/18 13:30:33 (3 years ago)
Author:
abeham
Message:

#2654: implemented generic context-based genetic algorithm

Location:
branches/ContextAlgorithms
Files:
15 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/ContextAlgorithms/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/HeuristicLab.Algorithms.GeneticAlgorithm-3.3.csproj

    r11623 r15625  
    115115  </ItemGroup>
    116116  <ItemGroup>
     117    <Compile Include="Model2\SolutionScope.cs" />
     118    <Compile Include="Model2\GeneticAlgorithm.cs" />
    117119    <Compile Include="GeneticAlgorithm.cs" />
    118120    <Compile Include="GeneticAlgorithmMainLoop.cs" />
  • branches/ContextAlgorithms/HeuristicLab.Core/3.3/Scope.cs

    r15583 r15625  
    3131  [Item("Scope", "A scope which contains variables and sub-scopes.")]
    3232  [StorableClass]
    33   public sealed class Scope : NamedItem, IScope {
     33  public class Scope : NamedItem, IScope {
    3434    public static new Image StaticItemImage {
    3535      get { return HeuristicLab.Common.Resources.VSImageLibrary.OrgChart; }
     
    6060
    6161    [StorableConstructor]
    62     private Scope(bool deserializing) : base(deserializing) { }
    63     private Scope(Scope original, Cloner cloner)
     62    protected Scope(bool deserializing) : base(deserializing) { }
     63    protected Scope(Scope original, Cloner cloner)
    6464      : base(original, cloner) {
    6565      if (original.variables.Count > 0) variables = cloner.Clone(original.variables);
     
    118118
    119119    #region SubScopes Events
    120     private void RegisterSubScopesEvents() {
     120    protected virtual void RegisterSubScopesEvents() {
    121121      if (subScopes != null) {
    122122        subScopes.ItemsAdded += new CollectionItemsChangedEventHandler<IndexedItem<IScope>>(SubScopes_ItemsAdded);
     
    126126      }
    127127    }
    128     private void SubScopes_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<IScope>> e) {
     128    protected virtual void SubScopes_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<IScope>> e) {
    129129      foreach (IndexedItem<IScope> item in e.Items)
    130130        item.Value.Parent = this;
    131131    }
    132     private void SubScopes_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<IScope>> e) {
     132    protected virtual void SubScopes_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<IScope>> e) {
    133133      foreach (IndexedItem<IScope> item in e.Items)
    134134        item.Value.Parent = null;
    135135    }
    136     private void SubScopes_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<IScope>> e) {
     136    protected virtual void SubScopes_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<IScope>> e) {
    137137      foreach (IndexedItem<IScope> oldItem in e.OldItems)
    138138        oldItem.Value.Parent = null;
     
    140140        item.Value.Parent = this;
    141141    }
    142     private void SubScopes_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<IScope>> e) {
     142    protected virtual void SubScopes_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<IScope>> e) {
    143143      foreach (IndexedItem<IScope> oldItem in e.OldItems)
    144144        oldItem.Value.Parent = null;
  • branches/ContextAlgorithms/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj

    r15091 r15625  
    156156    <Compile Include="Interfaces\ILocalImprovementAlgorithmOperator.cs" />
    157157    <Compile Include="Interfaces\IMultiObjectiveOperator.cs" />
     158    <Compile Include="Model2\Algorithms\ContextAlgorithm.cs" />
     159    <Compile Include="Model2\Algorithms\StochasticAlgorithm.cs" />
     160    <Compile Include="Model2\Contexts\BasicContext.cs" />
     161    <Compile Include="Model2\Contexts\PopulationContext.cs" />
     162    <Compile Include="Model2\Contexts\SingleSolutionContext.cs" />
     163    <Compile Include="Model2\Contexts\StochasticContext.cs" />
     164    <Compile Include="Model2\Interfaces.cs" />
     165    <Compile Include="Model2\SingleObjectiveSolutionScope.cs" />
    158166    <Compile Include="MultiObjective\DominationCalculator.cs" />
    159167    <Compile Include="Results\IResultParameter.cs" />
     
    312320      <Private>False</Private>
    313321    </ProjectReference>
     322    <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
     323      <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>
     324      <Name>HeuristicLab.Random-3.3</Name>
     325      <Private>False</Private>
     326    </ProjectReference>
    314327  </ItemGroup>
    315328  <ItemGroup>
Note: See TracChangeset for help on using the changeset viewer.