aerosandbox.modeling.black_box
#
Module Contents#
Functions#
|
Wraps a function as a black box, allowing it to be used in AeroSandbox / CasADi optimization problems. |
|
- aerosandbox.modeling.black_box.black_box(function, n_in=None, n_out=1, fd_method='central', fd_step=None, fd_step_iter=None)[source]#
Wraps a function as a black box, allowing it to be used in AeroSandbox / CasADi optimization problems.
Obtains gradients via finite differences. Assumes that the function’s Jacobian is fully dense, always.
- Parameters:
function (Callable[[Any], float]) –
n_in (int) –
n_out (int) –
fd_method (str) – One of: - ‘forward’ - ‘backward’ - ‘central’ - ‘smoothed’
fd_step (Optional[float]) –
fd_step_iter (Optional[bool]) –
- Return type:
Callable[[Any], float]
Returns: