A list for the developers of CellML tools

Text archives Help


[cellml-dev] [Fwd: Re: [SOSlib-discuss] Identifying algebraic parts of DAE system]


Chronological Thread 
  • From: r.britten at auckland.ac.nz (Randall Britten)
  • Subject: [cellml-dev] [Fwd: Re: [SOSlib-discuss] Identifying algebraic parts of DAE system]
  • Date: Fri, 12 Sep 2008 02:28:36 +1200

Hi

I promised a CellML example the illustrated how the algebraic solves that
were separable were handled.

Attached is such a model, and the c code generated for it.
As you can see, ComputeRates calls rootfind_0 to solve for c and d, and
rootfind_1 to solve for f and g. We think that this illustrates the
potential advantage that this approach will have over IDA, since IDA would
require a 6x6 Jacobian for this example, whereas essentially there are now 3
Jacobians that are 2x2 i.e. this approach takes advantage of the bandedness
of the Jacobian. ComputeRates is then essentially used to solve for x and y.

It seems there are other reasons to prefer this approach over IDA, but we are
still working quite hard on getting a grasp on the issues, and perhaps there
is a class of DAEs that IDA handles that this approach might not. A very raw
view of this assessment work is visible at
https://tracker.physiomeproject.org/show_bug.cgi?id=417.

One way of getting the bandedness into IDA would be to generate code for
evaluating the Jacobian, that does not use finite difference estimates for
Jacobian components where the relevant residual component does not depend on
respective state variables. This would almost be a hybrid of the IDA
approach and the decoupled approach.

Regards,
Randall


> -----Original Message-----
> From: Rainer Machne [mailto:raim at tbi.univie.ac.at]
> Sent: Friday, 12 September 2008 1:36 a.m.
> To: Randall Britten
> Cc: 'James Lu'; 'Stefan Mueller'; 'Christoph Flamm'
> Subject: Re: [Fwd: Re: [SOSlib-discuss] Identifying algebraic parts of
> DAE system]
>
> Randall Britten wrote:
> > Hi
> >
> > Sounds like an idea worth exploring. Would you mind if I forwarded
> this idea to the public mailing list for cellml developers?
>
> Sure, please forward it. I am subscribed to "cellml-discussion", do you
> mean this list?
>
> Rainer
>
> >
> > Regards,
> > Randall
> >
> >> -----Original Message-----
> >> From: Rainer Machne [mailto:raim at tbi.univie.ac.at]
> >> Sent: Thursday, 11 September 2008 2:59 a.m.
> >> To: r.britten at auckland.ac.nz
> >> Cc: James Lu; Stefan Mueller; Christoph Flamm
> >> Subject: [Fwd: Re: [SOSlib-discuss] Identifying algebraic parts of
> DAE
> >> system]
> >>
> >> Hi Randall,
> >>
> >> Thanks for the information, we will certainly have a look at this
> code!
> >>
> >> A general note, since you have been looking at the SOSlib
> documentation
> >> (which is quite out-of-date with respect to current CVS version, btw).
> >>
> >> SOSlib is build quite modular, and actually can be used as a general
> ODE
> >> Solver, independent of SBML (but not libSBML whose formula
> >> representation as an abstract syntax tree is used throughout SOSlib).
> We
> >> currently have e.g. functions that allow to set up an ODE model from
> the
> >> ODEs in infix text description.
> >>
> >> So without the SBML->ODE construction part, it is merely a wrapper
> >> around SUNDIALS solvers to be used for any ODE model. We think, that
> we
> >> make quite efficient use of Sundials, and in the CVS version (soon to
> be
> >> released) we have e.g. our own custom-made internal compiler for
> >> equations. We also interface Sundials forward and adjoint sensitivity
> >> tools, which are quite handy for parameter identification strategies.
> >>
> >> It would be straightforward and probably quite easy to hook it up
> >> with CellML. I guess the CellML API allows to generate ODEs from a
> >> CellML model? Via libSBML's MathML or string-based equation
> interfaces,
> >> it could in the best case be just a matter of a few
> >> hours to link SOSlib to CellML API, generate ODEs with the CellML
> tool,
> >> and then generate SOSlib's internal ODE structures. From this point,
> all
> >> capabilities of SOSlib would be open for use with CellML.
> >>
> >> Would there be any interest from your side? We would be happy to help,
> >> or even support a CellML interface officially. It could work both
> ways,
> >> interface SOSlib from CellML API to provide simulation results
> >> (including sensitivities etc.), or CellML API from SOSlib to generate
> >> ODEs from a CellML model.
> >>
> >> Rainer
> >>
> >>
> >> Randall Britten wrote:
> >>> A simple example is the DAE:
> >>
> http://svnviewer.bioeng.auckland.ac.nz/projects/physiome/browser/CellML_
> >> DOM_API/trunk/tests/test_xml/SimpleDAE_NonLinear.xml?rev=2344
> >>> And the code generated for it:
> >>>
> >>
> http://svnviewer.bioeng.auckland.ac.nz/projects/physiome/browser/CellML_
> >> DOM_API/trunk/tests/test_expected/SimpleDAE_NonLinear.c?rev=2344
> >>> Currently, we are trying an experimental approach where we use just
> an
> >> ODE solver, and solve the algebraic subsystems in a "decoupled"
> manner.
> >>> This is illustrated in the generated code above
> >> (SimpleDAE_NonLinear.c):
> >>> Line 71 is the function used by the ODE solver to compute the rates.
> >> But it calls a separate algebraic non-linear solver (line 73) to
> solve
> >> the decoupled algebraic part. Note that this example only has one
> >> decoupled algebraic subsystem, but the code generation service looks
> for
> >> any number of these, it just so happens that this example has only
> one.
> >>> I'll find another example if you like that illustrates having more
> >> than one subsystem.
> >>> But it is late here now, so hopefully you don't mind waiting till
> >> Friday for that one.
> >>> Note that we are still not convinced that this is a numerically
> >> reliable way to do this, and are considering using IDA.
> >>> Regards,
> >>> Randall
> >>>
> >>>> -----Original Message-----
> >>>> From: James Lu [mailto:james.lu at oeaw.ac.at]
> >>>> Sent: Thursday, 4 September 2008 11:12 p.m.
> >>>> To: Randall Britten
> >>>> Cc: Rainer Machne
> >>>> Subject: Re: [SOSlib-discuss] Identifying algebraic parts of DAE
> >> system
> >>>> On Thursday 04 September 2008 06:45, you wrote:
> >>>>> Hi
> >>>>>
> >>>>>
> >>>>>
> >>>>> Andrew Miller has created code for decomposing a system of DAE's
> >> into
> >>>>> possibly many algebraic subsystems and one differential system,
> >> which
> >>>> can
> >>>>> then be solved in a decoupled manner.
> >>>> hi Randall:
> >>>>
> >>>> That sounds interesting. Might you have a small example
> illustrating
> >>>> what the
> >>>> code does?
> >>>>
> >>>> Best,
> >>>>
> >>>> James
> >
> >

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SimpleDAE_NonLinear2.cellml
Type: application/octet-stream
Size: 3858 bytes
Desc: not available
URL:
<http://www.cellml.org/pipermail/cellml-tools-developers/attachments/20080912/699e0d24/attachment-0001.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: SimpleDAE_NonLinear2.c
URL:
<http://www.cellml.org/pipermail/cellml-tools-developers/attachments/20080912/699e0d24/attachment-0001.diff>



  • [cellml-dev] [Fwd: Re: [SOSlib-discuss] Identifying algebraic parts of DAE system], Randall Britten, 09/12/2008

Archive powered by MHonArc 2.6.18.

Top of page