Skip to content

Commit

Permalink
- add mca test
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergmann committed Oct 2, 2024
1 parent d552b2b commit f38eaa4
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/react-copasi/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions test/test_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,49 @@ createApi().then((Module) => {
console.log(instance.eigenValuesReduced2D);

});


createApi().then((Module) => {

// instantiate COPASI simulator
var instance = new COPASI(Module);

// check version
console.log('Using COPASI: ', instance.version);

// load a local file using the filesystem
var data = fs.readFileSync(process.argv[2], 'utf8');

// print model structure
console.log(instance.loadModel(data));

var selection = instance.selectionList;
selection.push("EE(J0,S1)")


console.log(selection);
instance.selectionList = selection;

var result = instance.simulateEx(0, 10, 11);
console.log(result);

// compute mca
instance.computeMca(true);

// print control coefficients
console.log("Flux control coefficients: ");
console.log(instance.getFluxControlCoefficients(true));
console.log(instance.getFluxControlCoefficients(false));

console.log("Concentration control coefficients: ");
console.log(instance.getConcentrationControlCoefficients(true));
console.log(instance.getConcentrationControlCoefficients(false));

console.log("Elasticities: ");
console.log(instance.getElasticities(true));
console.log(instance.getElasticities(false));

instance.reset();


});

0 comments on commit f38eaa4

Please sign in to comment.