Problems
Package related to problem description and design of experiment.
Classes summary
|
Abstract class for real-valued optimization problems. |
Abstract class for real-valued box-constrained optimization problems. |
|
Abstract class for artificial single-objective real-valued box-constrained optimization problems. |
|
Abstract class for artificial multi-objective real-valued box-constrained optimization problems. |
|
|
Class for the single-objective Ackley problem. |
Class for 1D single-objective Xiong problem. |
|
|
Class for the single-objective Schwefel problem. |
|
Class for the single-objective Rastrigin problem. |
|
Class for the single-objective Rosenbrock problem. |
|
Class for single-objective problems from the CEC2013. |
|
Class for single-objective problems from the CEC2014. |
|
Class for multi-objective problems from the DTLZ test suite. |
|
Class for bi-objective problems from the ZDT test suite. |
|
Class for Design of Experiments. |
Abstract classes
Problem
- class Problems.Problem.Problem(n_dvar, n_obj)
Bases:
ABCAbstract class for real-valued optimization problems.
- Parameters:
n_dvar (positive int, not zero) – number of decision variables
n_obj (positive int, not zero) – number of objectives
Box-constrained
Single_Objective
- class Problems.Single_Objective.Single_Objective(n_dvar)
Bases:
Box_ConstrainedAbstract class for artificial single-objective real-valued box-constrained optimization problems.
- Parameters:
n_dvar (positive int, not zero) – number of decision variables
Multi_Objective
- class Problems.Multi_Objective.Multi_Objective(n_dvar, n_obj)
Bases:
Box_ConstrainedAbstract class for artificial multi-objective real-valued box-constrained optimization problems.
- Parameters:
n_dvar (positive int, not zero) – number of decision variables
Single-Objective Problems
Ackley
- class Problems.Ackley.Ackley(n_dvar)
Bases:
Single_ObjectiveClass for the single-objective Ackley problem.
- Parameters:
n_dvar (positive int, not zero) – number of decision variable
- perform_real_evaluation(candidates)
Objective function.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
objective values
- Return type:
np.ndarray
- get_bounds()
Returns search space bounds.
- Returns:
search space bounds
- Return type:
np.ndarray
- is_feasible(candidates)
Check feasibility of candidates.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
boolean indicating whether candidates are feasible
- Return type:
bool
- plot()
Plot the 1D or 2-D Ackley objective function.
Xiong
- class Problems.Xiong.Xiong
Bases:
Single_ObjectiveClass for 1D single-objective Xiong problem.
- perform_real_evaluation(candidates)
Objective function.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
objective values
- Return type:
np.ndarray
- get_bounds()
Returns search space bounds.
- Returns:
search space bounds
- Return type:
np.ndarray
- is_feasible(candidates)
Check feasibility of candidates.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
boolean indicating whether candidates are feasible
- Return type:
bool
- plot()
Plot the 1D Xiong objective function.
Schwefel
- class Problems.Schwefel.Schwefel(n_dvar)
Bases:
Single_ObjectiveClass for the single-objective Schwefel problem.
- Parameters:
n_dvar (positive int, not zero) – number of decision variables
- perform_real_evaluation(candidates)
Objective function.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
objective values
- Return type:
np.ndarray
- get_bounds()
Returns search space bounds.
- Returns:
search space bounds
- Return type:
np.ndarray
- is_feasible(candidates)
Check feasibility of candidates.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
boolean indicating whether candidates are feasible
- Return type:
bool
- plot()
Plot the 1D or 2D Schwefel objective function.
Rastrigin
- class Problems.Rastrigin.Rastrigin(n_dvar)
Bases:
Single_ObjectiveClass for the single-objective Rastrigin problem.
- Parameters:
n_dvar (positive int, not zero) – number of decision variable
- perform_real_evaluation(candidates)
Objective function.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
objective values
- Return type:
np.ndarray
- get_bounds()
Returns search space bounds.
- Returns:
search space bounds
- Return type:
np.ndarray
- is_feasible(candidates)
Check feasibility of candidates.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
boolean indicating whether candidates are feasible
- Return type:
bool
- plot()
Plot the 1D or 2D Rastrigin objective function.
Rosenbrock
- class Problems.Rosenbrock.Rosenbrock(n_dvar)
Bases:
Single_ObjectiveClass for the single-objective Rosenbrock problem.
- Parameters:
n_dvar (positive int, >1) – number of decision variable
- perform_real_evaluation(candidates)
Objective function.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
objective values
- Return type:
np.ndarray
- get_bounds()
Returns search space bounds.
- Returns:
search space bounds
- Return type:
np.ndarray
- is_feasible(candidates)
Check feasibility of candidates.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
boolean indicating whether candidates are feasible
- Return type:
bool
- plot()
Plot the 2D Rosenbrock objective function.
CEC2013
- class Problems.CEC2013.CEC2013(f_id, n_dvar)
Bases:
Single_ObjectiveClass for single-objective problems from the CEC2013.
- Parameters:
f_id (int in {1,...,28}) – problem’s identifier into the pygmo library
n_dvar (int in {2,5,20,30,40,50,60,70,80,90,100}) – number of decision variables
- perform_real_evaluation(candidates)
Objective function.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
objective values
- Return type:
np.ndarray
- get_bounds()
Returns search space bounds.
- Returns:
search space bounds
- Return type:
np.ndarray
- is_feasible(candidates)
Check feasibility of candidates.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
boolean indicating whether candidates are feasible
- Return type:
bool
- plot()
Plot the 2D CEC2013 considered problem’s objective function.
CEC2014
- class Problems.CEC2014.CEC2014(f_id, n_dvar)
Bases:
Single_ObjectiveClass for single-objective problems from the CEC2014.
- Parameters:
f_id (int in {1,...,30}) – problem’s identifier into the pygmo library
n_dvar (int in {2,10,20,30,50,100}) – number of decision variable
- perform_real_evaluation(candidates)
Objective function.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
objective values
- Return type:
np.ndarray
- get_bounds()
Returns search space bounds.
- Returns:
search space bounds
- Return type:
np.ndarray
- is_feasible(candidates)
Check feasibility of candidates.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
boolean indicating whether candidates are feasible
- Return type:
bool
- plot()
Plot the 2D CEC2014 considered problem’s objective function.
Multi-Objective Problems
DTLZ
- class Problems.DTLZ.DTLZ(f_id, n_dvar, n_obj)
Bases:
Multi_ObjectiveClass for multi-objective problems from the DTLZ test suite.
- Parameters:
f_id (int in {1,...,7}) – problem’s identifier into the pygmo library
n_dvar (positive int, not zero, strictly greater than n_obj) – number of decision variables
n_obj (positive int, strictly greater than 1) – number of objectives
- perform_real_evaluation(candidates)
Objective function.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
objective values
- Return type:
np.ndarray
- get_bounds()
Returns search space bounds.
- Returns:
search space bounds
- Return type:
np.ndarray
- is_feasible(candidates)
Check feasibility of candidates.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
boolean indicating whether candidates are feasible
- Return type:
bool
ZDT
- class Problems.ZDT.ZDT(f_id, n_dvar)
Bases:
Multi_ObjectiveClass for bi-objective problems from the ZDT test suite.
- Parameters:
f_id (int in {1,2,3,4,6}) – problem’s identifier into the pygmo library
n_dvar (positive int, strictly greater than 1) – number of decision variables
- perform_real_evaluation(candidates)
Objective function.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
objective values
- Return type:
np.ndarray
- get_bounds()
Returns search space bounds.
- Returns:
search space bounds
- Return type:
np.ndarray
- is_feasible(candidates)
Check feasibility of candidates.
- Parameters:
candidates (np.ndarray) – candidate decision vectors
- Returns:
boolean indicating whether candidates are feasible
- Return type:
bool
Design of Experiments
- class Problems.DoE.DoE(pb)
Bases:
objectClass for Design of Experiments.
- Parameters:
pb (Box_Constrained) – related optimization problem
- random_uniform_sampling(nb_samples)
Returns samples generated by random uniform sampling over the search space.
- Parameters:
nb_samples (positive int, not zero) – number of samples to generate
- Returns:
samples
- Return type:
np.ndarray
- latin_hypercube_sampling(nb_samples)
Returns samples generated by latin hypercube sampling over the search space.
- Parameters:
nb_samples (positive int, not zero) – number of samples to generate
- Returns:
samples
- Return type:
np.ndarray