XPP Commands
Bard Ermentrout—Jan2000
ODE File Format
#comment line-name of file,etc
d
volt
x[n1..n2]’=...[j][j-1]...<--Arrays
markov
{t01}{t02}...{t0k-1}
{t10}...
...
{tk-1,0}...{tk-1k-1}
aux
!
parameter
wiener
number
table
table
global sign{condition}{name1=form1;...}
init
0=
solv
special
fconv(type,npts,ncon,wgt,rootname,root2,function)
sparse(npts,ncon,wgt,index,rootname)
fsparse(npts,ncon,wgt,index,rootname,root2,function)
#comments
@
set
options
"{z=3,b=3,...}Some nice text<---Active comments
done
INTEGRAL EQUATIONS
The general integral equation
u(t)=f(t)+ t0K(t,s,u(s))ds becomes
u=f(t)+int{K(t,t’,u)}
The convolution equation:
v(t)=exp(?t)+ t0e?(t?s)2v(s)ds
1
would be written as:
v(t)=exp(-t)+int{exp(-t^2)#v}
If one wants to solve,say,
u(t)=exp(?t)+ t0(t?t )?mu K(t,t ,u(t ))dt
the form is:
u(t)=exp(-t)+int[mu]{K(t,t’,u}
and for convolutions,use the form:
u(t)=exp(-t)+int[mu]{w(t)#u}
NETWORKS
special zip=conv(type,npts,ncon,wgt,root)
where root is the name of a variable and wgt is a table,produces an array zip with npts:
zip[i]=
ncon
j=?ncon
wgt[j+ncon]root[i+j]
The sparse network has the syntax:
special zip=sparse(npts,ncon,wgt,index,root)
where wgt and index are tables with at least npts*ncon entries.The array index returns the indices of the o?sets to with which to connect and the array wgt is the coupling strength.The return is
zip[i]=sum(j=0;j k=index[i*ncon+j] The other two types of networks allow more complicated interactions: special zip=fconv(type,npts,ncon,wgt,root1,root2,f) evaluates as zip[i]=sum(j=-ncon;j=ncon)wgt[ncon+j]*f(root1[i+j],root2[i]) and special zip=fsparse(npts,ncon,wgt,index,root1,root2,f) evaluates as zip[i]=sum(j=0;j k=index[i*ncon+j] OPTIONS The format for changing the options is: @name1=value1,name2=value2,... where name is one of the following and value is either an integer,?oating point,or string.(All names can be upper or lower case).The?rst four options can only be set outside the program.They are:?MAXSTOR=integer sets the total number of time steps that will be kept in memory.The default is5000. If you want to perform very long integrations change this to some large number. 2 ?BACK={Black,White}sets the background to black or white. ?SMALL=fontname where fontname is some font available to your X-server.This sets the“small”font which is used in the Data Browser and in some other windows. ?BIG=fontname sets the font for all the menus and popups. ?SMC={0,...,10}sets the stable manifold color ?UMC={0,...,10}sets the unstable manifold color ?XNC={0,...,10}sets the X-nullcline color ?YNC={0,...,10}sets the Y-nullcline color The remaining options can be set from within the program.They are ?LT=int sets the linetype.It should be less than2and greater than-6. ?SEED=int sets the random number generator seed. ?XP=name sets the name of the variable to plot on the x-axis.The default is T,the time-variable. ?YP=name sets the name of the variable on the y-axis. ?ZP=name sets the name of the variable on the z-axis(if the plot is3D.) ?NPLOT=int tells XPP how many plots will be in the opening screen. ?XP2=name,YP2=name,ZP2=name tells XPP the variables on the axes of the second curve;XP8etc are for the8th plot.Up to8total plots can be speci?ed on opening.They will be given di?erent colors. ?AXES={2,3}determine whether a2D or3D plot will be displayed. ?TOTAL=value sets the total amount of time to integrate the equations(default is20). ?DT=value sets the time step for the integrator(default is0.05). ?NJMP=integer tells XPP how frequently to output the solution to the ODE.The default is1,which means at each integration step. ?T0=value sets the starting time(default is0). ?TRANS=value tells XPP to integrate until T=TRANS and then start plotting solutions(default is0.)?NMESH=integer sets the mesh size for computing nullclines(default is40). ?METH={discrete,euler,modeuler,rungekutta,adams,gear,volterra,backeul,qualrk,stiff,cvode,5 sets the integration method(default is Runge-Kutta.) ?DTMIN=value sets the minimum allowable timestep for the Gear integrator. ?DTMAX=value sets the maximum allowable timestep for the Gear integrator ?VMAXPTS=value sets the number of points maintained in for the Volterra integral solver.The default is 4000. ?{JAC EPS=value,NEWT TOL=value,NEWT ITER=value}set parameters for the root?nders.?ATOLER=value sets the absolute tolerance for CVODE. ?TOLER=value sets the error tolerance for the Gear,adaptive RK,and sti?integrators.It is the relative tolerance for CVODE. ?BOUND=value sets the maximum bound any plotted variable can reach in magnitude.If any plottable quantity exceeds this,the integrator will halt with a warning.The program will not stop however(default is100.) ?DELAY=value sets the maximum delay allowed in the integration(default is0.) ?PHI=value,THETA=value set the angles for the three-dimensional plots. ?XLO=value,YLO=value,XHI=value,YHI=value set the limits for two-dimensional plots(defaults are0,- 2,20,2respectively.)Note that for three-dimensional plots,the plot is scaled to a cube with vertices that are±1and this cube is rotated and projected onto the plane so setting these to±2works well for3D plots.?XMAX=value,XMIN=value,YMAX=value,YMIN=value,ZMAX=value,ZMIN=value set the scaling for three-d plots. ?OUTPUT=?lename sets the?lename to which you want to write for“silent”integration.The default is “output.dat”. ?POIMAP={section,maxmin}sets up a Poincare map for either sections of a variable or the extrema.?POIVAR=name sets the variable name whose section you are interested in?nding. ?POIPLN=value is the value of the section;it is a?oating point. 3 ?POISGN={1,-1,0}determines the direction of the section. ?POISTOP=1means to stop the integration when the section is reached. ?RANGE=1means that you want to run a range integration(in batch mode). ?RANGEOVER=name,RANGESTEP=number,RANGELOW=number,RANGEHIGH=number,RAN-GERESET=Yes,No,RANGEOLDIC=Yes,No all correspond to the entries in the range integration option. ?TOR PER=value,de?ned the period for a toroidal phasespace and tellx XPP that there will be some variables on the circle. ?FOLD=name,tells XPP that the variable?name?is to be considered modulo the period.You can repeat this for many variables. ?AUTO-stu?.The following AUTO-speci?c variables can also be set:NTST,NMAX,NPR,DSMIN,DSMAX, DS,PARMIN,PARMAX,NORMMIN,NORMMAX,AUTOXMIN,AUTOXMAX,AUTOYMIN,AUTOYMAX,AUTOVAR.The last is the variable to plot on the y-axis.The x-axis variable is always the?rst parameter in the ODE?le unless you change it within AUTO. COLOR MEANING0-Black/White;1-Red;2-Red Orange;3-Orange;4-Yellow Orange;5-Yellow;6-Yellow Green;7-Green;8-Blue Green;9-Blue;10-Purple. KEYWORDS You should be aware of the following keywords that should not be used in your ODE?les for anything other than their meaning here. sin cos tan atan atan2sinh cosh tanh exp delay ln log log10t pi if then else asin acos heav sign ceil flr ran abs del\_shft max min normal besselj bessely erf erfc arg1...arg9@$+-/*^**shift |><==>=<=!=not\#int sum of i’ These are mainly self-explanatory.The nonobvious ones are: ?heav(arg1)the step function,zero if arg1<0and1otherwise. ?sign(arg)which is the sign of the argument(zero has sign0) ?ran(arg)produces a uniformly distributed random number between0and arg. ?besselj,bessely take two arguments,n,x and return respectively,J n(x)and Y n(x),the Bessel functions. ?erf(x),erfc(x)are the error function and the complementary function. ?normal(arg1,arg2)produces a normally distributed random number with mean arg1and variance arg2. ?max(arg1,arg2)produces the maximum of the two arguments and min is the minimum of them. ?if( ?delay(, ?del shft(, ?ceil(arg),flr(arg)are the integer parts of ?t is the current time in the integration of the di?erential equation. ?pi isπ. ?arg1,...,arg9are the formal arguments for functions ?int,#concern Volterra equations. ?shift(, 4 ?sum( 5