Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16561


Ignore:
Timestamp:
01/25/19 21:01:02 (6 years ago)
Author:
bburlacu
Message:

#2987: Store the population as a List, so it can be cleared when the algorithm is finished in order to save memory. Unversion generated files (Plugin.cs and AssemblyInfo.cs)

Location:
branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4
Files:
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4

    • Property svn:ignore
      •  

        old new  
         1*.aps
         2*.eto
         3*.nuget.props
         4*.nuget.targets
         5*.user
         6ClientBin
         7GeneratedArtifacts
         8Plugin.cs
        19[Bb]in
        2 obj
        310[Dd]ebug
        411[Rr]elease
        5 *.user
        6 *.aps
        7 *.eto
        8 ClientBin
        9 GeneratedArtifacts
        1012_Pvt_Extensions
         13obj
        1114project.lock.json
        12 *.nuget.props
        13 *.nuget.targets
  • branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADAlgorithmBase.cs

    r16560 r16561  
    4242
    4343    [Storable]
    44     protected IList<IMOEADSolution> population;
    45 
    46     [Storable]
    47     protected IList<IMOEADSolution> offspringPopulation;
    48 
    49     [Storable]
    50     protected IList<IMOEADSolution> jointPopulation;
     44    protected List<IMOEADSolution> population;
     45
     46    [Storable]
     47    protected List<IMOEADSolution> offspringPopulation;
     48
     49    [Storable]
     50    protected List<IMOEADSolution> jointPopulation;
    5151
    5252    [Storable]
     
    233233
    234234      if (original.population != null) {
    235         population = original.population.Select(cloner.Clone).ToArray();
     235        population = original.population.Select(cloner.Clone).ToList();
    236236      }
    237237
    238238      if (original.offspringPopulation != null) {
    239         offspringPopulation = original.offspringPopulation.Select(cloner.Clone).ToArray();
     239        offspringPopulation = original.offspringPopulation.Select(cloner.Clone).ToList();
    240240      }
    241241
    242242      if (original.jointPopulation != null) {
    243         jointPopulation = original.jointPopulation.Select(x => cloner.Clone(x)).ToArray();
     243        jointPopulation = original.jointPopulation.Select(x => cloner.Clone(x)).ToList();
    244244      }
    245245
     
    263263      var dimensions = maximization.Length;
    264264      var populationSize = PopulationSize.Value;
    265       population = new MOEADSolution[populationSize];
     265      population = new List<IMOEADSolution>(populationSize);
    266266
    267267      var parentScope = executionContext.Scope;
     
    283283          solution.Qualities[j] = maximization[j] ? 1 - qualities[j] : qualities[j];
    284284        }
    285         population[i] = solution;
     285        population.Add(solution);
    286286      }
    287287    }
  • branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/Properties

    • Property svn:ignore set to
      AssemblyInfo.cs
Note: See TracChangeset for help on using the changeset viewer.