Wolfram integration

The package allows to generate Wolfram code describing an existing model.

[1]:
import comod
[2]:
print(comod.sir.to_wolfram())
<|"system" -> {D[s[t], t] == -\[Beta] i[t] / n s[t],
D[i[t], t] == \[Beta] i[t] / n s[t] - \[Gamma] i[t],
D[r[t], t] == \[Gamma] i[t]},
"states" -> {s[t],i[t],r[t]},
"parameters" -> {\[Beta],\[Gamma]}|>

This code can pasted into Mathematica to carry on the work there.

A Mathematica demo notebook is available online

[ ]: