Structure of ODE files

All ODE files are just text files which consist of a series of definitions and directives to the XPP parser. The order in which the definitions are given is usually unimportant with one major exception. So-called fixed or temporary variables are evaluated in the order in which they are defined. Thus, you should never use a named fix variable before it is defined as this will lead to some rather bizarre results when you attempt to solve an ODE. ODE files are all line oriented with a limit of 1024 characters per line. You can use the standard line continuation symbol \ . Here are all the possible ODE file directives:

#: comment line. This is ignored by XPP


'': A comment that is extracted and can be displayed in a separate window.


'' {a=1,b=2,...}: A comment with some ``action'' associated with it. When these comments are displayed in the comment window, an * appears next to them. When clicked by the user, various initial conditions, parameters, and XPP internal options can be set.


!name=formula This defines a derived parameter, name whose values could depend on other parameters. These do not appear in the parameter list since they are presumably tied to the other parameters. Ecah time you change a parameter, they also are updated.


options filename: Insert a file name with common options. This is include only for backward compatibility and is generally obsolete.


name(t+1)=formula or


dname/dt=formula or


name'=formula: Define a differential/difference equation dependent variable, name and the formula defining its right-handside. For example
x'=-x+sin(t)
z(t+1)=z*(4-z)
dw/dt=1-cos(w)+(1+cos(w))*a


name(t)=formula or


volterra name = formula: Define a Volterra integral equation for the variable name. For example
y(t)=int{exp(-t)#x}
y'=-y + a int{exp(-(t-t'))*max(y-1/(1+(t-t')^2),0)}
y(t)=int[.5]{1#y}
The # symbol means a convolution and [a] multiplies the integrand by

(t-t')-a


markov name nstates
{0} {P0,1} ... {P0,N-1}
{P1,0} {0} ... {P1,N-1}
... ... ... ...
{PN-1,0} {PN-1,1} ... {PN-1,N-1}

This defines a Markov variable, name which has nstates states. Then following is the transition table as a series of formulas that are delimited by the curly brackets { } . The diagonal entries are ignored but should still contain a number or formula. For example:
markov z 2
{0} {alpha(v)}
{beta(v)} {0}
defines a two-state Markov process with transition from state 0 to 1 determined by the rate alpha(v) and the transition from 1 to 0 determoined by beta(v)


aux name=formula defines a named quantity, name which appears in the data browser and is available for plotting. Note that auxiliary variables are not known internally to XPP so that you can't use them in formulas


name= formula defines an internal or quantity which can be used in other formulas. This fixed variable serves the same function as temporary quantities in C code.


par name1=value1, name2=value2, ... defines named parameters with default values. These can later be altered and varied in XPP. Never put spaces meter. If the direction is set to zero, the, the point will be recorded from either direction. The flag Stop on Section instructs XPP to halt when the section is crossed. Note that automatic interpolation is done. If the section variable is Time, T and the section is say T1,then each time T=0 modulo T1 the point is recorded. This is useful for periodically driven systems. If you have opted for the Max/Min option, then the section is irrelevant and the point will be recorded when a local maximum (if the direction is 1) minimum (direction=-1) or both (direction=0) of the variable is encountered.

  • stoc(H)astic
    This brings up a series of items that allow you to compute many trajectories and find their mean and variance. It is most useful when used with systems that are either Markovian or have noise added to the right-hand sides. The items are:

  • R(U)elle plot
    This allows you to retard any of the axes by an integral number of steps. This is useful for chaotic orbits and delayed systems. Choosing a number for any of the axes will result in the variable associated with that axis being delayed by the number of steps inputted. Thus if you plot X vs X then of course you will get a diagonal line, but if you make the Y-axis delayed by say 50 and the output is every .1 timesteps, then the plot will be X(t-5) vs X(t). This does not appear during integration of the equations and is available only after a computation. You set it up and then click
    Restore from the main menu.

  • loo(K)up
    This allows you to change the definitions of tabulated functions by reading in a different file. Thus, if you have many experimental sets of data, you can read them in one by one and integrate the equations. You are prompted for the name of a tabulated function. Then you give the filename to read in. You will continue to be prompted and can type a few carriage returns to get out. If the table was defined as a function instead of a file, then you will be prompted for the number of points, the limits of the range (Xhi,Xlo) ad finally, the formula of for the function defining the table. Note that it must be a function of t. Note that if the function contains parameters and these are changed, it will be automatically recomputed.

  • bndry(V)al
    prompts you for the maximum iterates, the error tolerance, and the deviation for the numerical Jacobian for the shooting method for solving BVPs.

  • (A)djoint
    This allows you to compute the adjoint and do averaging for weakly coupled oscillators. To use this option, you must successfully compute a periodic orbit and set the total integration time to one full orbit. If you are only interested in the adjoint of a single component of an oscillation, the algorithm works best if you start at a maximum of that component. The menu that pops up is:
    Anytime you integrate, etc, the data will be placed back into the storage area.

    ./usr/share/doc/xppaut/html/xppodes.html