pseven_problem_adapter module¶
An adapter from .OptimizationProblem to a pSeven ProblemGeneric.
- class gemseo.algos.opt.core.pseven_problem_adapter.PSevenProblem(*args, **kwargs)[source]¶
Bases:
ProblemGeneric
Adapter of OptimizationProblem to da.p7core.gtopt.ProblemGeneric.
The methods prepare_problem() and evaluate() are defined according to pSeven’s requirements. Refer to the API documentation of pSeven Core for more information.
- Parameters:
problem (OptimizationProblem) – The optimization problem to be adapted to pSeven.
evaluation_cost_type (str | Mapping[str, str] | None) – The evaluation cost type of each function of the problem: “Cheap” or “Expensive”. If a string, then the same cost type is set for all the functions. If None, the evaluation cost types are set by pSeven.
expensive_evaluations (Mapping[str, int] | None) – The maximal number of expensive evaluations for each function of the problem. If None, this number is set automatically by pSeven.
lower_bounds (ndarray | None) – The lower bounds on the design variables. If None, the lower bounds are read from the design space.
upper_bounds (ndarray | None) – The upper bounds on the design variables. If None, the upper bounds are read from the design space.
initial_point (ndarray | None) – The initial values of the design variables. If None, the initial values are read from the design space.
use_gradient (bool) –
Whether to use the derivatives of the functions. If the functions have no derivative then this value has no effect.
By default it is set to True.