Skip to content

Commit

Permalink
Merge pull request #25 from NeuroML/experimental
Browse files Browse the repository at this point in the history
make TimeDerivative rhs have a per_time dimension
  • Loading branch information
pgleeson authored Jun 18, 2024
2 parents 45741ce + cb2c52d commit ebd7276
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/org/neuroml/importer/sbml/SBMLImporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,11 @@ public static Lems convertSBMLToLEMS(File sbmlFile, float simDuration, float sim
newDim.setN(newDim.getN() + exponent * 1);
} else if (kind.equals("second")) {
newDim.setT(newDim.getT() + exponent * 1);
} else if (kind.equals("volt")) {
newDim.setM(newDim.getM() + exponent * 1);
newDim.setL(newDim.getL() + exponent * 2);
newDim.setT(newDim.getT() + exponent * -3);
newDim.setI(newDim.getI() + exponent * -1);
} else {
//TODO: Add all unit kinds from section 4.4.2 in SBML specs: http://sbml.org/Documents/Specifications
System.err.print("Add more unit definitions! Missing: "+kind);
Expand Down Expand Up @@ -831,7 +836,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 ebd7276

Please sign in to comment.