casadi / casadi

CasADi is a symbolic framework for numeric optimization implementing automatic differentiation in forward and reverse modes on sparse matrix-valued computational graphs. It supports self-contained C-code generation and interfaces state-of-the-art codes such as SUNDIALS, IPOPT etc. It can be used from C++, Python or Matlab/Octave.
http://casadi.org
GNU Lesser General Public License v3.0
1.58k stars 357 forks source link

How to use Debugging features #3649

Open xzclwq opened 2 months ago

xzclwq commented 2 months ago

Hi, I am a beginner of casadi and I have some troubles about how to use Debugging features of casadi because of no demo in Official documents。for example I use the opti.debug.show_infeasibilities() in MatLab and it would occur following problem: Solver failed. You may use opti.debug.value to investigate the latest values of variables. return_status is 'Infeasible_Problem_Detected'

出错 test243272024 (第 234 行) sol = opti.solve();

opti.debug.show_infeasibilities() Violated constraints (tol 0), in order of declaration: ------- i = 1/98 ------ 0 <= 0 <= 0 (viol 0) 错误使用 casadi.OptiAdvanced/show_infeasibilities (第 309 行) Error in Opti::g_describe [OptiNode] at .../casadi/core/optistack.cpp:532: .../casadi/core/generic_type.cpp:332: Assertion "is_string()" failed: Notify the CasADi developers. could you help me? Thank you very mach!