Hi all,
I am implementing MPC using CasADi. My model has an algebraic loop in one of the equations, so I was trying to implement a fixed-point iteration using a 'while' loop to solve the algebraic loop.
However, the while loop has one variable which is a MX type, so I get the error:
Conversion to logical from casadi.MX is not possible.
Does anyone know how to implement a while loop for MX/SX variables?
or - may be even better - does anyone know how to solve an algebraic loop using another method (not the fixed-point iteration)?
Thank you!
Paulina.