pydstool-users Mailing List for PyDSTool (Page 2)
Status: Beta
Brought to you by:
robclewley
You can subscribe to this list here.
2007 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2011 |
Jan
(3) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(10) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(2) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2015 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Rob C. <rob...@gm...> - 2011-04-13 16:25:51
|
Guilherme, FYI I replied to your forum post through the forum. Hope it helps. -Rob -- Robert Clewley, Ph.D. Assistant Professor Neuroscience Institute and Department of Mathematics and Statistics Georgia State University PO Box 5030 Atlanta, GA 30302, USA tel: 404-413-6420 fax: 404-413-5446 http://www2.gsu.edu/~matrhc http://neuroscience.gsu.edu/rclewley.html |
From: Guilherme B. T. <gui...@gm...> - 2011-04-10 21:02:10
|
Dear Robert, I not being able to exercise the PyCont_vanDerPol.py example I am under OpenSUSE linux (64bit). Python 2.6.2, Numpy 1.5.1, Scipy 0.8.0, Swig 1.3.36, gcc 4.5 I initially had some problems to run the Dopri, Radau and PyCont examples. Problems went away after removing the -m32 (on Generators and ContClass) and installing the development package for Numpy (otherwise it complains about Numarray headers). There is also a TK backed problem with my Matplotlib on SLIP_2D_maps.py. I will look into more detail. This is the vanDerPol problem (error messages): ====================== > python PyCont_vanDerPol.py .... UD1: Integrating backward... Found initial point on curve. Beginning continuation... ... Lost canard! Error: <type 'exceptions.KeyError'> : message: 'UD' done! .... UD1: Integrating forward... Found initial point on curve. Beginning continuation... Lost canard! done! Traceback (most recent call last): File "PyCont_vanDerPol.py", line 368, in <module> plot_cycles(C, 'UD1') File "PyCont_vanDerPol.py", line 274, in plot_cycles if pt.labels['UD']['data'].has_key('cycle'): KeyError: 'UD' ======================== Any idea of how can I fix it? What is the current development status of the PyDSTool? I see you still commit changes to the code and reply to the list/forum. Are there other developers/daily users? Where can I find more documentation besides the code? I saw a thread on Gmane regarding the solvers and integration on Scipy. Are there any advances on this direction? What about collaborating with Sage? I am asking all this questions because I am really interested on learning / using PyDSTool to study nonlinear dynamical systems. I recently started a PhD related to nonlinear micro electromechanical systems and I am looking for tools and solvers to model and simulate such devices. Best regards, Guilherme Torri |
From: Rob C. <rob...@gm...> - 2011-01-24 20:27:51
|
Hi Achim, > > How can I deal with matrices in the system of equations? I need to work with > such systems often in future as this is the form I get after applying the > Galerking decomposition to continuum-mechanical dynamic systesm. > > Thanks for your help! > Achim I'm afraid the software is somewhat limited in this respect. Matrix equations have to unwrapped into a set of 1D equations in scalar variables only, i.e. you must pre-multiply out the RHS vector expressions and extract each component of the result to the RHS of a 1D scalar variable. As well as the usual Maple or Sage, the excellent SymPy package should be able to help you perform the symbolic matrix multiplications, from which you could copy and paste strings into your PyDSTool specs. In addition, provided you have the Radau integrator working, you may integrate systems that have a LHS "mass matrix," which can have time and state dependence. I.e. this will let you solve more general ODEs and DAEs M(x,t) dx/dt = F(x,t) that cannot be written in a normal form dx / dt = f(x, t), where x is a vector, because of the potential non-invertability of M. For an example, see the demonstration in tests/freefinger_noforce_radau.py, which implements a "finger" model as an inverted, damped triple pendulum. Currently, the syntax for this is clunky, and if anyone would like to contribute the code to provide better syntactic sugar for this feature I would include it! Best, Rob -- Robert Clewley, Ph.D. Assistant Professor Neuroscience Institute and Department of Mathematics and Statistics Georgia State University PO Box 5030 Atlanta, GA 30302, USA tel: 404-413-6420 fax: 404-413-5446 http://www2.gsu.edu/~matrhc http://neuroscience.gsu.edu/rclewley.html |
From: Rob C. <rob...@gm...> - 2011-01-24 20:05:58
|
Hi list members, As you may have noticed, last year the PyDSTool wiki server crashed at my former place of employment, Cornell University. For various administrative and technical reasons that I do not properly understand, all the data was irretrievably lost. I have only a less recent backup of the entire Wiki, which is probably a year or more old. Although that covers almost all of the pages, there were many minor but important edits in many pages that I have no record or memory of. It occurred to me to ask the users list in case anyone made a copy of the wiki for their own use offline in the past 12 months. If you have and wouldn't mind zipping up the files to send to me, I would be most grateful. They can even be in html or PDF format, if that's all you have. Also, I hope to put out another bug fix release in the near future. My research and teaching duties make my support for this software less rigorous and occasionally less careful than I would prefer. (I am the only active maintainer.) This has become harder since the entire SVN repository records were also lost in the Cornell server crash, and I have not yet had the time to commit to a new version control system and implement it. Thank you for bearing with me while I fix some of the silly mistakes that have crept in while trying to fix other inter-related features! I do appreciate when you offer suggestions for fixing issues that arise, as that helps me respond to them more rapidly. Regards, Rob -- Robert Clewley, Ph.D. Assistant Professor Neuroscience Institute and Department of Mathematics and Statistics Georgia State University PO Box 5030 Atlanta, GA 30302, USA tel: 404-413-6420 fax: 404-413-5446 http://www2.gsu.edu/~matrhc http://neuroscience.gsu.edu/rclewley.html |
From: Achim A. <ach...@go...> - 2011-01-12 06:29:19
|
Hi Happy new year every one! I'm new to continuation and trying to get my head around things at the moment. I've got the following system of equation: $$ \left( \begin{array}{c} \dot{s}\\ \dot{v} \end{array} \right) = \left( \begin{array}{c} v\\ -\mathbf{B}^{-1} \mathbf{A} s + V_{DC} \mathbf{B}^{-1} \mathbf{C} s \end{array} \right) $$ where A B and C are square matrices of dimension (nxn), s and v are vectors of length n and V_DC is a scalar. I tried to enter this system of equations and solve it with pyDSTool but got; 'TypeError: only length-1 arrays can be converted to Python scalars'. Here's the code: > #!/usr/bin/python > # encoding=utf8 > > import PyDSTool as DS > import numpy as np > > AA = np.matrix([[127.717469865, 2.05025780562], > [0.0521863096197, 2605.29996274]]) > BB = np.matrix([[1.65676839951e-10, 6.76971107431e-14], > [6.76971107431e-14, 8.60513163289e-11]]) > CC = np.matrix([[-5.91089367427436, 58.2428565496970], > [-9.30459729674465, 47.6048481884652]]) > > > DSargs = DS.args(name='Hopf') > > # parameters > DSargs.pars = { > 'A': AA, > 'B': BB, > 'B_I': BB.I, > 'C': CC, > 'V_DC': 0 > } > > # auxiliary helper function(s) > DSargs.fnspecs = { > 'ss': (['s'], 'sum(s)'), > 'vv': (['v'], 'sum(v)') > } > > # rhs of the differential equation > DSargs.varspecs = { > 's': 'v', > 'v': '-B_I*A*s + V_DC*B_I*C*s' > } > > # initial conditions > DSargs.ics = { > 's': np.matrix([0,0]), > 'v': np.matrix([0,0]) > } > > DSargs.info() > > ode = DS.Generator.Vode_ODEsystem(DSargs) > > # Set up continuation class > PyCont = DS.ContClass(ode) > > PCargs = DS.args(name='EQ1', type='EP-C') > PCargs.freepars = ['V_DC'] > PCargs.MaxNumPoints = 400 > PCargs.StepSize = 0.1 > PCargs.LocBifPoints = ['all'] > PCargs.SaveEigen = True > How can I deal with matrices in the system of equations? I need to work with such systems often in future as this is the form I get after applying the Galerking decomposition to continuum-mechanical dynamic systesm. Thanks for your help! Achim ps: Thanks for another awesome open-source tool! |
From: Rob C. <rob...@gm...> - 2009-12-22 00:45:58
|
Dear User list, I have recently pushed the most up-to-date SVN version of PyDSTool to the general release v0.88. It is primarily a bug fix and python/library version compatibility release in the run-up to some major changes in PyDSTool version 0.90. So there are few major new features, but many Toolbox improvements. Here are some details: * New numeric_to_traj and pointset_to_traj utility functions * Major improvements to intelligent expr2func (symbolic -> python function conversion) * Cleanup of global imports, especially: entire numpy.random and linalg namespaces no longer imported by default * Added support for 'min' and 'max' keywords in functional specifications (for ODE right-hand sides, for instance) * Optimization tools from third-party genericOpt included - improved parameter estimation examples * Numerical phase-response calculations now possible in PRC toolbox * Fully-fledged DSSRT toolbox (see wiki page) * New tests/demonstrations in PyDSTool/tests * Improved compatibility with cross-platform use and with recent python versions and associated libraries * Added many minor features (see timeline on Trac http://jay.cam.cornell.edu/pydstool/timeline) * Fixed many minor bugs (see timeline on Trac http://jay.cam.cornell.edu/pydstool/timeline) Please let me know if you find any bugs or unexpected quirks. We are still working on a one-stop installer and a better method for compiling C- and Fortran-based RHS functions for version 0.90, but this is requiring a major refactoring. Happy Holidays, Rob -- Robert Clewley, Ph.D. Assistant Professor Neuroscience Institute and Department of Mathematics and Statistics Georgia State University 720 COE, 30 Pryor St Atlanta, GA 30303, USA tel: 404-413-6420 fax: 404-413-6403 http://www2.gsu.edu/~matrhc |
From: <fre...@gm...> - 2008-05-20 14:21:05
|
Hya, currently investigateing PyDSTool to solve some DAEs. I tried to implement an easy electric circuit with a capacitor discharging through a non-linear resistor. (I know that this system could be reduced to one ODEs but I'm practising.) Below the code for PyDSTool and also for matlab. Both work for a linear resistor, but PyDSTools ceases to work for even tiny non-linearities whereas matlab works fine. where am I going wrong? Any options I need to set? Thanks for the help mauro -------------------------------------------- #! /usr/local/bin/python """Simple example of solving a differential-algebraic equation. A capacitor and non-linear resistor in series. Resistor: - delta_v = R*I^non_lin*sign(I) Capacitor: I = C * d(delta_v)/dt for non_lin=1 has solution: delta_v = exp(t/(-RC)) * delta_v_0 I = -1/R( exp(t/(-RC)) * delta_v_0) """ from PyDSTool import * DSargs = args() # parameters R = 80. # resistance C = 1e-3 # capcitance non_lin = 1.01 # non linearity DSargs['pars'] = {'R': R, 'C': C, 'non_lin': non_lin} # IC: making sure they satisfy the algebraic constraint delta_v_0 = 100 I_0 = -sign(delta_v_0)*(delta_v_0/R)**(1./non_lin) DSargs['ics'] = {'I': I_0, 'delta_v': delta_v_0} # eqn. definition DSargs['varspecs'] = {'I': 'I*R*pow(abs(I),non_lin-1) + delta_v', 'delta_v': 'I/C'} DSargs['fnspecs'] = {'massMatrix': (['t','I','delta_v'], '[[0,0],[0,1]]')} DSargs['vars'] = ['I', 'delta_v'] # numerical parameters DSargs['algparams'] = {'init_step': 0.0005, 'max_step': 0.1, 'rtol': 1e-9, 'atol': 1e-9, 'max_pts': 1000000} DSargs['checklevel'] = 1 DSargs['name'] = 'DAE_nonlin_resistance_capacitor' dae = Generator.Radau_ODEsystem(DSargs) dae.set(tdata=[0, 1]) traj = dae.compute('nonlin') pd = traj.sample(dt=0.05) # exact solutions for non_lin=1 I = lambda t : -1/R*( exp(t/(-R*C)) * delta_v_0) delta_v = lambda t : exp(t/(-R*C)) * delta_v_0 figure() plot(pd['t'], pd['I']) hold(True) plot(pd['t'], I(pd['t']), 'bd') twinx() plot(pd['t'], pd['delta_v'], 'g') plot(pd['t'], delta_v(pd['t']), 'gd') show() ---------------------------------------------------- function [t,out] = resitor_capacitor(); % to integrate the system of DAE arrising from a non % linear resistor in series with a capacitor plot_yes = 1; R = 80; C = 1e-3; non_lin = 1.01; %IC delta_v_0 = 100 I_0 = -sign(delta_v_0)*(delta_v_0/R)^(1/non_lin) ic = [I_0 delta_v_0]'; tspan = [0 1]'; % integration time M = diag([0 1]); % mass matrix opts = odeset('Mass',M,'MassSingular','yes', ... 'stats','on','MStateDependence','none'); [t,out] = ode15s(@int_fun,tspan,ic,opts); if plot_yes == 1 figure subplot(211) plot(t, out(:,1)) subplot(212) plot(t, out(:,2),'g') end % function to be integrated: function out = int_fun(t,in) % assign variables for convinience I = in(1); delta_v = in(2); % do the maths: out(1) = I*R*(abs(I))^(non_lin-1) + delta_v; out(2) = I/C; out = out'; end end -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx |
From: Rob C. <rh...@co...> - 2007-07-12 02:52:28
|
Hi, There are lots of minor improvements and fixes in this version, but a major feature is the support for user-defined functions for continuation using PyCont. Also added: some basic phase-plane tools, calculation of phase response curves for oscillators and support for some special math functions. A summary of changes is below. Thanks! Rob, Erik, and Drew. Summary of changes ----------------------------- * PyCont can now perform continuation according to the zeros of user-defined functions or bounds (see example tests/PyCont_vanDerPol.py and PyCont_Hopfield.py) * Support for scipy.special functions in Generator definitions (Python targets only. C targets with a more limited range of functions will be supported soon) * A few phase plane analysis tools have been added to Toolbox/phaseplane.py -- in particular, the finding of fixed points, nullclines, and some simple code to compute saddle manifolds in planar systems * Phase response curves can now be calculated for limit cycles using the adjoint method (see tests/ML_adjointPRC.py and HH_adjointPRC.py for examples) * Generators now include auxiliary variable data in recorded event data * Pointset comparisons using arithmetic operators now consistent with the norm-based comparisons used by Points * Time mesh points for external inputs to integrators now forced to be integration mesh points for greater numerical accuracy and stability * VODE now supports 'use_special' for forcing values of output trajectory mesh * Improved support for numpy float and int types alongside standard python types * Improved numerical first derivative computed by central finite differences and Ridders' method * Added a multilinear regression auxiliary function builder (common.py/makeMultilinearRegrFn) * Support for parameter estimation using least squares using qualitative features such as positions of extrema (see wiki page ParamEst) * Moved ParamEst.py into PyDSTool/Toolbox, a more logical home, and removed its default import in PyDSTool * Added Toolbox/ModelHelper.py for additional model building utilities (esp. for neural modelling) * Minor bug fixes and improvements (see Trac wiki site for full change log) |
From: Nils W. <nw...@ia...> - 2007-02-21 12:18:05
|
Hi there, How can I fix this problem ? python -i PyCont_Hamiltonian.py Traceback (most recent call last): File "PyCont_Hamiltonian.py", line 13, in ? from PyDSTool import * File "/usr/lib64/python2.4/site-packages/PyDSTool/__init__.py", line 60, in ? scipy_vernums = [int(n) for n in scipyverstr.replace('_','.').split('.')] ValueError: invalid literal for int(): dev2725 Nils |
From: Nils W. <nw...@me...> - 2007-02-21 09:05:03
|
Hi there, Is there a way to get PyDSTool via cvs ? I cannot find any module at http://pydstool.cvs.sourceforge.net/pydstool/ Am I missing something ? Nils |