Possibility of using external jacobian/hessian function for model and constraint?

Hi,

I am trying to use acados to solve ocp, while I need some external functions from other libraries to calculate jacobian/hessian (i.e. derivatives) for constraints and model. The external function may not be casadi function. I need this because some algorithms cannot be easily differentiated but I can get their analytical derivatives(numerical). Is this possible?

Sincerely

Looking at C interface: is only disc_dyn_fun_jac needed for discrete model?
I think you are already on the right path!
Note that this is not equally easy for all kinds of external funcitons through the interfaces. (There are the examples in acados/examples/acados_matlab_octave/generic_*
On the C level it is possible for all kinds of functions though.

Thanks for the reply.
I plan to modify the python interface and makefile template to link to my custom functions wirtten in cpp. I want to export my custom function which interacts with acados with the generic function argument list. Could you give me some more hints on possible problems during my modification?

hi @FreyJo ,

I am facing the same issue. I have my analytical jacobians of the dynamics, costs and constraints and would like to exploit their computational speed by providing them to acados. I noticed that there is no access to that through the python interface. Is it possible to expose those features in the python interface as well ? thanks.