Location: Metabolic Component Library @ 2ac29dd97e92 / CellML-source / CellMLTools / testcase / CISIntegratorTest.java

Author:
Matthias K?nig <matthias.koenig@charite.de>
Date:
2013-05-17 20:14:36+02:00
Desc:
Further work on the HTML documentation.
Permanent Source URI:
https://models.cellml.org/w/matthiaskoenig/MetabolicComponentLibrary/rawfile/2ac29dd97e9204b8c5de02fa2ddf416afdd997e4/CellML-source/CellMLTools/testcase/CISIntegratorTest.java

package componentlibrary;

import tools.CellMLReader;
import cellml_api.CellMLBootstrap;
import cellml_api.Model;
import cellml_services.CellMLIntegrationService;
import cellml_services.DAESolverCompiledModel;
import cellml_services.ODESolverCompiledModel;

public class CISIntegratorTest {
	public static void main(String args[]){
		// Load Model
		System.loadLibrary("java_cellml");
	    CellMLBootstrap bootstrap =  cellml_bootstrap.CellMLBootstrap.createCellMLBootstrap();
		Model model = CellMLReader.loadFromURL(bootstrap, "MassActionBiBiRev.cellml");
		
		// Compile Model
		System.out.println("# Compiling ODE model ...");
		
		System.loadLibrary("java_cis");
		System.out.println("# Creating integration service...");
		CellMLIntegrationService cis = cellml_bootstrap.CISBootstrap.createIntegrationService();
		ODESolverCompiledModel ccm = cis.compileModelODE(model);
		//DAESolverCompiledModel ccm = cis.compileModelDAE(model);
	}
}