iwopy.interfaces.pymoo.optimizer.Optimizer_pymoo

class iwopy.interfaces.pymoo.optimizer.Optimizer_pymoo[source]

Bases: Optimizer

Interface to the pymoo optimization solver.

Parameters:
  • problem (iwopy.Problem) – The problem to optimize

  • problem_pars (dict) – Parameters for the problem

  • algo_pars (dict) – Parameters for the alorithm

  • setup_pars (dict) – Parameters for the calculation setup

problem_pars

Parameters for the problem

Type:

dict

algo_pars

Parameters for the alorithm

Type:

dict

setup_pars

Parameters for the calculation setup

Type:

dict

term_pars

Parameters for the termination conditions

Type:

dict

pymoo_problem

The pygmo problem

Type:

iwopy.interfaces.pymoo.SingleObjProblem

algo

The pygmo algorithm

Type:

pygmo.algo

__init__(problem, problem_pars, algo_pars, setup_pars={}, term_pars={})[source]

Methods

__init__(problem, problem_pars, algo_pars[, ...])

finalize(opt_results[, verbosity])

This function may be called after finishing the optimization.

get_figure_f([fig, ax, valid_dict])

Create a figure that shows the objective function development during optimization.

initialize([verbosity])

Initialize the object.

print_info()

Print solver info, called before solving

solve([callback, verbosity])

Run the optimization solver.

Attributes

initialized

Flag for finished initialization

__init__(problem, problem_pars, algo_pars, setup_pars={}, term_pars={})[source]
finalize(opt_results, verbosity=1)

This function may be called after finishing the optimization.

Parameters:
  • opt_results (iwopy.OptResults) – The optimization results object

  • verbosity (int) – The verbosity level, 0 = silent

get_figure_f(fig=None, ax=None, valid_dict=None, **kwargs)[source]

Create a figure that shows the objective function development during optimization.

The kwargs are forwarded to the plot command.

Parameters:
  • fig (plt.Figure, optional) – The figure to which to add the plot

  • ax (plt.Axis, optional) – The axis to which to add the plot

  • valid_dict (dict, optional) – Settings for the point of first valid solution, forwarded to scatter

Returns:

fig – The figure

Return type:

plt.Figure

initialize(verbosity=1)[source]

Initialize the object.

Parameters:

verbosity (int) – The verbosity level, 0 = silent

property initialized

Flag for finished initialization

Returns:

True if initialization has been done

Return type:

bool

print_info()[source]

Print solver info, called before solving

solve(callback='default', verbosity=1)[source]

Run the optimization solver.

Parameters:
  • callback (pymoo.Callback, optional) – The callback

  • verbosity (int) – The verbosity level, 0 = silent

Returns:

results – The optimization results object

Return type:

iwopy.SingleObjOptResults or iwopy.MultiObjOptResults