Hello, I'm modifying the single_shooting.py example on the casadi repository (
https://github.com/casadi/casadi/blob/master/docs/examples/python/direct_single_shooting.py ) in various ways. One way is that I want the cost function for the NLP solver to be a casadi Function. However, I get the following error when the code calls the nlpsol function:
'Wrong number or type of arguments for overloaded function 'nlpsol'.
The error occurs at line 112. If I change J_sym back to J, like it originally was, the error disappears. So I assume the problem is with using a Casadi Function for the cost function.
Cheers