gemseo / post

Show inherited members

quad_approx module

Quadratic approximations of functions from the optimization history.

class gemseo.post.quad_approx.QuadApprox(opt_problem)[source]

Bases: OptPostProcessor

Quadratic approximation of a function.

And cuts of the approximation.

The function index can be passed as option.

Parameters:

opt_problem (OptimizationProblem) – The optimization problem to be post-processed.

Raises:

ValueError – If the JSON grammar file for the options of the post-processor does not exist.

static unnormalize_vector(xn_array, ivar, lower_bounds, upper_bounds)[source]

Unormalize a variable with respect to bounds.

Parameters:
  • xn_array (ndarray) – The normalized variable.

  • ivar (int) – The index of the variable bound.

  • lower_bounds (ndarray) – The lower bounds of the variable.

  • upper_bounds (ndarray) – The upper bounds of the variable.

Returns:

The unnormalized variable.

Return type:

ndarray

DEFAULT_FIG_SIZE = (9.0, 6.0)

The default width and height of the figure, in inches.

SR1_APPROX = 'SR1'
database: Database

The database generated by the optimization problem.

materials_for_plotting: dict[Any, Any]

The materials to eventually rebuild the plot in another framework.

opt_problem: OptimizationProblem

The optimization problem.