From: Eric F. <efe...@ph...> - 2008-11-18 14:40:11
|
> -----Original Message----- > From: Rainer Machne [mailto:ra...@tb...] > Sent: 30 October 2008 14:52 > To: Eric Fernandez > Subject: Re: [SOSlib-discuss] equivalent to observablesArray > ?[Scanned] > > The way to interface variables/parameters of the derived ODE > Model is as > follows: > > 1) Get a variableIndex_t from the ODEModel, each by the function > > > variableIndex_t *ODEModel_getVariableIndex (odeModel_t *om, > const char > *symbol) > > To map this from the SBML model, you could set the string in above > function: > symbol = Species_getId(species) > Hi, And for people interested don't forget: you need to free a variable Index structure returned by ODEModel_getVariableIndex() after use using VariableIndex_free(vi) otherwise you'll rapidly run out of memory (if you use it in loops like I did). Therefore: integratorInstance_getValue(engine, ODEModel_getVariableIndex(om, symbol)); is a big no-no! Eric |