File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
org.insilico.vissim.sbscl/src/org/insilico/vissim/sbscl/simulation Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 6
6
import org .insilico .vissim .sbscl .utils .SBSCLUtils ;
7
7
import org .sbml .jsbml .Model ;
8
8
import org .sbml .jsbml .SBMLReader ;
9
+ import org .sbml .jsbml .UnitDefinition ;
9
10
import org .simulator .math .odes .AbstractDESSolver ;
10
11
import org .simulator .math .odes .MultiTable ;
11
12
import org .simulator .sbml .SBMLinterpreter ;
@@ -24,17 +25,18 @@ public SimulationResult simulate(String path) throws Exception {
24
25
SBMLReader reader = new SBMLReader ();
25
26
SimulationResult result = null ;
26
27
Model model = reader .readSBML (path ).getModel ();
28
+ UnitDefinition timeUnitsInstance = model .getTimeUnitsInstance ();
29
+
27
30
SBMLinterpreter interpreter = new SBMLinterpreter (model );
28
31
SBMLDialog sbmlDialog = new SBMLDialog ();
29
32
sbmlDialog .initDialog ();
30
33
AbstractDESSolver solver = getSolver (SBMLDialog .getSolverType ());
31
34
if (SBMLDialog .isCanceled () || solver == null ) {
32
35
throw new Exception ();
33
- // TODO: Cancel scenario
34
36
}
35
37
double [] tp = getTimePoints (sbmlDialog );
36
38
MultiTable solution = solver .solve (interpreter , interpreter .getInitialValues (), tp );
37
- result = new ResultAdapter (solution ).getResult ();
39
+ result = new ResultAdapter (solution , timeUnitsInstance . getName () ).getResult ();
38
40
return result ;
39
41
}
40
42
You can’t perform that action at this time.
0 commit comments