Parameterising CasADi functions after generating C code #3544
-
I am using CasADi with acados and looking into different ways of parameterizing dynamics/objective/constraints after compiling the controller. The controller is implemented as a Simulink s-function. So far I have been able to parameterize the controller by declaring parameters as a vector of MX variables and adding this vector to acados_ocp_model ( The main issue is that I need to parametrize the objective with a very long vector. The vector is the same for all prediction nodes. However, acados treats parameterization of every prediction node separately, which increases the total number of parameters significantly and the number of MX variables grows. For my application the vector of parameters is known at the beginning of the simulation and not changing while the controller is running. So I was thinking of taking advantage of that and finding a way of parameterizing CasADi dynamics/objective/constraints functions directly, bypassing the acados method of parametrizing. The idea is to create a custom CasADi function which will have parameters of interest as a part of its evaluation, so that we can call this function for symbolic evaluations when specifying dynamics/objective/constraints. One implementation of this idea I considered was creating a custom function with Does
Even if we can make
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
In general, this may be your answer:
In particular, about the external strategy.. External does work for Windows (with that exact syntax), and is supported for codegen. |
Beta Was this translation helpful? Give feedback.
In general, this may be your answer:
In particular, about the external strategy.. External does work for Windows (with that exact syntax), and is supported for codegen.
Maybe some dependency of your dll is not found in the PATH? Try dependencywalker