Skip to content
Discussion options

You must be logged in to vote

out_Dx is part of CasADi's canonical full-Jacobian function signature; it is not another derivative or a seed.

For an original function

f: (x, u) -> (Dx)

Function::jacobian() constructs a function shaped like

jac_f: (x, u, out_Dx) -> (jac_Dx_x, jac_Dx_u)

CasADi documents that convention directly in Function::jacobian(): the original outputs are appended to the derivative function's inputs, and inputs that the derivative routine does not need are represented as all-zero sparse matrices with the correct dimensions.

So the display

out_Dx[2x1,0nz]

means "a 2-by-1 slot with zero structural nonzeros because this Jacobian routine does not need the already-computed value of Dx." It does not me…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@arn1m
Comment options

Answer selected by arn1m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants