gemseo_pymoo / algos / opt / core

Hide inherited members

pymoo_problem_adapater module

An adapter for pymoo Problem.

class gemseo_pymoo.algos.opt.core.pymoo_problem_adapater.PymooProblem(*args, **kwargs)[source]

Bases: Problem

Interface between GEMSEO and pymoo optimization problems.

It supports multiprocessing.

Initialize a pymoo Problem from a GEMSEO one.

It also sets up a parallel object ParallelExecution for multiprocessing purposes.

Parameters:
  • opt_problem (OptimizationProblem) – The GEMSEO problem to convert to a pymoo problem.

  • normalize_ds (bool) – Whether to normalize the design variables.

  • driver (OptimizationLibrary) – The optimization library used to handle the problem.

  • **options (Any) – The other algorithm options.

max_gen

The maximum number of generations allowed.

normalize_ds

Whether the design space is normalized.

opt_problem

The GEMSEO optimization problem.

gemseo_pymoo.algos.opt.core.pymoo_problem_adapater.get_gemseo_opt_problem(pymoo_pb, **pymoo_pb_options)[source]

Create a GEMSEO problem from a pymoo Problem.

If the pymoo problem’s name is provided, it must be a valid name among the available ones (see pymoo problems).

Parameters:
  • pymoo_pb (str | Problem) – The pymoo problem to be converted.

  • **pymoo_pb_options (Any) – The additional arguments to be passed to the pymoo’s problem getter get_problem.

Returns:

An instance of a GEMSEO OptimizationProblem.

Raises:

TypeError – If pymoo_pb is not a valid string nor an instance of Problem.

Return type:

OptimizationProblem