gemseo / core / mdofunctions

Show inherited members

convex_linear_approx module

A function computing the convex linearization of another one.

class gemseo.core.mdofunctions.convex_linear_approx.ConvexLinearApprox(x_vect, mdo_function, approx_indexes=None, sign_threshold=1e-09)[source]

Bases: MDOFunction

Wrap a convex linearization of the function.

Initialize self. See help(type(self)) for accurate signature.

Parameters:
  • x_vect (NumberArray) – The input vector at which to build the convex linearization.

  • mdo_function (MDOFunction) – The function to approximate.

  • approx_indexes (ndarray[bool] | None) – A boolean mask specifying w.r.t. which inputs the function should be approximated. If None, consider all the inputs.

  • sign_threshold (float) –

    The threshold for the sign of the derivatives.

    By default it is set to 1e-09.

Raises:
  • ValueError – If the length of boolean array and the number of inputs of the functions are inconsistent.

  • AttributeError – If the function does not have a Jacobian function.

force_real: bool

Whether to cast the results to real value.

has_default_name: bool

Whether the name has been set with a default value.

last_eval: OutputType | None

The value of the function output at the last evaluation.

None if it has not yet been evaluated.

special_repr: str

The string representation of the function overloading its default string ones.