gemseo.core.mdo_functions.convex_linear_approx module#

A function computing the convex linearization of another one.

class ConvexLinearApprox(x_vect, mdo_function, approx_indexes=None, sign_threshold=1e-09)[source]#

Bases: MDOFunction

Wrap a convex linearization of the function.

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.