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 2 entries in each of the rate and state variable arrays.
C There are a total of 30 entries in the constant variable array.
C
C
C VOI is time in component environment (millisecond).
C ALGBRC(11) is P_CE in component equations (dimensionless).
C ALGBRC(6) is P_PE in component equations (dimensionless).
C ALGBRC(7) is P_SE in component equations (dimensionless).
C ALGBRC(1) is Ca in component equations (dimensionless).
C ALGBRC(13) is C_2 in component equations (per_millisec).
C ALGBRC(2) is phi_A_1 in component equations (dimensionless).
C ALGBRC(12) is pi_n in component equations (dimensionless).
C ALGBRC(9) is A in component equations (dimensionless).
C STATES(1) is A_1 in component equations (dimensionless).
C ALGBRC(4) is S in component equations (um).
C ALGBRC(10) is n in component equations (dimensionless).
C ALGBRC(8) is n_1 in component equations (dimensionless).
C STATES(2) is n_2 in component equations (dimensionless).
C CONSTS(28) is G_V in component equations (dimensionless).
C CONSTS(27) is q_V in component equations (per_millisec).
C CONSTS(26) is V in component equations (um_per_millisec).
C CONSTS(29) is F_V in component equations (dimensionless).
C CONSTS(30) is p_V in component equations (dimensionless).
C CONSTS(1) is alpha_1 in component equations (per_um).
C CONSTS(2) is alpha_2 in component equations (per_um).
C CONSTS(3) is beta_1 in component equations (dimensionless).
C CONSTS(4) is beta_2 in component equations (dimensionless).
C CONSTS(5) is lambda in component equations (per_um).
C CONSTS(6) is V_max in component equations (um_per_millisec).
C CONSTS(7) is Ca_m in component equations (dimensionless).
C CONSTS(8) is t_d in component equations (millisecond).
C CONSTS(9) is a_c in component equations (per_millisec2).
C CONSTS(10) is b_c in component equations (per_millisec2).
C CONSTS(11) is C_1 in component equations (per_millisec).
C CONSTS(12) is C_20 in component equations (per_millisec).
C CONSTS(13) is q_k in component equations (dimensionless).
C CONSTS(25) is V_1 in component equations (um_per_millisec).
C CONSTS(14) is a in component equations (dimensionless).
C CONSTS(15) is m_0 in component equations (dimensionless).
C CONSTS(16) is g_1 in component equations (per_um).
C CONSTS(17) is g_2 in component equations (dimensionless).
C CONSTS(18) is pi_min in component equations (dimensionless).
C CONSTS(19) is S_0 in component equations (um).
C CONSTS(20) is q_1 in component equations (per_millisec).
C CONSTS(21) is q_2 in component equations (per_millisec).
C CONSTS(22) is q_3 in component equations (per_millisec).
C CONSTS(23) is TnC in component equations (dimensionless).
C ALGBRC(3) is l_1 in component user_defined (um).
C ALGBRC(5) is l_2 in component user_defined (um).
C CONSTS(24) is dl_1_dt in component user_defined (um_per_millisec).
C RATES(1) is d/dt A_1 in component equations (dimensionless).
C RATES(2) is d/dt n_2 in component equations (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 0
      STATES(2) = 0
      CONSTS(1) = 14.6
      CONSTS(2) = 14.6
      CONSTS(3) = 1
      CONSTS(4) = 0.0012
      CONSTS(5) = 30
      CONSTS(6) = 0.0043
      CONSTS(7) = 45e-3
      CONSTS(8) = 170
      CONSTS(9) = 2.4e-4
      CONSTS(10) = 5e-4
      CONSTS(11) = 2.9e-2
      CONSTS(12) = 0.2
      CONSTS(13) = 4
      CONSTS(14) = 0.25
      CONSTS(15) = 0.87
      CONSTS(16) = 0.4
      CONSTS(17) = 0.6
      CONSTS(18) = 5e-2
      CONSTS(19) = 0.77
      CONSTS(20) = 0.017
      CONSTS(21) = 0.26
      CONSTS(22) = 0.03
      CONSTS(23) = 1
      CONSTS(24) = 0.00000
      CONSTS(25) =  0.100000*CONSTS(6)
      CONSTS(26) = - CONSTS(24)
      CONSTS(27) = TERNRY(CONSTS(26).LE.0.00000, CONSTS(20) - ( CONSTS(21)*CONSTS(26))/CONSTS(6), CONSTS(22))
      CONSTS(28) = 1.00000+( 0.600000*CONSTS(26))/CONSTS(6)
      CONSTS(29) = ( CONSTS(14)*(1.00000+CONSTS(26)/CONSTS(6)))/(CONSTS(14) - CONSTS(26)/CONSTS(6))
      CONSTS(30) = CONSTS(29)/CONSTS(28)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(2) =  CONSTS(27)*( CONSTS(15)*CONSTS(28) - STATES(2))
      ALGBRC(1) = TERNRY(VOI.LE.CONSTS(8),  CONSTS(7)*1.00000 - EXP( - CONSTS(9)*VOI ** 2.00000) ** 2.00000,  CONSTS(7)* (1.00000 - EXP( - CONSTS(9)*VOI ** 2.00000))*EXP( - CONSTS(10)*VOI - CONSTS(8) ** 2.00000) ** 2.00000)
      ALGBRC(2) = EXP( - CONSTS(13)*STATES(1))
      ALGBRC(3) = TERNRY(200.000.LE.VOI.AND.VOI.LE.201.000, 0.00000, 0.00000)
      ALGBRC(8) = TERNRY( CONSTS(16)*ALGBRC(3)+CONSTS(17).LT.0.00000, 0.00000, TERNRY(0.00000.LE. CONSTS(16)*ALGBRC(3)+CONSTS(17).AND. CONSTS(16)*ALGBRC(3)+CONSTS(17).LE.1.00000,  CONSTS(16)*ALGBRC(3)+CONSTS(17), 1.00000)
      ALGBRC(10) =  ALGBRC(8)*STATES(2)
      ALGBRC(12) = TERNRY(0.750000.LE.ALGBRC(10).AND.ALGBRC(10).LE.1.00000, CONSTS(18), TERNRY(0.250000.LE.ALGBRC(10).AND.ALGBRC(10).LT.0.750000, CONSTS(18) **  2.00000*ALGBRC(10) - 0.500000, 1.00000)
      RATES(1) =  CONSTS(11)*ALGBRC(1)*(CONSTS(23) - STATES(1)) -  CONSTS(12)*ALGBRC(12)*ALGBRC(2)*STATES(1)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = TERNRY(VOI.LE.CONSTS(8),  CONSTS(7)*1.00000 - EXP( - CONSTS(9)*VOI ** 2.00000) ** 2.00000,  CONSTS(7)* (1.00000 - EXP( - CONSTS(9)*VOI ** 2.00000))*EXP( - CONSTS(10)*VOI - CONSTS(8) ** 2.00000) ** 2.00000)
      ALGBRC(2) = EXP( - CONSTS(13)*STATES(1))
      ALGBRC(3) = TERNRY(200.000.LE.VOI.AND.VOI.LE.201.000, 0.00000, 0.00000)
      ALGBRC(8) = TERNRY( CONSTS(16)*ALGBRC(3)+CONSTS(17).LT.0.00000, 0.00000, TERNRY(0.00000.LE. CONSTS(16)*ALGBRC(3)+CONSTS(17).AND. CONSTS(16)*ALGBRC(3)+CONSTS(17).LE.1.00000,  CONSTS(16)*ALGBRC(3)+CONSTS(17), 1.00000)
      ALGBRC(10) =  ALGBRC(8)*STATES(2)
      ALGBRC(12) = TERNRY(0.750000.LE.ALGBRC(10).AND.ALGBRC(10).LE.1.00000, CONSTS(18), TERNRY(0.250000.LE.ALGBRC(10).AND.ALGBRC(10).LT.0.750000, CONSTS(18) **  2.00000*ALGBRC(10) - 0.500000, 1.00000)
      ALGBRC(4) =  0.500000*ALGBRC(3)+CONSTS(19)
      ALGBRC(5) = ALGBRC(3)+1.87000
      ALGBRC(6) =  CONSTS(4)*(EXP( CONSTS(2)*ALGBRC(5)) - 1.00000)
      ALGBRC(7) =  CONSTS(3)*(EXP( CONSTS(1)*(ALGBRC(5) - ALGBRC(3))) - 1.00000)
      ALGBRC(9) = ( STATES(1)*ALGBRC(4))/1.00000
      ALGBRC(11) =  CONSTS(5)*ALGBRC(4)*STATES(1)*ALGBRC(10)*CONSTS(30)
      ALGBRC(13) =  CONSTS(12)*ALGBRC(12)*ALGBRC(2)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END