Beginner: Setting up PyCont for bifurcation of ODE system

  • MattW

    MattW - 2014-02-10


    I have just started using PyCont to first replicate and then investigate a chemostat model with four ODEs. The system is bounded such that no parameter or variable can be negative. i'm not that comfortable with python code and have followed some of the example scripts to get started.

    Now, i want to be able to specify this explicitly in the code. Running the EP-C curve (which I assume finds an equilibrium point) works ok, but shows the parameters having negative values. This is not the case in other software like XPP.

    I then use DSargs.pdomain to set bounds on the parameters (just one free parameter at first - "D"), and get this output:

    Computing curve...

    Fold-Fold point found in Hopf!

    Fold-Fold point found in Hopf!

    Fold-Fold point found in Hopf!

    B Point found

    0 :
    x2 = -4.29903567965e-37
    s2 = 1.92967310987e-05
    s1 = 0.0999532540429
    x1 = -2.89692059484e-19
    D = -3.10810621031e-15

    A branch point is then found, followed by several more Boundary points and Branch Points.

    Finally, an error with the final line in the traceback:

    numpy.linalg.linalg.LinAlgError: singular matrix

    suggesting some problem with the computation.

    My first question is does the negative value "D" indicate a break in the continuation as the boundary condition is passed?. Secondly, the help files are OK for advanced users, but not for beginners, is there a list of options, i.e. those proceeding DSargs., that are documented? I would like to simulate the system in the same manner as XPP before using the bifurcation analysis tools to look at stability.


  • Drew LaMar

    Drew LaMar - 2014-02-11

    Hi Matt. The negative "D" value does not indicate a break in the continuation, as it is effectively 0 (1e-15).

    I agree that the help files may not be very helpful for beginner users. Sorry about that. If you want to simulate before bifurcation analysis, a good example to look at is, which does a simulation to find a periodic orbit for cycle continuation. There are a slew of other examples in the 'tests' directory as well.

  • MattW

    MattW - 2014-02-12

    Thanks Drew,

    Very helpful, I'll take a look at the examples. Alternatively I can find the fixed points using XPP and migrate to PyCont afterwards.


  • Rob Clewley

    Rob Clewley - 2014-02-12

    Hi, I can't tell from your question if you are looking for a list of options for the simulation part or the PyCont part. I suspect the latter, but in case not, there are lists of simulation and model setup options here: (section 2.1)

    I agree that a more thorough and introductory treatment of the options for PyCont is needed, as Drew already noted. We will try to improve that as time permits.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks