C SBML Model Name: Repressilator Model C C Generated by MathSBML 2.2.1-beta-9 (25 Nov 2003) C Creation Time: 26-November-2003 10:40:20.585419 C User: jamestkirk C Machine: DHCP-52-160 C Processor: PowerPC C Machine type: PowerMac C Oper. System: MacOSX C -------------------------------------------------------- C C lsodi compliant SBML model C Reference: http://netlib.org/alliant/ode/prog/lsodi.f C C -------------------------------------------------------- C C This file contains the following modules: C C Module Name Description C ----------------- --------------------------------------- C addp (subroutine) Add A to any matrix - required by lsodi C init (subroutine) Set initial conditions C jac (subroutine) Compute Jacobian - required by lsodi C res (subroutine) Calculate Residuals - required by lsodi C C -------------------------------------------------------- C subroutine res(neq,t,y,s,r,ires) double precision r,s,t,y C C This is subroutine res for lsodi C This function computes the residuals r(i)=g(t,y)- A(t,y)(dy/dt) C for the linear-implicit system system (A)*(dy/dt)=g(t,y) C where A is a constant, possibly singular, matrix. C C Here A is diagonal with (restriction imposed by SBML, not lsodi) C A(i,i)=1, i=1,...,m, where m=# of odes in the SBML Model C A(i,i)=0, i=m+1,...,m+nrules, where nrules =# of algebraic rules C A(i,i)=0, i=nrules+1,...,nvars, where nvars is the total number C of variables in the system and nvars-nrules-m>0 is the C number of variables controlled purely by events C C If the system is purely differential C the right-hand side of the system dydt = g(y,t) will C be returned if s is zero-filled. C C Representation of Model Variables by the array y C ------------------------------------------------ C y(1) = px C y(2) = py C y(3) = pz C y(4) = x C y(5) = y C y(6) = z C dimension r(6),s(6),y(6) r(1)=-s(1) + 5.*(-y(1) + y(4)) r(2)=-s(2) + 5.*(-y(2) + y(5)) r(3)=-s(3) + 5.*(-y(3) + y(6)) r(4)=-s(4) + 250./(1. + y(3)**2.1) - 1.*y(4) r(5)=-s(5) + 250./(1. + y(1)**2.1) - 1.*y(5) r(6)=-s(6) + 250./(1. + y(2)**2.1) - 1.*y(6) return end C C C -------------------------------------------------------- C subroutine addp(neq, t, y, ml, mu, p, nrowp) C C Subroutine addp required by lsodi C double precision p, t, y dimension y(6), p(nrowp,6) integer i Do i = 1,6 p(i,i) = p(i,i)+1 End Do return end C C -------------------------------------------------------- C subroutine jac (neq,t,y,s,ml,mu,p,nrowp) C C Subroutine jac required by lsodi, computes jacobian C dimension y(6), s(6),p(nrowp,6) p(1,1)=-5. p(1,2)=0 p(1,3)=0 p(1,4)=5. p(1,5)=0 p(1,6)=0 p(2,1)=0 p(2,2)=-5. p(2,3)=0 p(2,4)=0 p(2,5)=5. p(2,6)=0 p(3,1)=0 p(3,2)=0 p(3,3)=-5. p(3,4)=0 p(3,5)=0 p(3,6)=5. p(4,1)=0 p(4,2)=0 p(4,3)=(-525.*y(3)**1.1)/(1. + y(3)**2.1)**2 p(4,4)=-1. p(4,5)=0 p(4,6)=0 p(5,1)=(-525.*y(1)**1.1)/(1. + y(1)**2.1)**2 p(5,2)=0 p(5,3)=0 p(5,4)=0 p(5,5)=-1. p(5,6)=0 p(6,1)=0 p(6,2)=(-525.*y(2)**1.1)/(1. + y(2)**2.1)**2 p(6,3)=0 p(6,4)=0 p(6,5)=0 p(6,6)=-1. return end C C -------------------------------------------------------- C Subroutine init(neq,y) double precision y dimension y(6) y(1)=5. y(2)=Indeterminate y(3)=15. y(4)=Indeterminate y(5)=Indeterminate y(6)=Indeterminate return end