Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17618


Ignore:
Timestamp:
06/21/20 17:00:55 (5 years ago)
Author:
dleko
Message:

#2825 Add storable generation field.
Add StorableType attribute to Solution class.

Location:
branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/NSGA3.cs

    r17617 r17618  
    5050
    5151        [Storable]
     52        private int generation;
     53
     54        [Storable]
    5255        private List<Solution> solutions;
    5356
     
    200203        {
    201204            random = new MersenneTwister();
     205            generation = 0;
    202206            InitSolutions();
    203207        }
     
    243247        {
    244248            ReferencePoints = new List<ReferencePoint>(); // todo: use existing list of reference points
    245             for (int iteration = 0; iteration < MaximumGenerations.Value; iteration++)
     249            while (generation != MaximumGenerations.Value)
     250            {
    246251                ToNextGeneration();
     252                generation++;
     253            }
    247254        }
    248255
  • branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/Solution.cs

    r17557 r17618  
    77namespace HeuristicLab.Algorithms.NSGA3
    88{
     9    [StorableType("D35C9D79-77DF-4CF3-AB44-FCCC00E44C5F")]
    910    public class Solution : Individual, IDeepCloneable
    1011    {
Note: See TracChangeset for help on using the changeset viewer.