
#
# This file is automatically generated with 
# the System Biology Format Converter (http://sbfc.sourceforge.net/)
# from an SBML file.
#

#
# Model name = Edelstein1996 - EPSP ACh event
#
# is http://identifiers.org/biomodels.db/MODEL6613849442
# is http://identifiers.org/biomodels.db/BIOMD0000000001
# isDescribedBy http://identifiers.org/pubmed/8983160
#

# some function definitions that are allowed in SBML but not valid in xpp
ceil(x)=flr(1+x)

@delay=50


# Compartment: id = comp1, name = compartment1, constant
par comp1=1.0E-16

# Parameter:   id =  kf_0, name = kf_0
par kf_0=3000.0

# Parameter:   id =  kr_0, name = kr_0, constant
par kr_0=8000.0

# Parameter:   id =  kf_1, name = kf_1
par kf_1=1500.0

# Parameter:   id =  kr_1, name = kr_1, constant
par kr_1=16000.0

# Parameter:   id =  kf_2, name = kf_2, constant
par kf_2=30000.0

# Parameter:   id =  kr_2, name = kr_2, constant
par kr_2=700.0

# Parameter:   id =  kf_3, name = kf_3
par kf_3=3000.0

# Parameter:   id =  kr_3, name = kr_3, constant
par kr_3=8.64

# Parameter:   id =  kf_4, name = kf_4
par kf_4=1500.0

# Parameter:   id =  kr_4, name = kr_4, constant
par kr_4=17.28

# Parameter:   id =  kf_5, name = kf_5, constant
par kf_5=0.54

# Parameter:   id =  kr_5, name = kr_5, constant
par kr_5=10800.0

# Parameter:   id =  kf_6, name = kf_6, constant
par kf_6=130.0

# Parameter:   id =  kr_6, name = kr_6, constant
par kr_6=2740.0

# Parameter:   id =  kf_7, name = kf_7
par kf_7=3000.0

# Parameter:   id =  kr_7, name = kr_7, constant
par kr_7=4.0

# Parameter:   id =  kf_8, name = kf_8
par kf_8=1500.0

# Parameter:   id =  kr_8, name = kr_8, constant
par kr_8=8.0

# Parameter:   id =  kf_9, name = kf_9, constant
par kf_9=19.7

# Parameter:   id =  kr_9, name = kr_9, constant
par kr_9=3.74

# Parameter:   id =  kf_10, name = kf_10, constant
par kf_10=19.85

# Parameter:   id =  kr_10, name = kr_10, constant
par kr_10=1.74

# Parameter:   id =  kf_11, name = kf_11, constant
par kf_11=20.0

# Parameter:   id =  kr_11, name = kr_11, constant
par kr_11=0.81

# Parameter:   id =  kf_12, name = kf_12
par kf_12=3000.0

# Parameter:   id =  kr_12, name = kr_12, constant
par kr_12=4.0

# Parameter:   id =  kf_13, name = kf_13
par kf_13=1500.0

# Parameter:   id =  kr_13, name = kr_13, constant
par kr_13=8.0

# Parameter:   id =  kf_14, name = kf_14, constant
par kf_14=0.05

# Parameter:   id =  kr_14, name = kr_14, constant
par kr_14=0.0012

# Parameter:   id =  kf_15, name = kf_15, constant
par kf_15=0.05

# Parameter:   id =  kr_15, name = kr_15, constant
par kr_15=0.0012

# Parameter:   id =  kf_16, name = kf_16, constant
par kf_16=0.05

# Parameter:   id =  kr_16, name = kr_16, constant
par kr_16=0.0012

# Parameter:   id =  t2, name = t2, constant
par t2=20.0

# Reaction: id = React0, name = React0

React0=comp1*(kf_0*B-kr_0*BL)

# Reaction: id = React1, name = React1

React1=comp1*(kf_1*BL-kr_1*BLL)

# Reaction: id = React2, name = React2

React2=comp1*(kf_2*BLL-kr_2*ALL)

# Reaction: id = React3, name = React3

React3=comp1*(kf_3*A-kr_3*AL)

# Reaction: id = React4, name = React4

React4=comp1*(kf_4*AL-kr_4*ALL)

# Reaction: id = React5, name = React5

