CADETProcess.optimization.NSGA2.get_population_size

CADETProcess.optimization.NSGA2.get_population_size#

NSGA2.get_population_size(optimization_problem: OptimizationProblem) int#

Determine the population size for an optimization problem.

This method calculates the population size based on the number of independent variables in the optimization problem. If pop_size is not set, it defaults to the minimum of 400 or the maximum of 50 times the number of independent variables and 50.

Parameters:
optimization_problemOptimizationProblem

The optimization problem for which to determine the population size.

Returns:
int

The population size.