Changeset 1294 for framspy/evolalg/base


Ignore:
Timestamp:
02/21/24 17:38:15 (9 months ago)
Author:
Maciej Komosinski
Message:

Initialize more fields in constructors

Location:
framspy/evolalg/base
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • framspy/evolalg/base/experiment_abc.py

    r1289 r1294  
    1818class ExperimentABC(ABC):
    1919
    20     population_structures = None
    21     hof = []
    22     stats = []
    23     current_generation = 0
    24     time_elapsed = 0
    25 
    26 
    2720    def __init__(self, popsize, hof_size, save_only_best) -> None:
     21        self.population_structures = None
     22        self.stats = []
     23        self.current_generation = 0
     24        self.time_elapsed = 0
     25
    2826        self.hof = HallOfFame(hof_size)
    2927        self.popsize = popsize
  • framspy/evolalg/base/experiment_islands_model_abc.py

    r1291 r1294  
    1717    def __init__(self, popsize, hof_size, number_of_populations, migration_interval, save_only_best) -> None:
    1818        super().__init__(popsize=popsize, hof_size=hof_size, save_only_best=save_only_best)
     19        self.populations=[]
    1920        self.number_of_populations=number_of_populations
    2021        self.migration_interval=migration_interval
Note: See TracChangeset for help on using the changeset viewer.