Generated Code

The following is f77 code generated by the CellML API from this CellML file. (Back to language selection)

The raw code is available.

C
C There are a total of 11 entries in the algebraic variable array.
C There are a total of 4 entries in each of the rate and state variable arrays.
C There are a total of 23 entries in the constant variable array.
C
C
C VOI is time in component environment (millisecond).
C STATES(1) is V in component membrane (millivolt).
C CONSTS(1) is C in component membrane (picofarad).
C ALGBRC(6) is I_Ca in component I_Ca (picoampere).
C ALGBRC(1) is I_K in component I_K (picoampere).
C ALGBRC(8) is I_SK in component I_SK (picoampere).
C ALGBRC(11) is I_DA in component I_DA (picoampere).
C CONSTS(2) is gK in component I_K (nanosiemens).
C CONSTS(3) is VK in component model_parameters (millivolt).
C STATES(2) is n in component n (dimensionless).
C ALGBRC(2) is n_infinity in component n (dimensionless).
C CONSTS(4) is lambda in component n (dimensionless).
C CONSTS(5) is tau_n in component n (millisecond).
C CONSTS(6) is vn in component n (millivolt).
C CONSTS(7) is sn in component n (millivolt).
C CONSTS(8) is gCa in component I_Ca (nanosiemens).
C CONSTS(9) is VCa in component model_parameters (millivolt).
C ALGBRC(5) is m_infinity in component m (dimensionless).
C CONSTS(10) is vm in component m (millivolt).
C CONSTS(11) is sm in component m (millivolt).
C CONSTS(12) is gSK in component I_SK (nanosiemens).
C ALGBRC(7) is s_infinity in component I_SK (dimensionless).
C CONSTS(13) is ks in component I_SK (micromolar).
C STATES(3) is Ca in component Ca (micromolar).
C ALGBRC(10) is I_A in component I_DA (picoampere).
C CONSTS(14) is gA in component I_DA (nanosiemens).
C ALGBRC(9) is a_infinity in component a (dimensionless).
C STATES(4) is h in component h (dimensionless).
C CONSTS(15) is va in component a (millivolt).
C CONSTS(16) is sa in component a (millivolt).
C ALGBRC(3) is h_infinity in component h (dimensionless).
C CONSTS(17) is tau_h in component h (millisecond).
C CONSTS(18) is vh in component h (millivolt).
C CONSTS(19) is sh in component h (millivolt).
C CONSTS(20) is fc in component Ca (dimensionless).
C CONSTS(21) is alpha in component Ca (micromolar_femtocoulomb).
C CONSTS(22) is kc in component Ca (first_order_rate_constant).
C ALGBRC(4) is PRL in component PRL (dimensionless).
C CONSTS(23) is kPRL in component PRL (micromolar_4).
C RATES(1) is d/dt V in component membrane (millivolt).
C RATES(2) is d/dt n in component n (dimensionless).
C RATES(4) is d/dt h in component h (dimensionless).
C RATES(3) is d/dt Ca in component Ca (micromolar).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -60
      CONSTS(1) = 10
      CONSTS(2) = 4
      CONSTS(3) = -75
      STATES(2) = 0.1
      CONSTS(4) = 0.7
      CONSTS(5) = 30
      CONSTS(6) = -5
      CONSTS(7) = 10
      CONSTS(8) = 2
      CONSTS(9) = 50
      CONSTS(10) = -20
      CONSTS(11) = 12
      CONSTS(12) = 1.7
      CONSTS(13) = 0.5
      STATES(3) = 0.1
      CONSTS(14) = 25
      STATES(4) = 0.1
      CONSTS(15) = -20
      CONSTS(16) = 10
      CONSTS(17) = 20
      CONSTS(18) = -60
      CONSTS(19) = 5
      CONSTS(20) = 0.01
      CONSTS(21) = 0.0015
      CONSTS(22) = 0.16
      CONSTS(23) = 1
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) = 1.00000/(1.00000+EXP((CONSTS(6) - STATES(1))/CONSTS(7)))
      RATES(2) = ( CONSTS(4)*(ALGBRC(2) - STATES(2)))/CONSTS(5)
      ALGBRC(3) = 1.00000/(1.00000+EXP((STATES(1) - CONSTS(18))/CONSTS(19)))
      RATES(4) = (ALGBRC(3) - STATES(4))/CONSTS(17)
      ALGBRC(5) = 1.00000/(1.00000+EXP((CONSTS(10) - STATES(1))/CONSTS(11)))
      ALGBRC(6) =  CONSTS(8)*ALGBRC(5)*(STATES(1) - CONSTS(9))
      RATES(3) =  - CONSTS(20)*( CONSTS(21)*ALGBRC(6)+ CONSTS(22)*STATES(3))
      ALGBRC(1) =  CONSTS(2)*STATES(2)*(STATES(1) - CONSTS(3))
      ALGBRC(7) = STATES(3) ** 2.00000/(STATES(3) ** 2.00000+CONSTS(13) ** 2.00000)
      ALGBRC(8) =  CONSTS(12)*ALGBRC(7)*(STATES(1) - CONSTS(3))
      ALGBRC(9) = 1.00000/(1.00000+EXP((CONSTS(15) - STATES(1))/CONSTS(16)))
      ALGBRC(10) =  CONSTS(14)*ALGBRC(9)*STATES(4)*(STATES(1) - CONSTS(3))
      ALGBRC(11) = ALGBRC(10)
      RATES(1) = - (ALGBRC(6)+ALGBRC(1)+ALGBRC(8)+ALGBRC(11))/CONSTS(1)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) = 1.00000/(1.00000+EXP((CONSTS(6) - STATES(1))/CONSTS(7)))
      ALGBRC(3) = 1.00000/(1.00000+EXP((STATES(1) - CONSTS(18))/CONSTS(19)))
      ALGBRC(5) = 1.00000/(1.00000+EXP((CONSTS(10) - STATES(1))/CONSTS(11)))
      ALGBRC(6) =  CONSTS(8)*ALGBRC(5)*(STATES(1) - CONSTS(9))
      ALGBRC(1) =  CONSTS(2)*STATES(2)*(STATES(1) - CONSTS(3))
      ALGBRC(7) = STATES(3) ** 2.00000/(STATES(3) ** 2.00000+CONSTS(13) ** 2.00000)
      ALGBRC(8) =  CONSTS(12)*ALGBRC(7)*(STATES(1) - CONSTS(3))
      ALGBRC(9) = 1.00000/(1.00000+EXP((CONSTS(15) - STATES(1))/CONSTS(16)))
      ALGBRC(10) =  CONSTS(14)*ALGBRC(9)*STATES(4)*(STATES(1) - CONSTS(3))
      ALGBRC(11) = ALGBRC(10)
      ALGBRC(4) =  CONSTS(23)*STATES(3) ** 4.00000
      RETURN
      END