You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation, in evaluating objective function f( ), one can evaluate both the function f(x) and grad(f(x)). This can be done by setting boolean value of jac true.
Similarly, I want to compute both constraint function and its jacobian in evaluating nonlinear inequality constraints. However, according to the documentation, no such thing seems to be an option.
jac{callable, ‘2-point’, ‘3-point’, ‘cs’}, optional \\ no boolean!
Is there any way to realize this?
The text was updated successfully, but these errors were encountered:
Looking at the source code, I found the Jacobian seems to be computed right after the evaluation of the constraint function. Thus, the workaround would be setting global variable (or making class for that) and writing the code like below:
Rather than using global variable or custom class, I finally found using closure like below is more concise and easier to incorporate it into my existing codes:
According to the documentation, in evaluating objective function
f( )
, one can evaluate both the functionf(x)
andgrad(f(x))
. This can be done by setting boolean value ofjac
true.Similarly, I want to compute both constraint function and its jacobian in evaluating nonlinear inequality constraints. However, according to the documentation, no such thing seems to be an option.
Is there any way to realize this?
The text was updated successfully, but these errors were encountered: