Hi Joris,
I create the solver outside of the loop and then call it when measurements are available. Everything works fine when I give a constant state noise (line 78), that then enters in the objective in line 218.
Considering that for my process constant state noise would be a very strong assumption, I wanted to have it variable and I tought about defining it as in line 142-143 and then give it to the solver as a variable in line 250. However, when I do so, I get the same error that Pegah mentioned:
"ex.is_scalar()" failed:
'gradient' only defined for scalar outputs: Use
'jacobian' instead.
I am very new to CasAdi, so I am probably doing something wrong. Is there a way you can help me with solving that? :)
Best regards,
Andrea