in casadi, inputs come before outputs :b