@@ -314,6 +314,11 @@ public static Lems convertSBMLToLEMS(File sbmlFile, float simDuration, float sim
314314 newDim .setN (newDim .getN () + exponent * 1 );
315315 } else if (kind .equals ("second" )) {
316316 newDim .setT (newDim .getT () + exponent * 1 );
317+ } else if (kind .equals ("volt" )) {
318+ newDim .setM (newDim .getM () + exponent * 1 );
319+ newDim .setL (newDim .getL () + exponent * 2 );
320+ newDim .setT (newDim .getT () + exponent * -3 );
321+ newDim .setI (newDim .getI () + exponent * -1 );
317322 } else {
318323 //TODO: Add all unit kinds from section 4.4.2 in SBML specs: http://sbml.org/Documents/Specifications
319324 System .err .print ("Add more unit definitions! Missing: " +kind );
@@ -831,7 +836,7 @@ else if (r.isAssignment()) {
831836 E .info (">>>> StateVariable " +sv );
832837 dyn .stateVariables .add (sv );
833838
834- TimeDerivative td = new TimeDerivative (sv .getName (), " 1" );
839+ TimeDerivative td = new TimeDerivative (sv .getName (), timeScale . getName () + "* 1" );
835840 dyn .timeDerivatives .add (td );
836841 }
837842
@@ -1209,7 +1214,7 @@ public static void main(String[] args) throws Exception
12091214
12101215
12111216
1212- File sbmlTestSuiteDir = new File ("sbmlTestSuite /cases/semantic/" );
1217+ File sbmlTestSuiteDir = new File ("sbml-test-suite /cases/semantic/" );
12131218
12141219 boolean useSbmlTestSuite = sbmlTestSuiteDir .exists () && forceSBMLTestSuite ;
12151220
@@ -1292,7 +1297,7 @@ public static void main(String[] args) throws Exception
12921297 while (testCase .length ()<5 ) testCase ="0" +testCase ;
12931298
12941299
1295- sbmlFile = new File ("sbmlTestSuite /cases/semantic/" +testCase +"/" +testCase +"-sbml-" +version +".xml" );
1300+ sbmlFile = new File ("sbml-test-suite /cases/semantic/" +testCase +"/" +testCase +"-sbml-" +version +".xml" );
12961301 if (!sbmlFile .exists ()){
12971302 E .info (" ---- File not found: " +sbmlFile .getAbsolutePath ()+"!! ---- \n \n " );
12981303 notFound ++;
0 commit comments