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

Author:
Tommy Yu <tommy.yu@auckland.ac.nz>
Date:
2015-02-12 19:28:32+13:00
Desc:
Merging to remove the extra head - Since the title is changed and in the interest of maintaining the current structure we keep it as is.
Permanent Source URI:
https://staging.physiomeproject.org/w/matthiaskoenig/MetabolicComponentLibrary/rawfile/e0e2c28e2dfdfe37ea2cae3390a6ae26c28a3393/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);
	}
}