From: Rainer M. <ra...@tb...> - 2008-11-17 01:44:45
|
Hi Eric, sorry for the late reply, I have just moved to Japan for a year. On Sat, 8 Nov 2008, Eric Fernandez wrote: > > Hi, > > I reply to myself regarding the usage of setVariableValue() : indeed it >works as intended. However, I get the same problems than with >copyVariableState(): when the integration is solved with a Jacobian >matrix, I get a convergence test error as soon as I do the first >integration step. I wonder why there is a problem, shouldn't an >integrator >instance behave normally if the initial conditions are changed? I guess, I should have a look at copyVariableState, if it still works as intended after all the changes made. However, I think the situation you described can happen. The new initial conditions might put the system close to some hard-to-solve stiff state, and a running solver might have it's internal time steps etc. already set-up for this situation, while a newly starting solver has problems with the same conditions. Maybe you could try to play with the error tolerances and printstep size? But you are right, the CVodeReInit caused by events should have the same or similar effects on an already running itnegrator. Are there any news regarding this problem? Rainer > > > Eric > > > -----Original Message----- > From: Eric Fernandez [mailto:efe...@ph...] > Sent: Fri 11/7/2008 12:36 PM > To: sbm...@li... > Subject: [SOSlib-discuss] copyVariableState() and setVariableValue() issues[Scanned] > > Hi, > > I am wondering if there are not issues with copyVariableState(), > probably I do not use it correctly. > > I am trying to run a model (very large and complex, using many events) > for a couple of steps, and then want to transfer the species values to a > new, fresh integrator instance, and run again using the final variable > state of the first integrator instance as the initial conditions of the > second integrator instance. (That is to simulate a checkpoint.) > > First method I use is copyVariableState(). The problem is that very > often I get convergence test errors and other weird stuff (some species > becoming negative) that happen for particular values of the steps used > in the first instance. Some step values work like a charm, some others > lead to these issues. Am I doing this wrong ? > > The second method, was to dump all the species names/values at the end > of the first instance integration in an array. Then I create a second > integrator instance and use a loop over my array to initialise all > corresponding values, using setVariableValue(). The really weird stuff > here, is that when I start again the integrator, it is as if it were > reset: it uses the initial conditions of the model, not the one set with > setVariableValue(). Is it normal ? Or do I make something wrong here ? > > Thanks for the help, > Eric > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > sbmlsolver-discuss mailing list > sbm...@li... > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-discuss > > > |