-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
126b0f6
commit efef3c1
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# ------------------------------------------------------------------------------------- | ||
# Autogenerated ODE definition from SBML file with sbmlutils | ||
# (https://github.com/matthiaskoenig/sbmlutils). | ||
# | ||
# model: {{ model.getId() }} | ||
# ------------------------------------------------------------------------------------- | ||
|
||
module {{ model.getId() }} | ||
export p, x0, f_dxdt, xids, pids, yids | ||
|
||
# ids | ||
xids = [{% for id in xids %}"{{ id }}"{% if not loop.last %}, {% endif %}{% endfor %}] | ||
pids = [{% for id in pids %}"{{ id }}"{% if not loop.last %}, {% endif %}{% endfor %}] | ||
|
||
# initial conditions | ||
x0 = [ | ||
{% for id in xids %} | ||
{{ x0[id] }}{% if not loop.last %},{% endif %} # x0[{{ loop.index }}] {{ id }} | ||
{% endfor %} | ||
] | ||
|
||
# parameters | ||
p = [ | ||
{% for id in pids %} | ||
{{ p[id] }}{% if not loop.last %},{% endif %} # p[{{ loop.index }}] {{ id }} | ||
{% endfor %} | ||
] | ||
|
||
# odes | ||
function f_dxdt(dx, x, p, t) | ||
{% for id in yids %} | ||
{{ id }} = {{ y[id] }} # y[{{ loop.index }}] {{ id }} | ||
{% endfor %} | ||
|
||
{% for id in xids %} | ||
dx[{{loop.index}}] = {{ dx[id] }} # dx[{{ loop.index }}] {{ id }} | ||
{% endfor %} | ||
|
||
end | ||
|
||
end |