Hi all, Is it possible to handle events in odeint, e. g. http://books.google.de/books?id=UX61pYtpI40C&pg=PA254&lpg=PA254&dq=st%C3%BCckweise+linear+Federkennlinie&source=web&ots=uUtyb7iGiV&sig=uOk54Yk-K3myoMMzJVK9wtP6G8g&hl=de&sa=X&oi=book_result&resnum=3&ct=result page 256 Nils
Is it possible to handle events in odeint, e. g.
No, I believe not. But my VODE wrapper has good event detection, although then you have to specify your problem with PyDSTool. Actually, I've made a few improvements and fixes in the current branched SVN version of PyDSTool, available at http://www.cam.cornell.edu/svn/PyDSTool/branches/robmods/ It will be released in the next week or so on Sourceforge. -Rob
On Mon, 3 Nov 2008 13:05:22 -0400 "Rob Clewley" <rob.clewley@gmail.com> wrote:
Is it possible to handle events in odeint, e. g.
No, I believe not. But my VODE wrapper has good event detection, although then you have to specify your problem with PyDSTool. Actually, I've made a few improvements and fixes in the current branched SVN version of PyDSTool, available at http://www.cam.cornell.edu/svn/PyDSTool/branches/robmods/
It will be released in the next week or so on Sourceforge.
-Rob _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
Thank you for your prompt response. Is there an example illustrating the handling of events ? Nils
Hi Nils,
Thank you for your prompt response.
sorry this new reply was a lot less prompt. I was making sure a small bug was fixed in exactly this code before I mentioned it again.
Is there an example illustrating the handling of events ?
In the previously-mentioned SVN's new file vode_event_test1.py, you can see an example where an integration-terminating event is defined like this ev_args_term = {'name': 'threshold', 'eventtol': 1e-4, 'eventdelay': 1e-5, 'starttime': 0, 'active': True, 'term': True, 'precise': True} thresh_ev_term = Events.makeZeroCrossEvent('w-p_thresh', -1, ev_args_term, varnames=['w'], parnames=['p_thresh']) This creates a threshold event that triggers when the ODE variable w *decreases* through the value p_thresh. For details, including how this is related to the ODE definition, see the PyDSTool wiki page Events and the SVN file. After integration of the ODE, you might do this:
term_evs_found = testODE.getEvents()['threshold'] term_evs_found.info() Pointset <no name> (parameterized) Independent variable: t: [ 2.3469947] Coordinates: w: [-0.25000045] Labels by index: Empty
-Rob
On Monday 03 November 2008 19:05:22 Rob Clewley wrote:
Is it possible to handle events in odeint, e. g.
No, I believe not. But my VODE wrapper has good event detection, although then you have to specify your problem with PyDSTool. Actually, I've made a few improvements and fixes in the current branched SVN version of PyDSTool, available at http://www.cam.cornell.edu/svn/PyDSTool/branches/robmods/
Another option is to use CVODE via PySundials (http://pysundials.sourceforge.net/). Brett
On Tue, 4 Nov 2008 12:37:46 +0200 Brett Olivier <bgoli@sun.ac.za> wrote:
On Monday 03 November 2008 19:05:22 Rob Clewley wrote:
Is it possible to handle events in odeint, e. g.
No, I believe not. But my VODE wrapper has good event detection, although then you have to specify your problem with PyDSTool. Actually, I've made a few improvements and fixes in the current branched SVN version of PyDSTool, available at http://www.cam.cornell.edu/svn/PyDSTool/branches/robmods/
Another option is to use CVODE via PySundials (http://pysundials.sourceforge.net/).
Brett
Hi Brett, Thank you for your reply. I have installed pysundials. Unfortunately, I am not familiar with CVODE. Therefore, a small example how to deal with events within cvode would be appreciated. Thanks in advance Nils
participants (3)
-
Brett Olivier
-
Nils Wagner
-
Rob Clewley