From: Eric F. <efe...@ph...> - 2008-11-07 12:34:26
|
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 |