Plugin 'ipopt' is not found - MATLAB

290 views
Skip to first unread message

Quoc Phong Pham

unread,
Aug 29, 2022, 5:37:24 AM8/29/22
to CasADi
Hi everyone!
I just have downloaded CasADi for Matlab from the official website: https://web.casadi.org/get/ 
I want to use 'ipopt' solver but Matlab says that Plugin 'ipopt' is not found
Who have met this problem? Please help me to fix that!
Thanks!

CODE:
import casadi.*
x = SX.sym('x');
y = SX.sym('y');
v = [x;y];
f = unc_rosenbrock_fun(x,y);
g = [];

nlp = struct('x', v, 'f', f', 'g', g);

solver = nlpsol('solver', 'ipopt', nlp);

ERROR:
CasADi -  WARNING(".../casadi/core/plugin_interface.hpp:322: Assertion "handle!=nullptr" failed:
PluginInterface::load_plugin: Cannot load shared library 'libcasadi_nlpsol_ipopt.dll':
   (
    Searched directories: 1. casadipath from GlobalOptions
                          2. CASADIPATH env var
                          3. PATH env var (Windows)
                          4. LD_LIBRARY_PATH env var (Linux)
                          5. DYLD_LIBRARY_PATH env var (osx)
    A library may be 'not found' even if the file exists:
          * library is not compatible (different compiler/bitness)
          * the dependencies are not found
   )
  Tried 'E:\Самонаведение ракет\MPC - Николай Борисович\Full course - Numerical Optimal Control (online)\casadi-windows-matlabR2016a-v3.5.5' :
    Error code (WIN32): 126
  Tried '' :
    Error code (WIN32): 126
  Tried '.' :
    Error code (WIN32): 126") [.../casadi/core/plugin_interface.hpp:171]

Quoc Phong Pham

unread,
Aug 30, 2022, 3:15:52 AM8/30/22
to CasADi
I got it guys. You have to extract CasADi to C disk and save this path to Matlab. Then it will work.

Vào lúc 12:37:24 UTC+3 ngày Thứ Hai, 29 tháng 8, 2022, Quoc Phong Pham đã viết:
Reply all
Reply to author
Forward
0 new messages