String manipulation to detect variables present in for sparse_jacobian/matlabFunction
Closed this issue · 0 comments
jrvanwhy commented
String manipulation could be used to identify what variables are present in a symbolic expression. This could be done initially by name with later refinement (in a second pass) by variable index.
Perhaps the sparsity structure of a constraint (or objective's) Jacobian could be discovered before any symbolic differentiation is done. This could allow for optimization of the calls to jacobian, giving a large potential speed boost to derivative calculations.
Alternatively, perhaps complex step differentiation could be done on the anonymous constraint and objective functions (though I think this would be slow).