HiI have a dynamic model of ordinary differential equation that I want to integrate over an interval I = [0,T].

In the dynamic model I have a constant which depends on the value of time:

example I = t1<t2<…<T and my constant takes a different value according to ti (I can interpolate my constant between ti and ti+1).

my question is the following:

how can I model it in CasADi?

I manage to define my model with the constant but I don’t know how at each ti my constant takes this value during the integration.

If anyone can enlighten me I would be grateful.