A list for the developers of CellML tools

Text archives Help


[cellml-dev] simulating model programmatically


Chronological Thread 
  • From: p.pannarale at gmail.com (Paolo Pannarale)
  • Subject: [cellml-dev] simulating model programmatically
  • Date: Tue, 20 Dec 2011 10:30:01 +0100

Dear Cellml Developers, I'm a PhD student in Bari and I'm developing a Java
application based on the cellmlapi (cellml-sdk-1.10-Win32-MSVC10.
exe, MingW didn't worked, generating a could not load dependent libaries
exception). I need to programmatically solve a model and I got some clue
about how to do it inspecting the opencell source code. I get an exception
(Unexpected exception generating code) when calling
cis.compileModelODE(model) and I guess this is because the api need a c
compiler to compile the code. I tried to adding the following env variables
but this didn't work. Can you pls help me?
BR, thanks, Paolo

CELLML_HOME C:\Program Files (x86)\cellml-sdk-1.10_msvc
PATH C:\Program Files (x86)\OpenCell\gcc\bin;C:\Program Files
(x86)\OpenCell\gcc\libexec\gcc\mingw32\3.4.2;%CELLML_HOME%\lib
LIBRARY_PATH C:\Program Files
(x86)\OpenCell\gcc\lib\gcc\mingw32\3.4.2;C:\Program Files
(x86)\OpenCell\gcc\lib

the code i use is the following (the model is loaded properly, i can do a
getcmetaid(), I use fully instantiate imports, i can simulate the model in
opencell correctly)

System.loadLibrary("java_cis");
cis = cellml_bootstrap.CISBootstrap.createIntegrationService();
Model model = (new ModelLoader(modelfile)).getModel();
ODESolverCompiledModel oscm = cis.compileModelODE(model); >>
Exception (Unexpected exception generating code)
ODESolverRun osr = cis.createODEIntegrationRun(oscm);
osr.setStepType(ODEIntegrationStepType.BDF_IMPLICIT_1_5_SOLVE);
osr.setProgressObserver(this);
double epsAbs=1E-6, epsRel=1E-6, scalVar=1, scalRate=0, maxstep=1,
tabstepsize=0.01, startBvar=0, stopBvar=10, maxDensity=1000;
boolean tabstrict = false;
osr.setStepSizeControl(epsAbs, epsRel, scalVar, scalRate, maxstep);
osr.setTabulationStepControl(tabstepsize, tabstrict);
osr.setResultRange(startBvar, stopBvar, maxDensity);
osr.start();


--
?[M]y work, which I?ve done for a long time, was not pursued in order to
gain the praise I now enjoy, but chiefly from a craving after knowledge,
which I notice resides in me more than in most other men. And
wherewithal, whenever I found out anything remarkable, I have thought it my
duty to put down my discovery on paper, so that all ingenious people might
be informed thereof.?
(van Leeuwenhoek, Letter to the Royal Society, June 12 1716)

?Make it as simple as possible. But not simpler?.
(Albert Einstein)

"The best way to predict the future is to invent it".
(Alan Kay)

___________________________________

Questo documento ? indirizzato esclusivamente al destinatario.
Tutte le informazioni ivi contenute, compresi eventuali allegati,
sono soggette a riservatezza secondo i termini del D.Lgs. 196/2003
in materia di "privacy" e ne ? proibito l'utilizzo da parte di
altri soggetti. Se avesse ricevuto per errore questo messaggio,
La preghiamo cortesemente di contattare il mittente al pi? presto
e di cancellare il messaggio subito dopo. Grazie.
----
This document is exclusively intended for the stated addressee.
All information therein, including any attachment, are reserved
as per Italian D.Lgs. 196/2003 about privacy, and cannot be used
by third parties. In case you received this message by mistake,
please inform the sender and delete the message afterward.
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.cellml.org/pipermail/cellml-tools-developers/attachments/20111220/4c52db3e/attachment.htm>




Archive powered by MHonArc 2.6.18.

Top of page