Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
310 lines (195 sloc) 7.57 KB
This file contains the description of all external functions interfaced to acados.
!!! Please keep it updated when developing new features !!!
/************************************************
* ocp_nlp_cost_external
************************************************/
// complete gradient and hessian of cost, computed externally
external function: ext_cost
inputs:
0) [u; x] size: nu+nx type: COLMAJ
outputs:
0) [grad_u; grad_x] size: nu+nx type: COLMAJ
1) [hess_uu, hess_ux; hess_xu; hess_xx] size: (nu+nx)*(nu+nx) type: COLMAJ
/************************************************
* ocp_nlp_cost_nls
************************************************/
// function and jacobian_transposed of residuals of nonlinear least-squares
external function: nls_jac
inputs:
0) [u; x] size: nu+nx type: BLASFEO_DVEC
outputs:
0) [fun] size: ny type: BLASFEO_DVEC
1) [jac_u'; jac_x'] size: (nu+nx)*(ny) type: BLASFEO_DMAT
// exact hessian of nonlinear least-squares, computed using the numerical values in fun for the residuals
external function: nls_hess
inputs:
0) [u; x] size: nu+nx type: BLASFEO_DVEC
1) [fun] size: ny type: BLASFEO_DVEC
outputs:
0) [hess_uu, hess_ux; hess_xu; hess_xx] size: (nu+nx)*(nu+nx) type: BLASFEO_DMAT
/************************************************
* ocp_nlp_constraints
************************************************/
// function and jacobian_transposed of nonlinear constraints
external function: h
inputs:
0) [u; x] size: nu+nx type: BLASFEO_DVEC
outputs:
0) [fun] size: nh type: BLASFEO_DVEC_ARGS
1) [jac_u'; jac_x'] size: (nu+nx)*nh type: BLASFEO_DMAT_ARGS
/************************************************
* sim_erk_integrator
************************************************/
// function of explicit ode model
external function: expl_ode_fun
inputs:
0) [x] size: nx type: COLMAJ
1) [u] size: nu type: COLMAJ
outputs:
0) [fun] size: nx type: COLMAJ
// function and jacobian-times-seeds (forward sensitivities) of explicit ode model, computed using vde model
external function: expl_vde_for
inputs:
0) [x] size: nx type: COLMAJ
1) [Sx] size: nx*nx type: COLMAJ
2) [Su] size: nx*nu type: COLMAJ
3) [u] size: nu type: COLMAJ
outputs:
0) [fun] size: nx type: COLMAJ
1) [jac_x*Sx] size: nx*nx type: COLMAJ
2) [jac_x*Su+jac_u] size: nx*nu type: COLMAJ
// jacobian_transposed-times-vector (adjoint sensitivities) of explicit ode model
external function: expl_ode_adj
0) [x] size: nx type: COLMAJ
1) [lam] size: nx type: COLMAJ
2) [u] size: nu type: COLMAJ
outputs:
0) [jac_x'*lam; jac_u'*lam] size: nx+nu type: COLMAJ
// hessian of explicit ode model, computed using vde model
external function: expl_vde_hess
0) [x] size: nx type: COLMAJ
1) [Sx] size: nx*nx type: COLMAJ
2) [Su] size: nx*nu type: COLMAJ
3) [lam] size: nx type: COLMAJ
4) [u] size: nu type: COLMAJ
outputs:
0) [jac_x'*lam; jac_u'*lam] size: nx+nu type: COLMAJ
1) [hess_xx, hess_xu; hess_ux, hess_uu] size: (nx+nu)*(nx+nu) type: COLMAJ
/************************************************
* sim_lifted_irk_integrator
************************************************/
// function and jacobian of explicit ode model
external function: expl_ode_jac
inputs:
0) [x] size: nx type: COLMAJ
1) [u] size: nu type: COLMAJ
outputs:
0) [fun] size: nx type: COLMAJ
1) [jac] size: nx*ns type: COLMAJ
// function and jacobian-times-seeds (forward sensitivities) of explicit ode model, computed using vde model
external function: expl_vde_for
inputs:
0) [x] size: nx type: COLMAJ
1) [Sx] size: nx*nx type: COLMAJ
2) [Su] size: nx*nu type: COLMAJ
3) [u] size: nu type: COLMAJ
outputs:
0) [fun] size: nx type: COLMAJ
1) [jac_x*Sx] size: nx*nx type: COLMAJ
2) [jac_x*Su+jac_u] size: nx*nu type: COLMAJ
/************************************************
* sim_irk_integrator
************************************************/
// function of implicit ode model
external function: impl_ode_fun
inputs:
0) [x] size: nx type: BLASFEO_DVEC
1) [K] size: nx type: BLASFEO_DVEC_ARGS
2) [u] size: nu type: COLMAJ
3) [z] size: nz type: BLASFEO_DVEC_ARGS
outputs:
0) [fun] size: nx type: BLASFEO_DVEC_ARGS
// function and jacobians of implicit ode model
external function: impl_ode_fun_jac_x_xdot
inputs:
0) [x] size: nx type: BLASFEO_DVEC
1) [K] size: nx type: BLASFEO_DVEC_ARGS
2) [u] size: nu type: COLMAJ
3) [z] size: nz type: BLASFEO_DVEC_ARGS
outputs:
0) [fun] size: nx type: BLASFEO_DVEC_ARGS
1) [jac_x] size: nx*nx type: BLASFEO_DMAT
2) [jac_xdot] size: nx*nx type: BLASFEO_DMAT
// jacobians of implicit ode model
external function: impl_ode_jac_x_xdot_u
inputs:
0) [x] size: nx type: BLASFEO_DVEC
1) [K] size: nx type: BLASFEO_DVEC_ARGS
2) [u] size: nu type: COLMAJ
3) [z] size: nz type: BLASFEO_DVEC_ARGS
outputs:
0) [jac_x] size: nx*nx type: BLASFEO_DMAT
1) [jac_xdot] size: nx*nx type: BLASFEO_DMAT
2) [jac_u] size: nx*nu type: BLASFEO_DMAT
// hessian function of implicit ode model
external function: impl_ode_hess
inputs:
0) [x] size: nx type: BLASFEO_DVEC
1) [K] size: nx type: BLASFEO_DVEC_ARGS
2) [u] size: nu type: COLMAJ
3) [z] size: nz type: BLASFEO_DVEC_ARGS
4) [lam] size: nx+nz type: BLASFEO_DVEC_ARGS
5) [dxkzu_w0] size: (2*nx+nz+nu, nx+nu) type: BLASFEO_DMAT_ARGS
outputs:
0) [f_hess] size: (nx+nu, nx+nu) type: BLASFEO_DMAT
/************************************************
* sim_new_lifted_irk_integrator
************************************************/
// function of implicit ode model
external function: impl_ode_fun
inputs:
0) [x] size: nx type: BLASFEO_DVEC
1) [K] size: nx type: BLASFEO_DVEC_ARGS
2) [u] size: nu type: COLMAJ
outputs:
0) [fun] size: nx type: BLASFEO_DVEC_ARGS
// function of implicit ode model + jacobians of implicit ode model
external function: impl_ode_fun_jac_x_xdot_u
inputs:
0) [x] size: nx type: BLASFEO_DVEC
1) [K] size: nx type: BLASFEO_DVEC_ARGS
2) [u] size: nu type: COLMAJ
outputs:
0) [fun] size: nx type: BLASFEO_DVEC_ARGS
1) [jac_x] size: nx*nx type: BLASFEO_DMAT
2) [jac_xdot] size: nx*nx type: BLASFEO_DMAT
3) [jac_u] size: nx*nu type: BLASFEO_DMAT
/************************************************
* sim_gnsf
************************************************/
/* nonlinearity function phi */
external functions: phi_fun, phi_fun_jac_y, phi_jac_y_uhat
inputs:
0) [y] size: ny type: BLASFEO_DVEC_ARGS
1) [uhat] size: nuhat type: BLASFEO_DVEC
// phi_fun
outputs:
0) [fun] size: n_out type: BLASFEO_DVEC_ARGS
// phi_fun_jac_y
outputs:
0) [fun] size: n_out type: BLASFEO_DVEC_ARGS
1) [jac_y] size: n_out*ny type: BLASFEO_DMAT_ARGS
// phi_jac_y_uhat
outputs:
0) [jac_y] size: n_out*ny type: BLASFEO_DMAT_ARGS
1) [jac_uhat] size: n_out*nuhat type: BLASFEO_DMAT_ARGS
/* linear output function f_lo */
external function: f_lo_fun_jac_x1_x1dot_u_z
inputs:
0) [x1] size: nx1 type: BLASFEO_DVEC_ARGS
1) [x1dot] size: nx1 type: BLASFEO_DVEC_ARGS
2) [z] size: nz type: BLASFEO_DVEC_ARGS
3) [u] size: nu type: BLASFEO_DVEC
outputs:
0) [fun] size: nx2 type: BLASFEO_DVEC_ARGS
1) [jac_x1_x1dot_u_z] size: nx2*(2*nx1+nu+nz) type: BLASFEO_DMAT_ARGS