for i, eq in enumerate(model.odes): // i is equation number
eq = eq.subs("s%d" % i, "s%dstar" % i)
star = Symbol("s%dstar" % i)
sol = solve(eq, star)
max = 0 // Start with no distance
for j in range(len(sol)): // j is solution j for equation i
for p in model.parameters: sol[j] = sol[j].subs(p.name, p.value) // Substitute parameters
for tt in t:
After Change
names = [n for n in filter(lambda n: n.startswith("__"), x.dtype.names)]
x = x[names] // Only concrete species are considered
names = [n.replace("__","") for n in names]
x.dtype = [(n,"<f8") for n in names]
for i, eq in enumerate(model.odes): // i is equation number
eq = eq.subs("s%d" % i, "s%dstar" % i)
sol = solve(eq, Symbol("s%dstar" % i)) // Find equation of imposed trace