- Timestamp:
- 08/10/21 00:48:18 (3 years ago)
- Location:
- framspy/evolalg
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
framspy/evolalg/examples/multicriteria.py
r1147 r1148 168 168 def create_experiment(): 169 169 parsed_args = parseArguments() 170 frams_lib = FramsticksLib(parsed_args.path, parsed_args.lib, 171 parsed_args.sim) 170 frams_lib = FramsticksLib(parsed_args.path, parsed_args.lib, parsed_args.sim) 172 171 173 172 opt_dissim = [] … … 303 302 print("Running experiment with", sys.argv) 304 303 parsed_args = parseArguments() 304 305 if parsed_args.popsize % 4 != 0: 306 raise ValueError("popsize must be a multiple of 4 (for example %d)." % (parsed_args.popsize//4*4)) # required by deap.tools.selTournamentDCD() 307 305 308 if parsed_args.debug: 306 309 logging.basicConfig(level=logging.DEBUG) … … 308 311 if parsed_args.checkpoint_path is not None and os.path.exists(parsed_args.checkpoint_path): 309 312 experiment = load_experiment(parsed_args.checkpoint_path) 310 FramsticksLib(parsed_args.path, parsed_args.lib, 311 parsed_args.sim) 313 FramsticksLib(parsed_args.path, parsed_args.lib, parsed_args.sim) 312 314 else: 313 315 experiment = create_experiment() -
framspy/evolalg/selection/nsga2.py
r1147 r1148 11 11 super(NSGA2Selection, self).call(population) 12 12 pop = tools.selNSGA2(population, len(population)) 13 # TODO make count divisible by 4, is this the best way to do it/is it absolutely required? if this is applied, why popsize must still be a multiple of 4?13 # make count divisible by 4, required by deap.tools.selTournamentDCD() 14 14 remainder=count % 4 15 15 if remainder > 0:
Note: See TracChangeset
for help on using the changeset viewer.