org.simulator
Class SBMLTestSuiteRunner

java.lang.Object
  extended by org.simulator.SBMLTestSuiteRunner

public class SBMLTestSuiteRunner
extends Object

This class can test the simulation of all models from the SBML test suite.

Since:
1.0
Version:
$$Rev: 396 $$
Author:
Andreas Dräger

Nested Class Summary
static class SBMLTestSuiteRunner.Options
          Commannd-line options for this test program.
 
Constructor Summary
SBMLTestSuiteRunner()
           
 
Method Summary
static String convertAbsoluteFilePathToURI(String path)
           Converts spaces to %20 Converts \ to /
static void main(String[] args)
          Input: directory with models (containing the SBML test suite), first model to be simulated, last model to be simulated, SBMLTestSuiteRunner.Options.all (for testing the models of the test suite with all given integrators) or SBMLTestSuiteRunner.Options.sedml (for testing the models of the test suite using the given SED-ML files) or nothing (for testing the models of the test suite with the RosenbrockSolver solver, should produce only successful tests)
static void statisticForSolvers(String file, int from, int to)
          Computes a statistic for the SBML test suite testing all provided integrators
static MultiTable testModel(AbstractDESSolver solver, Model model, double[] timePoints, double stepSize, Map<String,Boolean> amountHash)
          Tests one specific model
 void testModels()
          Tests the models of the SBML test suite using Rosenbrock as integrator TEST_CASES must be set to the address of the folder "semantic" in the SBML test suite.
static void testRosenbrockSolver(String file, int from, int to)
          Computes a statistic for the SBML test suite using the Rosenbrock solver as integrator
static void testRosenbrockSolverWithSEDML(String file, int from, int to)
          Computes a statistic for the SBML test suite using the Rosenbrock solver as integrator and the SED-ML files
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SBMLTestSuiteRunner

public SBMLTestSuiteRunner()
Method Detail

main

public static void main(String[] args)
                 throws IOException,
                        URISyntaxException
Input:
  1. directory with models (containing the SBML test suite),
  2. first model to be simulated,
  3. last model to be simulated,
  4. SBMLTestSuiteRunner.Options.all (for testing the models of the test suite with all given integrators) or SBMLTestSuiteRunner.Options.sedml (for testing the models of the test suite using the given SED-ML files) or nothing (for testing the models of the test suite with the RosenbrockSolver solver, should produce only successful tests)

Parameters:
args -
Throws:
IOException
URISyntaxException

statisticForSolvers

public static void statisticForSolvers(String file,
                                       int from,
                                       int to)
                                throws FileNotFoundException,
                                       IOException
Computes a statistic for the SBML test suite testing all provided integrators

Parameters:
file -
from -
to -
Throws:
FileNotFoundException
IOException

testRosenbrockSolver

public static void testRosenbrockSolver(String file,
                                        int from,
                                        int to)
                                 throws FileNotFoundException,
                                        IOException,
                                        URISyntaxException
Computes a statistic for the SBML test suite using the Rosenbrock solver as integrator

Parameters:
file -
from -
to -
Throws:
FileNotFoundException
IOException
URISyntaxException

testRosenbrockSolverWithSEDML

public static void testRosenbrockSolverWithSEDML(String file,
                                                 int from,
                                                 int to)
                                          throws FileNotFoundException,
                                                 IOException,
                                                 URISyntaxException
Computes a statistic for the SBML test suite using the Rosenbrock solver as integrator and the SED-ML files

Parameters:
file -
from -
to -
Throws:
FileNotFoundException
IOException
URISyntaxException

testModel

public static MultiTable testModel(AbstractDESSolver solver,
                                   Model model,
                                   double[] timePoints,
                                   double stepSize,
                                   Map<String,Boolean> amountHash)
                            throws SBMLException,
                                   ModelOverdeterminedException,
                                   DerivativeException
Tests one specific model

Parameters:
solver -
model -
timePoints -
stepSize -
amountHash -
Returns:
result
Throws:
SBMLException
ModelOverdeterminedException
DerivativeException

testModels

public void testModels()
                throws FileNotFoundException,
                       IOException
Tests the models of the SBML test suite using Rosenbrock as integrator TEST_CASES must be set to the address of the folder "semantic" in the SBML test suite.

Throws:
FileNotFoundException
IOException

convertAbsoluteFilePathToURI

public static String convertAbsoluteFilePathToURI(String path)

Generated at April 19 2013
Version 1.3 Revision 424