React5=comp1*(kf_5*B-kr_5*A)

# Reaction: id = React6, name = React6

React6=comp1*(kf_6*BL-kr_6*AL)

# Reaction: id = React7, name = React7

React7=comp1*(kf_7*I-kr_7*IL)

# Reaction: id = React8, name = React8

React8=comp1*(kf_8*IL-kr_8*ILL)

# Reaction: id = React9, name = React9

React9=comp1*(kf_9*A-kr_9*I)

# Reaction: id = React10, name = React10

React10=comp1*(kf_10*AL-kr_10*IL)

# Reaction: id = React11, name = React11

React11=comp1*(kf_11*ALL-kr_11*ILL)

# Reaction: id = React12, name = React12

React12=comp1*(kf_12*D-kr_12*DL)

# Reaction: id = React13, name = React13

React13=comp1*(kf_13*DL-kr_13*DLL)

# Reaction: id = React14, name = React14

React14=comp1*(kf_14*I-kr_14*D)

# Reaction: id = React15, name = React15

React15=comp1*(kf_15*IL-kr_15*DL)

# Reaction: id = React16, name = React16

React16=comp1*(kf_16*ILL-kr_16*DLL)

# Species:   id = BLL, name = BasalACh2, affected by kineticLaw

init BLL=0.0
dBLL/dt=(1/(comp1))*(( 1.0 * React1) + (-1.0 * React2))

# Species:   id = IL, name = IntermediateACh, affected by kineticLaw

init IL=0.0
dIL/dt=(1/(comp1))*(( 1.0 * React7) + (-1.0 * React8) + ( 1.0 * React10) + (-1.0 * React15))

# Species:   id = AL, name = ActiveACh, affected by kineticLaw

init AL=0.0
dAL/dt=(1/(comp1))*(( 1.0 * React3) + (-1.0 * React4) + ( 1.0 * React6) + (-1.0 * React10))

# Species:   id = A, name = Active, affected by kineticLaw

init A=0.0
dA/dt=(1/(comp1))*((-1.0 * React3) + ( 1.0 * React5) + (-1.0 * React9))

# Species:   id = BL, name = BasalACh, affected by kineticLaw

init BL=0.0
dBL/dt=(1/(comp1))*(( 1.0 * React0) + (-1.0 * React1) + (-1.0 * React6))

# Species:   id = B, name = Basal, affected by kineticLaw

init B=1.66057788110262E-21
dB/dt=(1/(comp1))*((-1.0 * React0) + (-1.0 * React5))

# Species:   id = DLL, name = DesensitisedACh2, affected by kineticLaw

init DLL=0.0
dDLL/dt=(1/(comp1))*(( 1.0 * React13) + ( 1.0 * React16))

# Species:   id = D, name = Desensitised, affected by kineticLaw

init D=0.0
dD/dt=(1/(comp1))*((-1.0 * React12) + ( 1.0 * React14))

# Species:   id = ILL, name = IntermediateACh2, affected by kineticLaw

init ILL=0.0
dILL/dt=(1/(comp1))*(( 1.0 * React8) + ( 1.0 * React11) + (-1.0 * React16))

# Species:   id = DL, name = DesensitisedACh, affected by kineticLaw

init DL=0.0
dDL/dt=(1/(comp1))*(( 1.0 * React12) + (-1.0 * React13) + ( 1.0 * React15))

# Species:   id = I, name = Intermediate, affected by kineticLaw

init I=0.0
dI/dt=(1/(comp1))*((-1.0 * React7) + ( 1.0 * React9) + (-1.0 * React14))

# Species:   id = ALL, name = ActiveACh2, affected by kineticLaw

init ALL=0.0
dALL/dt=(1/(comp1))*(( 1.0 * React2) + ( 1.0 * React4) + (-1.0 * React11))

# event : RemovalACh
RemovalAC=if (t > t2) then (1.5) else (0.2)
global 1 {RemovalAC - 1.1} {kf_0=0;kf_3=0;kf_7=0;kf_12=0;kf_1=0;kf_4=0;kf_8=0;kf_13=0}

@ meth=cvode, tol=1e-6, atol=1e-8
# @ maxstor=1e6
@ bound=40000, total=200
done

