It is possible to include a spline function in your model to input an arbitrary function but it has to be input as a series of piecewise functions, for example:
import tellurium as te
import roadrunner
r = te.loada("""
Xo := piecewise (((-0.019175*(time-0) + 0.000000)*(time-0) + 1.019175)*(time-0) + 0.000000, (time >=0.000000) && (time <= 1.000000),\
((-0.404123*(time-1) - 0.057526)*(time-1) + 0.961649)*(time-1) + 1.000000, (time >=1.000000) && (time <= 2.000000),\
((0.635668*(time-2) - 1.269895)*(time-2) - 0.365772)*(time-2) + 1.500000, (time >=2.000000) && (time <= 3.000000),\
((-0.101418*(time-3) + 0.637107)*(time-3) - 0.998560)*(time-3) + 0.500000, (time >=3.000000) && (time <= 6.000000),\
((0.189856*(time-6) - 0.275654)*(time-6) + 0.085798)*(time-6) + 0.500000, (time >=6.000000) && (time <= 7.000000),\
((-0.097971*(time-7) + 0.293914)*(time-7) + 0.104058)*(time-7) + 0.500000, (time >=7.000000) && (time <= 8.000000))
J1: $Xo -> s1; k1*Xo;
s1 -> ; k2*s1;
k1 = 1; k2 = 0.4
""")
#te.saveToFile ('c:\\tmp\\spline.xml', r.getSBML());
m = r.simulate (0, 8, 100, ['time', 'Xo', 's1'])
r.plot()
The above line was generated using a plugin from pathwaydesigner but it should be possible to construct the same piecewise expression using python.
Herbert Sauro