Dear Horea,
You can work with a time-transformation to keep t0 and tf fixed at, say, 0 and 1.
"call the function binding with symbolic arguments to get expressions again":
x = MX.sym('x',f.size_in('x'));
u = MX.sym('u',f.size_in('u'));
p = MX.sym('p',f.size_in('p'));
intg = integrator('intg','idas',struct('x',x,'p',[u;p],'ode', f(x,u,p) ));
IDAS needs derivatives, so beter code-generate them as well:
C = CodeGenerator('gen.c',opts);
C.add(f);
C.add(f.jacobian());
C.generate();
Best regards,
Joris