Skip to content

Commit

Permalink
fix(sbml-import): make TimeDerivative rhs have a per_time dimension
Browse files Browse the repository at this point in the history
Otherwise we end up with dimensionally incorrect values:

```
<TimeDerivative variable="time" value="1"/>
```

It'll now be:

```
<TimeDerivative variable="time" value="tscale * 1"/>
```

where `tscale` has dimensions `per_time`.
  • Loading branch information
sanjayankur31 committed Jun 14, 2024
1 parent 45741ce commit b79aecf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/neuroml/importer/sbml/SBMLImporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ else if (r.isAssignment()) {
E.info(">>>> StateVariable "+sv);
dyn.stateVariables.add(sv);

TimeDerivative td = new TimeDerivative(sv.getName(), "1");
TimeDerivative td = new TimeDerivative(sv.getName(), timeScale.getName() + "* 1");
dyn.timeDerivatives.add(td);
}

Expand Down

0 comments on commit b79aecf

Please sign in to comment.