Multi-Objective Solvers

Base Class

class algorithm.mobo.solver.base.Solver(n_gen, pop_init_method, batch_size, algo, seed=None, **kwargs)[source]

Bases: object

Multi-objective solver.

__init__(n_gen, pop_init_method, batch_size, algo, seed=None, **kwargs)[source]

Initialize a solver.

Parameters:
  • n_gen (int) – Number of generations to solve.
  • pop_init_method (str) – Method to initialize population.
  • batch_size (int) – Batch size, i.e. population size.
  • algo (pymoo.model.algorithm.Algorithm) – Class of multi-objective algorithm to use.
  • seed (int, default=None) – Random seed.
  • kwargs (dict) – Other keyword arguments for algorithm to initialize.
_get_sampling(X, Y)[source]

Initialize population from data.

Parameters:
  • X (np.array) – Design variables.
  • Y (np.array) – Performance values.
Returns:

sampling – Initial population or a sampling method for generating initial population.

Return type:

np.array or pymoo.model.sampling.Sampling

solve(problem, X, Y)[source]

Solve the multi-objective problem.

Parameters:
  • problem (mobo.surrogate_problem.SurrogateProblem) – The surrogate problem to be solved.
  • X (np.array) – Current design variables.
  • Y (np.array) – Current performance values.
Returns:

solution – A dictionary containing information of the solution.

  • solution[‘x’]: Proposed design samples.
  • solution[‘y’]: Performance of proposed design samples.
  • solution[‘algo’]: The algoritm of the solver, containing some history information of the solving process.

Return type:

dict

NSGA-II

class algorithm.mobo.solver.nsga2.NSGA2Solver(*args, **kwargs)[source]

Bases: algorithm.mobo.solver.base.Solver

Solver based on NSGA-II.

__init__(*args, **kwargs)[source]

Initialize a solver.

Parameters:
  • n_gen (int) – Number of generations to solve.
  • pop_init_method (str) – Method to initialize population.
  • batch_size (int) – Batch size, i.e. population size.
  • algo (pymoo.model.algorithm.Algorithm) – Class of multi-objective algorithm to use.
  • seed (int, default=None) – Random seed.
  • kwargs (dict) – Other keyword arguments for algorithm to initialize.

MOEA/D

class algorithm.mobo.solver.moead.MOEADSolver(*args, **kwargs)[source]

Bases: algorithm.mobo.solver.base.Solver

Solver based on MOEA/D.

__init__(*args, **kwargs)[source]

Initialize a solver.

Parameters:
  • n_gen (int) – Number of generations to solve.
  • pop_init_method (str) – Method to initialize population.
  • batch_size (int) – Batch size, i.e. population size.
  • algo (pymoo.model.algorithm.Algorithm) – Class of multi-objective algorithm to use.
  • seed (int, default=None) – Random seed.
  • kwargs (dict) – Other keyword arguments for algorithm to initialize.

ParEGO Solver

class algorithm.mobo.solver.parego.parego.ParEGOSolver(*args, **kwargs)[source]

Bases: algorithm.mobo.solver.base.Solver

Solver based on ParEGO.

__init__(*args, **kwargs)[source]

Initialize a solver.

Parameters:
  • n_gen (int) – Number of generations to solve.
  • pop_init_method (str) – Method to initialize population.
  • batch_size (int) – Batch size, i.e. population size.
  • algo (pymoo.model.algorithm.Algorithm) – Class of multi-objective algorithm to use.
  • seed (int, default=None) – Random seed.
  • kwargs (dict) – Other keyword arguments for algorithm to initialize.
solve(problem, X, Y)[source]

Solve the multi-objective problem by multiple scalarized single-objective solvers.

Parameters:
  • problem (mobo.surrogate_problem.SurrogateProblem) – The surrogate problem to be solved.
  • X (np.array) – Current design variables.
  • Y (np.array) – Current performance values.
Returns:

solution – A dictionary containing information of the solution.

  • solution[‘x’]: Proposed design samples.
  • solution[‘y’]: Performance of proposed design samples.

Return type:

dict

DGEMO Solver

class algorithm.mobo.solver.pareto_discovery.pareto_discovery.ParetoDiscoverySolver(*args, **kwargs)[source]

Bases: algorithm.mobo.solver.base.Solver

Solver based on ParetoDiscovery [Schulz et al. 2018].

__init__(*args, **kwargs)[source]

Initialize a solver.

Parameters:
  • n_gen (int) – Number of generations to solve.
  • pop_init_method (str) – Method to initialize population.
  • batch_size (int) – Batch size, i.e. population size.
  • algo (pymoo.model.algorithm.Algorithm) – Class of multi-objective algorithm to use.
  • seed (int, default=None) – Random seed.
  • kwargs (dict) – Other keyword arguments for algorithm to initialize.