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 13 entries in the algebraic variable array.
C There are a total of 5 entries in each of the rate and state variable arrays.
C There are a total of 15 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 ALGBRC(1) is Vs in component membrane (millivolt).
C CONSTS(1) is V_I in component membrane (millivolt).
C CONSTS(2) is V_K in component membrane (millivolt).
C CONSTS(3) is V_L in component membrane (millivolt).
C CONSTS(4) is V_H_Na in component membrane (millivolt).
C CONSTS(5) is V_H_K in component membrane (millivolt).
C CONSTS(14) is g_I in component membrane (milliS_per_microF).
C CONSTS(6) is g_K in component membrane (milliS_per_microF).
C CONSTS(7) is g_L in component membrane (milliS_per_microF).
C CONSTS(15) is g_T in component membrane (milliS_per_microF).
C CONSTS(8) is g_P in component membrane (milliS_per_microF).
C CONSTS(9) is Kp in component membrane (millimolar).
C STATES(2) is c in component calcium_concentration (millimolar).
C ALGBRC(9) is sI in component sI_gate (dimensionless).
C STATES(3) is yI in component yI_gate (dimensionless).
C STATES(4) is xT in component xT_gate (dimensionless).
C STATES(5) is xK in component xK_gate (dimensionless).
C ALGBRC(2) is alpha_m in component sI_gate (per_millisecond).
C ALGBRC(6) is beta_m in component sI_gate (per_millisecond).
C ALGBRC(10) is ZI in component yI_gate (dimensionless).
C ALGBRC(3) is alpha_h in component yI_gate (per_millisecond).
C ALGBRC(7) is beta_h in component yI_gate (per_millisecond).
C ALGBRC(12) is tau_yI in component yI_gate (millisecond).
C ALGBRC(4) is sT in component xT_gate (dimensionless).
C CONSTS(10) is tau_xT in component xT_gate (millisecond).
C CONSTS(11) is V_Ca in component calcium_concentration (millivolt).
C CONSTS(12) is rho in component calcium_concentration (per_millisecond).
C CONSTS(13) is K_c in component calcium_concentration (millimolar_per_millivolt).
C ALGBRC(5) is alpha_n in component xK_gate (per_millisecond).
C ALGBRC(8) is beta_n in component xK_gate (per_millisecond).
C ALGBRC(13) is tau_xK in component xK_gate (millisecond).
C ALGBRC(11) is sK in component xK_gate (dimensionless).
C RATES(1) is d/dt V in component membrane (millivolt).
C RATES(3) is d/dt yI in component yI_gate (dimensionless).
C RATES(4) is d/dt xT in component xT_gate (dimensionless).
C RATES(2) is d/dt c in component calcium_concentration (millimolar).
C RATES(5) is d/dt xK in component xK_gate (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -54
      CONSTS(1) = 30.0
      CONSTS(2) = -75.0
      CONSTS(3) = -40.0
      CONSTS(4) = 115.0
      CONSTS(5) = -12.0
      CONSTS(6) = 0.3
      CONSTS(7) = 0.003
      CONSTS(8) = 0.03
      CONSTS(9) = 0.5
      STATES(2) = 0.1
      STATES(3) = 0.1
      STATES(4) = 0.1
      STATES(5) = 0.1
      CONSTS(10) = 235.0
      CONSTS(11) = 140.0
      CONSTS(12) = 0.0003
      CONSTS(13) = 0.0085
      CONSTS(14) =  1.00000*((CONSTS(4) - CONSTS(5))/(CONSTS(1) - CONSTS(2)))
      CONSTS(15) =  1.00000*(( CONSTS(4)*CONSTS(2) -  CONSTS(1)*CONSTS(5))/(CONSTS(1) - CONSTS(2)))
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(2) =  CONSTS(12)*( CONSTS(13)*STATES(4)*(CONSTS(11) - STATES(1)) - STATES(2))
      ALGBRC(1) =  1.00000*CONSTS(14)*STATES(1)+ 1.00000*CONSTS(15)
      ALGBRC(4) = 1.00000/(EXP( 0.150000*(-50.0000 - ALGBRC(1)))+1.00000)
      RATES(4) = (ALGBRC(4) - STATES(4))/CONSTS(10)
      ALGBRC(2) = ( 0.100000*(50.0000 - ALGBRC(1)))/- EXP((50.0000 - ALGBRC(1))/10.0000)
      ALGBRC(6) =  4.00000*EXP((25.0000 - ALGBRC(1))/18.0000)
      ALGBRC(9) = ALGBRC(2)/(ALGBRC(2)+ALGBRC(6))
      RATES(1) =  ( CONSTS(14)*ALGBRC(9) ** 3.00000*STATES(3)+ CONSTS(15)*STATES(4))*(CONSTS(1) - STATES(1))+ ( CONSTS(6)*STATES(5) ** 4.00000+ CONSTS(8)*STATES(2)*CONSTS(9)+STATES(2) ** -1.00000)*(CONSTS(2) - STATES(1))+ CONSTS(7)*(CONSTS(3) - STATES(1))
      ALGBRC(3) =  0.0700000*EXP((25.0000 - ALGBRC(1))/20.0000)
      ALGBRC(7) = 1.00000/(EXP((55.0000 - ALGBRC(1))/10.0000)+1.00000)
      ALGBRC(10) = ALGBRC(3)/(ALGBRC(3)+ALGBRC(7))
      ALGBRC(12) = 12.5000/(ALGBRC(3)+ALGBRC(7))
      RATES(3) = (ALGBRC(10) - STATES(3))/ALGBRC(12)
      ALGBRC(5) = ( 0.0100000*(55.0000 - ALGBRC(1)))/(EXP((55.0000 - ALGBRC(1))/10.0000) - 1.00000)
      ALGBRC(8) =  0.125000*EXP((45.0000 - ALGBRC(1))/80.0000)
      ALGBRC(13) = 12.5000/(ALGBRC(5)+ALGBRC(8))
      ALGBRC(11) = ALGBRC(5)/(ALGBRC(5)+ALGBRC(8))
      RATES(5) = (ALGBRC(11) - STATES(5))/ALGBRC(13)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) =  1.00000*CONSTS(14)*STATES(1)+ 1.00000*CONSTS(15)
      ALGBRC(4) = 1.00000/(EXP( 0.150000*(-50.0000 - ALGBRC(1)))+1.00000)
      ALGBRC(2) = ( 0.100000*(50.0000 - ALGBRC(1)))/- EXP((50.0000 - ALGBRC(1))/10.0000)
      ALGBRC(6) =  4.00000*EXP((25.0000 - ALGBRC(1))/18.0000)
      ALGBRC(9) = ALGBRC(2)/(ALGBRC(2)+ALGBRC(6))
      ALGBRC(3) =  0.0700000*EXP((25.0000 - ALGBRC(1))/20.0000)
      ALGBRC(7) = 1.00000/(EXP((55.0000 - ALGBRC(1))/10.0000)+1.00000)
      ALGBRC(10) = ALGBRC(3)/(ALGBRC(3)+ALGBRC(7))
      ALGBRC(12) = 12.5000/(ALGBRC(3)+ALGBRC(7))
      ALGBRC(5) = ( 0.0100000*(55.0000 - ALGBRC(1)))/(EXP((55.0000 - ALGBRC(1))/10.0000) - 1.00000)
      ALGBRC(8) =  0.125000*EXP((45.0000 - ALGBRC(1))/80.0000)
      ALGBRC(13) = 12.5000/(ALGBRC(5)+ALGBRC(8))
      ALGBRC(11) = ALGBRC(5)/(ALGBRC(5)+ALGBRC(8))
      RETURN
      END